Re: question about plotting typhoon best track

From: Hoffman Cheung <hoffmancheung_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 03 2010 - 04:52:11 MDT

Dear Richard,

There is a slight mistake when reading the maximum wind speed, which should
be read as three characters instead of two.
"vmax = str_get_cols( data, 49, 50)" may be modified as "vmax =
stringtointeger(str_get_cols( data, 48, 50))"

Best Regards,
Hoffman

2010/8/2 Li Richard <lcy114@yahoo.com.hk>

>
>
> --- *2009¦~11¤ë23¤é ¬P´Á¤@¡ALi Richard <lcy114@yahoo.com.hk>* ¼g¹D¡R
>
>
> ±H¥ó¤H: Li Richard <lcy114@yahoo.com.hk>
> ¥DÃD: Re: [ncl-talk] question about plotting typhoon best track
> ¦¬¥ó¤H: vigh@atmos.colostate.edu
> °Æ¥»(CC): shea@ucar.edu
> ¤é´Á: 2009¦~11¤ë23¤é,¬P´Á¤@,¤W¤È4:32
>
> Dear Jonathan and Dennis,
> Thank you very much and your scripts greatly help me. I have tried my best
> to modify your script a bit to create the best track plot. However, since I
> am a new ncl user, I'm not sure whether I've made any mistakes. In my plot,
> some portions of the track line is missing (see the attachment) and I don't
> know why. Also, I don't know what does the number on the track line mean. So
> could you mind helping me to check my code to see if I have made any
> mistake? The data I used and the output plot can be found in the
> attachment. Thank you.
> Best regards,
> Richard
> ;********************************************************
> ; track_one.ncl
> ;
> ; Author: Jonathan Vigh (with assistance from Mary Haley)
> ; Location: Colorado State University
> ;
> ;
> ; The purpose of this script is to plot the best track
> ; for jut one storm including all data (subtropical
> ; storms, depressions, extrtropical lows, etc.)
> ;
> ; For future work - fix up annotations with new NCL annotation
> functionality.
> ; ALSO, see about controlling the lat/lon tickmark spacing using
> ; a resource like gsnMajorLatSpacing.
> ;
> ;********************************************************
> 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/csm/shea_util.ncl"
> begin
> diri = "C:/Documents and Settings/richard li/®à­±/typhoon best track
> data/2007-wp-full/"
> fili = "bwp122007.txt"
>
> cyclone_name = "Mitch"
> ssn = "13"
> ; Next, set the plotting parameters (which cases to plot)
> TypeOn = True ; If you just want the legend to have
> the basic (H, TS, and TD) designators (* and S), set TypeOn to False
> ; NOTE -- this will cause the program to grab a
> different input file -- one in which all the
> ; extratropical (E), remnant low (L), and wave cases
> (W) have been taken out; additionally,
> ; there will not be a distinction between the S and *
> cases (they will just be plotted according to
> ; intensity
> PlotSubTropicalSegments = True ; If you wish to exclude all
> subtropical line segments, set to False
>
> ; Note: if TypeOn is set to False, the following (W, L, E) cases won't be
> plotted regardless of their value
> PlotWaveSegments = True ; If you wish to exclude all wave
> segments, set to False
> PlotLowSegments = True ; If you wish to exclude all remnant
> low segments, set to False
> PlotExtraTropicalSegments = True ; If you wish to exclude all
> extratropical line sements, set to False
>
>
> ;********************************
> ; get data
> ;********************************
> data = asciiread(diri+fili, -1,"string") ; Info includes type so
> cases can be weeded out
> ;tStr = asciiread(fili, -1,"string") ; Info includes type so cases can
> be weeded out
> tChr = stringtochar(data)
>
> nrows = dimsizes(data)
>
> region = str_get_cols( data, 0, 1)
> print(region)
> year = str_get_cols( data, 8, 11)
> month = str_get_cols( data, 12, 13)
> day = str_get_cols( data, 14, 15)
> hour = str_get_cols( data, 16, 17)
> vmax = str_get_cols( data, 49, 50)
> lat = stringtofloat(str_get_cols( data, 35, 37))*0.1
> ;if (str_get_cols( data, 38, 38).eq."S") then
> ; lat = -lat
> ;end if
> print(lat)
> lon = stringtofloat(str_get_cols( data, 41, 44))*0.1
> ;if (str_get_cols( data, 45, 45).eq."W") then
> ; lon = -lon
> ;end if
> print(lon)
> type = str_get_cols( data, 59, 60) ; "DB", "TD"
> name = str_get_cols( data,149,158)
> print(type+" "+name)
> ; Now create arrays that only hold the points for the 00z locations
> lat0 = mask(lat,hour,0)
> lon0 = mask(lon,hour,0)
>
> lat12 = mask(lat,hour,12)
> lon12 = mask(lon,hour,12)
> day12 = mask(day,hour,12)
>
>
> ;sn = stringtoint( chartostring(tChr(:,0:1)) )
> ;year = stringtoint( chartostring(tChr(:,2:3)) )
> ;month = stringtoint( chartostring(tChr(:,4:5)) )
> ;day = stringtoint( chartostring(tChr(:,6:7)) )
> ;hour = stringtoint( chartostring(tChr(:,8:9)) )
>
> ;lat = stringtofloat( chartostring(tChr(:,10:13)) )/10.0
> ;lon = -stringtofloat( chartostring(tChr(:,15:18)) )/10.0
> ;vmax = stringtoint( chartostring(tChr(:,21:23)) )
>
> ;type = chartostring(tChr(:,30:30))
>
> ;********************************
> ; select sub-regions
> ;********************************
> minlat = 5.0 ;min(lat) ; 0.0 ; deg N ; was 0
> maxlat = 40.0 ;max(lat) ; 57.0 ; deg N ; was 57
> minlon = 100.0 ; min(lon) -.;-100.0 ; - deg E = deg W ; was
> -100
> maxlon = 140.0 ; max(lon) +10.; -10.0 ; - deg E = deg W ; was
> -20, then -15
> ;***** Define some NICE color maps to use.
> colors_8 =
> (/"White","Black","Black","MediumPurple1","MediumPurple3","Blue1",\
> "CadetBlue3","Aquamarine2", \
> "Gold","Tan1","Sienna1","Tomato","VioletRed1", \
> "Yellow","LimeGreen","Grey37","Red","Orange","GoldenRod1", \
> "DarkOrange","SteelBlue1","SlateBlue1","SlateGray1", \
> "LightSlateBlue","Magenta","DodgerBlue", \
> "LightSteelBlue1","Moccasin","LightYellow","LemonChiffon1", \
> "CornSilk","LightGoldenrodYellow","Tan","PaleTurquoise3"/)
>
> ;********************************
> ; create plot
> ;********************************
> wks = gsn_open_wks("x11",cyclone_name)
> gsn_define_colormap(wks,colors_8)
>
> res = True
> ; res_at_gsnMaximize<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@gsnMaximize>
> = True
> res_at_gsnDraw <http://hk.mc191.mail.yahoo.com/mc/compose?to=res@gsnDraw>
> = False ; so we can add poly stuff
> res_at_gsnFrame<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@gsnFrame>
> = False ; do not advance frame
> res_at_gsnMaximize<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@gsnMaximize>
> = True
> ; res_at_gsnPaperOrientation<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@gsnPaperOrientation>= "portrait"
> res_at_mpDataBaseVersion<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpDataBaseVersion>= "Ncarg4_1" ; Alias 'MediumRes'
> res_at_mpDataSetName<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpDataSetName>
> = "Earth..1"
> ; res_at_mpProjection<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpProjection>
> = "LambertConformal"
>
> res_at_mpLambertParallel1F<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpLambertParallel1F>= 20.0
> res_at_mpLambertParallel2F<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpLambertParallel2F>= 40.0
> res_at_mpLambertMeridianF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpLambertMeridianF>
> = -60.0
>
> res_at_mpLimitMode<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpLimitMode>= "LatLon"
> res_at_mpMinLatF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpMinLatF>
> = minlat
> res_at_mpMaxLatF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpMaxLatF>
> = maxlat
> res_at_mpMinLonF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpMinLonF>
> = minlon
> res_at_mpMaxLonF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpMaxLonF>
> = maxlon
>
> res_at_mpFillOn<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpFillOn>
> = True ; False to turn off gray continents
> res_at_mpOutlineOn<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpOutlineOn>
> = True ; turn on continental outline
> res_at_mpOutlineBoundarySets<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpOutlineBoundarySets>= "AllBoundaries"
> res_at_mpLandFillColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpLandFillColor>
> = "Tan" ; was "GoldenRod1"
> res_at_mpInlandWaterFillColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpInlandWaterFillColor>= "PaleTurquoise3" ; was "LightBlue1" ; was "PaleTurquoise3"
> res_at_mpOceanFillColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpOceanFillColor>
> = "PaleTurquoise3" ; was "LightBlue1"
> res_at_mpGeophysicalLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGeophysicalLineColor>
> = "Grey37"
> res_at_mpGeophysicalLineThicknessF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGeophysicalLineThicknessF>= 0.5
>
> res_at_mpUSStateLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpUSStateLineColor>
> = "Grey37"
> res_at_mpUSStateLineThicknessF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpUSStateLineThicknessF>
> = 0.5
>
> res_at_mpNationalLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpNationalLineColor>
> = "Grey37"
> res_at_mpNationalLineThicknessF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpNationalLineThicknessF>
> = 0.5
>
> res_at_mpGridAndLimbOn<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGridAndLimbOn>
> = "True"
> res_at_mpGridAndLimbDrawOrder<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGridAndLimbDrawOrder>= "Draw"
> res_at_mpGridMaskMode<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGridMaskMode>
> = "MaskLand"
> res_at_mpGridSpacingF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGridSpacingF>
> = 5.0
> res_at_mpGridLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGridLineColor>
> = "Grey37"
> res_at_tmXBLabelFontHeightF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@tmXBLabelFontHeightF>= 0.012 ; 0.005
> res_at_tmXBMajorLengthF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@tmXBMajorLengthF>
> = -0.001
> res_at_pmTickMarkDisplayMode<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@pmTickMarkDisplayMode>= "Always"
>
> ; res_at_tiMainString<http://hk.mc191.mail.yahoo.com/mc/compose?to=res@tiMainString>= "Hurricane Wilma (2005)"
>
> ;***************************************
> ; plot base map *
> ;***************************************
> plot = gsn_csm_map(wks,res) ; draw one of eight map projections
>
> ;***************************************
> ; Draw best track history as polylines *
> ;***************************************
> res_poly = True ; polyline mods desired
> ; create array of dummy graphic variables. This is required, b/c each line
> ; must be associated with a unique dummy variable.
> dum = new(dimsizes(hour),graphic)
> ic = 0
> do k=0,nrows-2
> if(.not.ismissing(lat(k)))
> res_poly_at_gsLineDashPattern<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 0
> res_poly_at_gsLineThicknessF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineThicknessF>
> = 4
> if(.not. TypeOn) then
> ; Plot hurricane segments
> if((vmax(k).gt.64).and.(type(k).eq."TY")) then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Red"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Plot tropical storm segments
> if((vmax(k).lt.64).and.(vmax(k).gt.34).and.(type(k).eq."TS"))
> then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Yellow"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Plot tropical depression segments
> if((vmax(k).lt.34).and.(type(k).eq."TD")) then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "LimeGreen"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Now plot the subtropical segments with dashed lines
> ; Plot hurricane segments of subtropical systems with dashed red lines
> if((vmax(k).gt.64).and.(type(k).eq."S")) then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Red"
> res_poly_at_gsLineDashPattern<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Plot tropical storm segments of subtropical systems with dashed yellow
> lines
> if((vmax(k).lt.64).and.(vmax(k).gt.34).and.(type(k).eq."SS"))
> then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Yellow"
> res_poly_at_gsLineDashPattern<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Plot tropical depression segments of subtropical systems with dashed dark
> LimeGreen lines
> if((vmax(k).lt.34).and.(type(k).eq."SD")) then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "LimeGreen"
> res_poly_at_gsLineDashPattern<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> else ; if(TypeOn) -- plot pure tropical segments as solid lines (red for
> hurricane, etc.).
> ; Plot hurricane segments
> if((vmax(k).gt.64).and.(type(k).eq."TY")) then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Red"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Plot tropical storm segments
> if((vmax(k).lt.64).and.(vmax(k).gt.34).and.(type(k).eq."TS"))
> then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Yellow"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Plot tropical depression segments
> if((vmax(k).lt.34).and.(type(k).eq."TD")) then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "LimeGreen"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> if(PlotWaveSegments) then
> ;Plot tropical wave segments
> if(type(k).eq."WV") then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "LimeGreen"
> res_poly_at_gsLineDashPattern<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
>
> if(PlotLowSegments) then
> ;Plot remanant low segments
> if(type(k).eq."LO") then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "SlateBlue"
> res_poly_at_gsLineDashPattern<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
>
> if(PlotSubTropicalSegments) then
>
> ;Plot subtropical storm segments
> if((vmax(k).gt.34).and.(type(k).eq."SS")) then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "DarkOrange"
> ic = ic + 1
> end if
> ;Plot subtropical depression segments
> if((vmax(k).lt.34).and.(type(k).eq."SD")) then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Blue1"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
>
> if(PlotExtraTropicalSegments) then
> ;Plot extratropical segments
> if(type(k).eq."EX") then
> res_poly_at_gsLineColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Black"
> res_poly_at_gsLineDashPattern<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1
> dum(ic) = gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
> end if
>
> end if
> end do
>
> ;***************************************
> ; Draw black dots at lat/lon itersections
> ;***************************************
>
> ;***************************************
> ; Draw black polymarkers at 00Z locations
> ;***************************************
> res_mark = True
> res_mark_at_gsMarkerIndex<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerIndex>
> = 1 ; polymarker style
> res_mark_at_gsMarkerSizeF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerSizeF>
> = 0.02 ; polymarker size - was 0.012
> res_mark_at_gsMarkerColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerColor>
> = "Black" ; change marker color
> duma = new(1,graphic)
> duma = gsn_add_polymarker(wks,plot,lon0,lat0,res_mark)
>
> ; Now draw white polymarkers at 12z locations
> res_mark_at_gsMarkerIndex<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerIndex>
> = 1
> res_mark_at_gsMarkerSizeF<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerSizeF>
> = 0.02 ; polymarker size - was 0.012
> res_mark_at_gsMarkerColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerColor>
> = "White" ; change marker color
>
>
> dumb = new(1,graphic)
> dumb = gsn_add_polymarker(wks,plot,lon12,lat12,res_mark)
>
> ;***************************
> ; Plot some text labels *
> ;***************************
> txres = True
> ; Now draw the day labels at each 00Z marker
> txres_at_txFontHeightF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>= 0.015 ; 0.008
> txres_at_txJust<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>
> = "TopCenter"
>
> dumz = new(nrows,graphic)
>
> do k=0,nrows-1
> dumz(k) =
> gsn_add_text(wks,plot,day12(k),lon12(k),lat12(k)-0.25,txres)
> end do
> draw(wks)
>
> ; Draw storm number (actually these are strings) at beginning of track
>
> txres_at_txFontHeightF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>= 0.02 ; 0.0044
> txres_at_txJust<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>
> = "CenterLeft"
>
> txres_at_txPerimOn<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimOn>
> = True
> txres_at_txPerimColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimColor>
> = "Black"
> txres_at_txPerimThicknessF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimThicknessF>
> = 1.0
> txres_at_txPerimSpaceF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 0.4
> txres_at_txBackgroundFillColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txBackgroundFillColor>= "White"
> ; gsn_text(wks,plot,ssn,lon(0)+0.6,lat(0),txres)
>
> ; Now draw them at the end
> txres_at_txJust<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>= "BottomRight"
> ; gsn_text(wks,plot,ssn,lon(nrows-1),lat(nrows-1),txres)
>
> if (.not. TypeOn) then
> txres_at_txFontHeightF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>
> = 0.02 ; 0.006
> txres_at_txJust<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>
> = "CenterCenter"
> txres_at_txPerimSpaceF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 0.7
> txres_at_txPerimThicknessF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimThicknessF>
> = 1.5
> txres_at_txConstantSpacingF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txConstantSpacingF>
> = 1.0
> txres_at_txFontAspectF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontAspectF>
> = 1.5
> txres_at_txFontThicknessF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontThicknessF>
> = 0.8
> gsn_text_ndc(wks,"~F02~ Remnant low, tropical wave, and ~C~
> extratropical stages are not shown. ~C~~C~ Subtropical stages are
> dashed.",0.715,0.680,txres)
> end if
> txres_at_txFontHeightF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>
> = 0.005
> txres_at_txPerimThicknessF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimThicknessF>
> = 1.5
> txres_at_txPerimSpaceF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 1.0
> txres_at_txConstantSpacingF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txConstantSpacingF>
> = 1.0
> txres_at_txFontAspectF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontAspectF>
> = 1.5
> txres_at_txFontThicknessF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontThicknessF>
> = 0.8
>
> ;******************
> ; Plot a legend *
> ;******************
> lgres = False
> lgres_at_lgAutoManage<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgAutoManage>
> = False
>
> lgres_at_vpWidthF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@vpWidthF>
> = 0.2 ; was 0.1 ; width of legend (NDC)
> lgres_at_vpHeightF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@vpHeightF>
> = 0.2 ; was 0.1 ; height of legend (NDC)
> ; lgres_at_lgBottomMarginF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgBottomMarginF>
> = 0.17 ; was 0.25
> lgres_at_lgPerimFill<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgPerimFill>
> = 0 ; Use solid fill (0) instead of the default hollow
> fill
> lgres_at_lgPerimFillColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgPerimFillColor>
> = "Background"
> ; lgres_at_lgBoxMajorExtentF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgBoxMajorExtentF>
> = 0.4
> lgres_at_lgBoxMinorExtentF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgBoxMinorExtentF>
> = 0.2 ; controls how wide the box holding the legend items (lines and
> markers) can be in relation to legend
> ; lgres_at_lgBoxBackground<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgBoxBackground>
> = "PaleTurquoise3"
> lgres_at_lgMonoItemType<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMonoItemType>
> = False ; indicates that we wish to set the item types
> individually
> lgres_at_lgMonoMarkerIndex<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMonoMarkerIndex>
> = False
> lgres_at_lgMonoLineThickness<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMonoLineThickness>
> = False
> lgres_at_lgMonoMarkerThickness<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMonoMarkerThickness>= False
> lgres_at_lgMonoMarkerSize<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMonoMarkerSize>
> = False
> ; position fine elements of legend relative to some positional values:
> xlegend = 0.66 ; 0.820
> ylegend = 0.35 ; 0.290
>
> if(TypeOn) then
> lgres_at_lgLabelFont<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFont>
> = 0
> lgres_at_lgLabelFontHeightF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFontHeightF>
> = 0.012 ; 0.004
> lgres_at_lgLabelFontAspectF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFontAspectF>
> = 1.2
> lgres_at_lgLabelConstantSpacingF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelConstantSpacingF>= 0.0
> lgres_at_lgItemCount<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgItemCount>
> = 11
> lgres_at_lgLineDashSegLenF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLineDashSegLenF>
> = 0.1
> lgres_at_lgItemTypes<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgItemTypes>
> =
> (/"Markers","Markers","Markers","Lines","Lines","Lines","Lines","Lines","Lines","Lines","Lines"/)
> lgres_at_lgMarkerIndexes<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerIndexes>
> = (/ 1, 4, 16, 0, 0, 0, 0,
> 0, 0, 0, 0/)
> lgres_at_lgLineThicknesses<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLineThicknesses>
> = (/ 0.1, 0.1, 0.1, 4.0, 4.0, 4.0, 4.0, 4.0,
> 4.0, 4.0, 4.0/)
> lgres_at_lgMarkerColors<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerColors>
> = (/ "White", "Black", "Black"/)
> lgres_at_lgMarkerSizes<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerSizes>
> = (/ 0.0001, 0.004, 0.004/)
> lgres_at_lgLineColors<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLineColors>
> = (/ "White", "Black", "Black",\
> "SlateBlue1", "LimeGreen",
> "Black", "Blue1", "Dark Orange", "LimeGreen",
> "Yellow", "Red" /) ; colors for legend lines
> lgres_at_lgDashIndexes<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgDashIndexes>
> = (/ 0, 0, 0,\
> 2, 2,
> 2, 0, 0, 0,
> 0, 0 /) ; dash indexes
> ; gsn_legend_ndc(wks,10, (/"Tropical Cyclone No.","1200 UTC
> Position/Date","0000 UTC Position",\
> ; "Remnant Low","Tropical
> Wave","Extratropical","Subtropical Dep.","Subtropical Storm","Tropical
> Dep.","Tropical Storm (T)","Hurricane (H)"/),xlegend,ylegend,lgres)
> yoffset_day = -0.0858
> yoffset_storm = -0.0910
> else
> lgres_at_lgLabelFont<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFont>
> = 0
> lgres_at_lgLabelFontHeightF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFontHeightF>
> = 0.004
> lgres_at_lgLabelFontAspectF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFontAspectF>
> = 1.2
> lgres_at_lgLabelConstantSpacingF<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelConstantSpacingF>= 0.0
> lgres_at_lgItemCount<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgItemCount>
> = 6
> lgres_at_lgItemTypes<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgItemTypes>
> = (/"Markers","Markers","Markers","Lines" ,"Lines" ,"Lines"/)
> lgres_at_lgLineColors<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLineColors>
> = (/"White", "Black" ,"Black" ,"LimeGreen","Yellow","Red" /) ; colors
> for legend lines
> lgres_at_lgLineThicknesses<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLineThicknesses>
> = (/ 0.1, 0.1, 0.1, 4.0, 4.0, 4.0/)
> lgres_at_lgDashIndexes<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgDashIndexes>
> = (/ 0, 0, 0, 0, 0, 0/)
> lgres_at_lgMarkerIndexes<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerIndexes>
> = (/ 0, 4, 16, 0, 0, 0/)
> lgres_at_lgMarkerColors<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerColors>
> = (/"White", "Black" , "Black"/)
> lgres_at_lgMarkerSizes<http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerSizes>
> = (/ 0.0001, 0.004, 0.004/)
> ; gsn_legend_ndc(wks,5,(/"Tropical Cyclone No.","1200 UTC
> Position/Date","0000 UTC Position",\
> ; "Tropical Dep.","Tropical Storm (T)","Hurricane
> (H)"/),xlegend,ylegend,lgres)
> yoffset_day = -0.0750 ; offsets for the case where we don't plot
> all the extra cases
> yoffset_storm = -0.0875
> end if
> ; Now draw a day label on the legend
> txres_at_txPerimOn<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimOn>
> = False
> txres_at_txFontHeightF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>
> = 0.01
> txres_at_txPerimSpaceF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 0.0
> txres_at_txJust<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>
> = "CenterCenter"
> ; gsn_text_ndc(wks,"21",xlegend + 0.0183, ylegend + yoffset_day,txres)
>
> ; Draw storm number on the legend
> txres_at_txFontHeightF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>= 0.004
>
> txres_at_txPerimOn<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimOn>
> = True
> txres_at_txPerimColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimColor>
> = "Black"
> txres_at_txPerimThicknessF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimThicknessF>
> = 1.0
> txres_at_txPerimSpaceF<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 0.4
> txres_at_txBackgroundFillColor<http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txBackgroundFillColor>= "White"
> ; gsn_text_ndc(wks,"3",xlegend + 0.0142, ylegend +
> yoffset_storm,txres)
> ; drawNDCGrid(wks) ; Use to put on a grid for fine-tuning placement
>
> frame(wks)
>
> end
>
> --- *2009¦~11¤ë20¤é ¬P´Á¤­¡AJonathan Vigh <vigh@atmos.colostate.edu>* ¼g¹D¡R
>
>
> ±H¥ó¤H: Jonathan Vigh <vigh@atmos.colostate.edu>
> ¥DÃD: Re: [ncl-talk] question about plotting typhoon best track
> ¦¬¥ó¤H: "Dennis Shea" <shea@ucar.edu>
> °Æ¥»(CC): "Li Richard" <lcy114@yahoo.com.hk>, ncl-talk@ucar.edu
> ¤é´Á: 2009¦~11¤ë20¤é,¬P´Á¤­,¤U¤È5:14
>
> Hi Li,
> If you just want to plot one typhoon track, check out the attached
> script - this should be easier than trying to adapt unique_1.ncl. You'll
> still need to revamp the data read section a bit - Dennis's e-mail should
> help you with that.
>
> Best regards,
> Jonathan
>
>
> Dennis Shea wrote:
>
> The unique_1.ncl was written long before the str_* functions were created.
> The attached script uses "str_get_col" to extract some of
> the data. You can expand as needed.
>
> The unique_1.ncl predefined storm names and numbers.
> You will have to create code that performs that task.
>
> Anyway, the attached script should get you started.
>
> Good luck
>
>
> Li Richard wrote:
>
> Hello everyone,
> I would like to know how can I plot the typhoon best track using ncl. I
> have found a similar code unique_1.ncl
> <http://www.ncl.ucar.edu/Applications/Scripts/unique_1.ncl><http://www.ncl.ucar.edu/Applications/Scripts/unique_1.ncl>on the web page of application example, but I don't know how to read in the
> data I get from the JTWC. An example of the data can be seen in the
> attachment. I would be much appreciated if anyone can kindly answer my
> question. Thank you.
> Richard
>
> ;********************************************************
> ; unique_1.ncl
> ;
> ; The purpose of this script is to plot the best tracks
> ; for a given season storms including all data (subtropical
> ; storms, depressions, extrtropical lows, etc.)
> ;********************************************************
> 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/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
> begin
> ; First set the year and number of storms in the season
> ; yyyy = 2001
> ; ncurves = 17
> ; nstorms = 17
> ; yyyy = 2002
> ; ncurves = 14
> ; nstorms = 17
> yyyy = 2003
> ncurves = 21
> nstorms = 21
> bcurve = 0 ; Start at first storm
> ; Next, set the plotting parameters (which cases to plot)
> ;
> ; Note that this script probably won't work for TypeOn = False, because
> ; we don't have the data file for it.
> ;
> TypeOn = True ; If you just want the legend to have
> the basic (H, TS, and TD) designators (* and S), set TypeOn to False
> ; NOTE -- this will cause the program to grab a different input
> file -- one in which all the
> ; extratropical (E), remnant low (L), and wave cases (W) have
> been taken out; additionally,
> ; there will not be a distinction between the S and * cases (they
> will just be plotted according to
> ; intensity
> PlotSubTropicalSegments = True ; If you wish to exclude all
> subtropical line segments, set to False
> ; Note: if TypeOn is set to False, the following (W, L, E) cases won't be
> plotted regardless of their value PlotWaveSegments = True ;
> If you wish to exclude all wave segments, set to False
> PlotLowSegments = True ; If you wish to exclude all remnant low
> segments, set to False
> PlotExtraTropicalSegments = True ; If you wish to exclude all
> extratropical line sements, set to False if (yyyy.eq.2001) then
> name =
> (/"Allison","Two","Barry","Chantal","Dean","Erin","Felix","Gabrielle","Nine","Humberto","Iris","Jerry","Karen","Lorenzo","Michelle","Noel","Olga"/)
>
> ssn =
> (/"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"/)
>
> end if if (yyyy.eq.2002) then
> name =
> (/"Arthur","Bertha","Cristobal","Dolly","Edouard","Fay","Seven","Gustav","Hanna","Isidore","Josephine","Kyle","Lili","Fourteen"/)
>
> ssn = (/"1","2","3","4","5","6","7","8","9","10","11","12","13","14"/)
> end if
>
> if (yyyy.eq.2003) then
> name =
> (/"Ana","Two","Bill","Claudette","Danny","Six","Seven","Erika","Nine","Fabian","Grace","Henri","Isabel","Fourteen","Juan","Kate","Larry","Mindy","Nicholas","Odette","Peter"/)
>
> ssn =
> (/"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21"/)
>
> end if
>
> ;********************************
> ; get data
> ;********************************
> if(TypeOn) then
> tStr = asciiread("best_all_" + yyyy + ".inp", -1,"string") ; Info
> includes type so cases can be weeded out
> else
> tStr = asciiread("best_" + yyyy + ".inp", -1,"string") ; Info
> includes type so cases can be weeded out
> end if tChr = stringtochar(tStr)
>
> nrows = dimsizes(tStr)
>
> sn = stringtofloat( chartostring(tChr(:,0:1)) )
> year = stringtofloat( chartostring(tChr(:,2:3)) )
> month = stringtofloat( chartostring(tChr(:,4:5)) ) day =
> stringtofloat( chartostring(tChr(:,6:7)) )
> hour = stringtofloat( chartostring(tChr(:,8:9)) )
>
> lat = stringtofloat( chartostring(tChr(:,10:13)) )
> lon = stringtofloat( chartostring(tChr(:,15:18)) )
> vmax = stringtofloat( chartostring(tChr(:,21:23)) )
>
> type = chartostring(tChr(:,30:30))
>
> beginning = new((/ncurves/),integer)
> ending = new((/ncurves/),integer)
> ic = 0
> beginning(ic) = 0
> do i=1,dimsizes(hour)-1
>
> ; Look for end of storm record (first check to see if at end of file)
> if (i.eq.dimsizes(hour)-1) then
> ending(ic) = i
> else if (sn(i-1).ne.sn(i)) then
> ending(ic) = i-1
> ic = ic + 1
> beginning(ic) = i
> end if end if
> end do
> lengths = ending - beginning + 1
> max_npts = max(lengths) ; Max # of points.
>
> ; Now rearrange the arrays to hold individual curve data
> msg_val = -999. ; Set to a safe missing value.
>
> new_lat = new((/ncurves,max_npts/),float,msg_val)
> new_lon = new((/ncurves,max_npts/),float,msg_val)
> new_hour = new((/ncurves,max_npts/),float,msg_val)
> new_day = new((/ncurves,max_npts/),string,msg_val)
> new_vmax = new((/ncurves,max_npts/),float,msg_val)
> new_type = new((/ncurves,max_npts/),string,msg_val)
>
> do nc = bcurve,ncurves-1
> new_lat(nc,0:lengths(nc)-1) = lat(beginning(nc):ending(nc))/10.0
> new_lon(nc,0:lengths(nc)-1) = -lon(beginning(nc):ending(nc))/10.0
> new_hour(nc,0:lengths(nc)-1) = hour(beginning(nc):ending(nc))
> new_day(nc,0:lengths(nc)-1) = day(beginning(nc):ending(nc))
> new_vmax(nc,0:lengths(nc)-1) = vmax(beginning(nc):ending(nc))
> new_type(nc,0:lengths(nc)-1) = type(beginning(nc):ending(nc))
> end do
> ; Now create arrays that only hold the points for the 00z locations
> lat0 = mask(new_lat,new_hour,0)
> lon0 = mask(new_lon,new_hour,0)
>
> lat12 = mask(new_lat,new_hour,12)
> lon12 = mask(new_lon,new_hour,12)
> day12 = mask(new_day,new_hour,12)
>
> ;********************************
> ; select sub-regions
> ;********************************
> minlat = 0.0 ; deg N
> maxlat = 57.0 ; deg N
> minlon = -100.0 ; - deg E = deg W
> maxlon = -20.0 ; - deg E = deg W
> ;***** Define some NICE color maps to use.
> colors_6 =
> (/"White","Black","Black","MediumPurple1","MediumPurple3","Blue1",\
> "CadetBlue3","Aquamarine2","SeaGreen2","LawnGreen","Green4", \
> "GreenYellow","Gold","Tan1","Sienna1","Tomato","VioletRed1", \
>
> "Yellow","DarkGreen","Grey37","Red","Orange","GoldenRod1","DarkOrange","SteelBlue1","SlateBlue1",
> \
>
> "LightSlateBlue","DarkSeaGreen","Magenta","DodgerBlue","Moccasin"/)
> ;********************************
> ; create plot
> ;********************************
> wks = gsn_open_wks("ps","unique")
> gsn_define_colormap(wks,colors_6)
> res = True
> res_at_gsnMaximize <mailto:res_at_gsnMaximize><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@gsnMaximize>
> = True
> res_at_gsnPaperOrientation <mailto:res_at_gsnPaperOrientation><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@gsnPaperOrientation>= "Portrait"
> res_at_gsnDraw <mailto:res_at_gsnDraw><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@gsnDraw>
> = False ; so we can add poly stuff
> res_at_gsnFrame <mailto:res_at_gsnFrame><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@gsnFrame>
> = False ; do not advance frame
> res_at_mpDataBaseVersion <mailto:res_at_mpDataBaseVersion><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpDataBaseVersion>= "Ncarg4_1" ; Alias 'MediumRes'
> res_at_mpDataSetName <mailto:res_at_mpDataSetName><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpDataSetName>
> = "Earth..1"
> res_at_mpProjection <mailto:res_at_mpProjection><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpProjection>
> = "LambertConformal"
> res_at_mpLambertParallel1F <mailto:res_at_mpLambertParallel1F><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpLambertParallel1F>= 20.0
> res_at_mpLambertParallel2F <mailto:res_at_mpLambertParallel2F><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpLambertParallel2F>= 40.0
> res_at_mpLambertMeridianF <mailto:res_at_mpLambertMeridianF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpLambertMeridianF>
> = -60.0
> res_at_mpLimitMode <mailto:res_at_mpLimitMode><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpLimitMode>= "LatLon"
> res_at_mpMinLatF <mailto:res_at_mpMinLatF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpMinLatF>
> = minlat
> res_at_mpMaxLatF <mailto:res_at_mpMaxLatF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpMaxLatF>
> = maxlat
> res_at_mpMinLonF <mailto:res_at_mpMinLonF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpMinLonF>
> = minlon
> res_at_mpMaxLonF <mailto:res_at_mpMaxLonF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpMaxLonF>
> = maxlon
>
> res_at_mpFillOn <mailto:res_at_mpFillOn><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpFillOn>
> = True ; False to turn off gray continents
> res_at_mpOutlineOn <mailto:res_at_mpOutlineOn><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpOutlineOn>
> = True ; turn on continental outline
> res_at_mpOutlineBoundarySets <mailto:res_at_mpOutlineBoundarySets><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpOutlineBoundarySets>
> = "AllBoundaries"
> res_at_mpLandFillColor <mailto:res_at_mpLandFillColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpLandFillColor>
> = "GoldenRod1"
> res_at_mpInlandWaterFillColor <mailto:res_at_mpInlandWaterFillColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpInlandWaterFillColor>= "PaleTurquoise3"
> res_at_mpOceanFillColor <mailto:res_at_mpOceanFillColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpOceanFillColor>
> = "PaleTurquoise3"
> res_at_mpGeophysicalLineColor <mailto:res_at_mpGeophysicalLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGeophysicalLineColor>
> = "Grey37"
> res@mpGeophysicalLineThicknessF
> <mailto:res_at_mpGeophysicalLineThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGeophysicalLineThicknessF>= 0.5
> res_at_mpUSStateLineColor <mailto:res_at_mpUSStateLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpUSStateLineColor>
> = "Grey37"
> res_at_mpUSStateLineThicknessF <mailto:res_at_mpUSStateLineThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpUSStateLineThicknessF>
> = 0.5
> res_at_mpNationalLineColor <mailto:res_at_mpNationalLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpNationalLineColor>
> = "Grey37"
> res_at_mpNationalLineThicknessF <mailto:res_at_mpNationalLineThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpNationalLineThicknessF>
> = 0.5
> res_at_mpGridAndLimbOn <mailto:res_at_mpGridAndLimbOn><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGridAndLimbOn>
> = "True"
> res_at_mpGridAndLimbDrawOrder <mailto:res_at_mpGridAndLimbDrawOrder><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGridAndLimbDrawOrder>= "Draw"
> res_at_mpGridMaskMode <mailto:res_at_mpGridMaskMode><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGridMaskMode>
> = "MaskLand"
> res_at_mpGridSpacingF <mailto:res_at_mpGridSpacingF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGridSpacingF>
> = 5.0
> res_at_mpGridLineColor <mailto:res_at_mpGridLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@mpGridLineColor>
> = "Grey37"
> res_at_tmXBLabelFontHeightF <mailto:res_at_tmXBLabelFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@tmXBLabelFontHeightF>= 0.005
> res_at_tmXBMajorLengthF <mailto:res_at_tmXBMajorLengthF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@tmXBMajorLengthF>
> = -0.001
> res_at_pmTickMarkDisplayMode <mailto:res_at_pmTickMarkDisplayMode><http://hk.mc191.mail.yahoo.com/mc/compose?to=res@pmTickMarkDisplayMode>= "Always"
>
> ;***************************************
> ; plot base map *
> ;***************************************
> plot = gsn_csm_map(wks,res) ; draw one of eight map projections
> ;***************************************
> ; Draw best track history as polylines *
> ;*************************************** res_poly =
> True ; polyline mods desired
>
> ; Create array of dummy graphic variables. This is required, b/c each line
> ; must be associated with a unique dummy variable.
> dum = new(dimsizes(hour),graphic) ic = 0
> do i=0,ncurves-1
> do k=0,max_npts-2
> if(.not.ismissing(new_lat(i,k)))
> res_poly_at_gsLineDashPattern <mailto:res_poly_at_gsLineDashPattern><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 0
> res_poly_at_gsLineThicknessF <mailto:res_poly_at_gsLineThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineThicknessF>
> = 4 if(.not. TypeOn) then
> ; Plot hurricane segments
> if((new_vmax(i,k).gt.64).and.(new_type(i,k).eq."*")) then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Red" dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Plot tropical storm segments
> if((new_vmax(i,k).lt.64).and.(new_vmax(i,k).gt.34).and.(new_type(i,k).eq."*"))
> then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Yellow" dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1 end if ; Plot tropical depression
> segments
> if((new_vmax(i,k).lt.34).and.(new_type(i,k).eq."*")) then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "DarkGreen" dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Now plot the subtropical segments with dashed lines
> ; Plot hurricane segments of subtropical systems with dashed red lines
> if((new_vmax(i,k).gt.64).and.(new_type(i,k).eq."S")) then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Red" res_poly@gsLineDashPattern
> <mailto:res_poly_at_gsLineDashPattern><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF <mailto:res_poly_at_gsLineDashSegLenF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Plot tropical storm segments of subtropical systems with dashed yellow
> lines
> if((new_vmax(i,k).lt.64).and.(new_vmax(i,k).gt.34).and.(new_type(i,k).eq."S"))
> then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Yellow"
> res_poly_at_gsLineDashPattern <mailto:res_poly_at_gsLineDashPattern><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF <mailto:res_poly_at_gsLineDashSegLenF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1 dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1 end if ; Plot tropical depression
> segments of subtropical systems with dashed dark green lines
> if((new_vmax(i,k).lt.34).and.(new_type(i,k).eq."S")) then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "DarkGreen"
> res_poly_at_gsLineDashPattern <mailto:res_poly_at_gsLineDashPattern><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF <mailto:res_poly_at_gsLineDashSegLenF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1 dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1
> end if
> else ; if(TypeOn) -- plot pure tropical segments as solid lines (red for
> hurricane, etc.).
> ; Plot hurricane segments
> if((new_vmax(i,k).gt.64).and.(new_type(i,k).eq."*")) then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Red" dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1
> end if
> ; Plot tropical storm segments
> if((new_vmax(i,k).lt.64).and.(new_vmax(i,k).gt.34).and.(new_type(i,k).eq."*"))
> then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Yellow" dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1 end if ; Plot tropical depression
> segments
> if((new_vmax(i,k).lt.34).and.(new_type(i,k).eq."*")) then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "DarkGreen" dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1
> end if
> if(PlotWaveSegments) then ; Plot tropical wave segments
> if(new_type(i,k).eq."W") then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "DarkGreen" res_poly@gsLineDashPattern
> <mailto:res_poly_at_gsLineDashPattern><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF <mailto:res_poly_at_gsLineDashSegLenF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
> if(PlotLowSegments) then ; Plot remanant low segments
> if(new_type(i,k).eq."L") then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "SlateBlue" res_poly@gsLineDashPattern
> <mailto:res_poly_at_gsLineDashPattern><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF <mailto:res_poly_at_gsLineDashSegLenF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
> if(PlotSubTropicalSegments) then
> ; Plot subtropical storm segments
> if((new_vmax(i,k).gt.34).and.(new_type(i,k).eq."S")) then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "DarkOrange" dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1 end if
> ; Plot subtropical depression segments
> if((new_vmax(i,k).lt.34).and.(new_type(i,k).eq."S")) then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Blue1" dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
>
> if(PlotExtraTropicalSegments) then ; Plot extratropical segments
> if(new_type(i,k).eq."E") then
> res_poly_at_gsLineColor <mailto:res_poly_at_gsLineColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineColor>
> = "Black" res_poly@gsLineDashPattern
> <mailto:res_poly_at_gsLineDashPattern><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashPattern>
> = 2
> res_poly_at_gsLineDashSegLenF <mailto:res_poly_at_gsLineDashSegLenF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_poly@gsLineDashSegLenF>
> = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,new_lon(i,k:k+1),new_lat(i,k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
> end if
>
> end if
> end do
> end do
> ;***************************************
> ; Draw black polymarkers at 00Z locations
> ;***************************************
> res_mark = True
> res_mark_at_gsMarkerIndex <mailto:res_mark_at_gsMarkerIndex><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerIndex>
> = 1 ; polymarker style
> res_mark_at_gsMarkerSizeF <mailto:res_mark_at_gsMarkerSizeF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerSizeF>
> = 0.012 ; polymarker size
> res_mark_at_gsMarkerColor <mailto:res_mark_at_gsMarkerColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerColor>
> = "Black" ; change marker color
> duma = new(ncurves,graphic)
> do ic=bcurve,ncurves-1
> duma(ic) =
> gsn_add_polymarker(wks,plot,lon0(ic,:),lat0(ic,:),res_mark)
> end do
> ; Now draw white polymarkers at 12z locations
> res_mark_at_gsMarkerIndex <mailto:res_mark_at_gsMarkerIndex><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerIndex>
> = 1
> res_mark_at_gsMarkerSizeF <mailto:res_mark_at_gsMarkerSizeF><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerSizeF>
> = 0.012 ; polymarker size
> res_mark_at_gsMarkerColor <mailto:res_mark_at_gsMarkerColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=res_mark@gsMarkerColor>
> = "White" ; change marker color
> dumb = new(ncurves,graphic)
> do ic=bcurve,ncurves-1
> dumb(ic) =
> gsn_add_polymarker(wks,plot,lon12(ic,:),lat12(ic,:),res_mark)
> end do
> ;***************************
> ; Plot some text labels *
> ;***************************
>
> txres = True
> ; Now draw the day labels each 00Z marker
> txres_at_txFontHeightF <mailto:txres_at_txFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>= 0.0035
> txres_at_txJust <mailto:txres_at_txJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>
> = "TopCenter"
> ;
> ; Count number of text strings we'll be adding. There is probably
> ; a better way to do this (so you don't have to use a double do loop).
> ;
> ntext = 0
> do i=bcurve,ncurves-1
> do k=0,lengths(i)-1
> if(.not.ismissing(day12(i,k)).and..not.ismissing(lon12(i,k)).and.\
> .not.ismissing(lat12(i,k))) then
> ntext = ntext + 1
> end if
> end do
> end do
> dumt1 = new(ntext,graphic)
> dumt2 = new(ncurves-bcurve,graphic)
> dumt3 = new(ncurves-bcurve,graphic)
> ii = 0
> do i=bcurve,ncurves-1
> do k=0,lengths(i)-1
> if(.not.ismissing(day12(i,k)).and..not.ismissing(lon12(i,k)).and.\
> .not.ismissing(lat12(i,k))) then
> dumt1(ii) =
> gsn_add_text(wks,plot,day12(i,k),lon12(i,k),lat12(i,k)-0.45,txres)
> ii = ii + 1
> end if
> end do
> end do ; Draw storm number (actually these are strings) at beginning of
> track txres_at_txFontHeightF <mailto:txres_at_txFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>= 0.0044
> txres_at_txJust <mailto:txres_at_txJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>
> = "CenterLeft"
> txres_at_txPerimOn <mailto:txres_at_txPerimOn><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimOn>
> = True
> txres_at_txPerimColor <mailto:txres_at_txPerimColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimColor>
> = "Black"
> txres_at_txPerimThicknessF <mailto:txres_at_txPerimThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimThicknessF>
> = 1.0
> txres_at_txPerimSpaceF <mailto:txres_at_txPerimSpaceF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 0.4
> txres_at_txBackgroundFillColor <mailto:txres_at_txBackgroundFillColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txBackgroundFillColor>= "White"
> do i=bcurve,ncurves-1
> if(.not.ismissing(ssn(i)).and..not.ismissing(new_lon(i,0)).and.\
> .not.ismissing(new_lat(i,0))) then
> dumt2(i-bcurve) = gsn_add_text(wks,plot,ssn(i),new_lon(i,0)+0.6, \
> new_lat(i,0),txres)
> end if
> end do
> ; Now draw them at the end
> txres_at_txJust <mailto:txres_at_txJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>= "BottomRight"
> do i=bcurve,ncurves-1
> if(.not.ismissing(ssn(i)).and. \
> .not.ismissing(new_lon(i,lengths(i)-1)).and.\
> .not.ismissing(new_lat(i,lengths(i)-1))) then
> dumt3(i-bcurve) = gsn_add_text(wks,plot,ssn(i), \
> new_lon(i,lengths(i)-1), \
> new_lat(i,lengths(i)-1),txres)
> end if
> end do
> txres_at_txFontHeightF <mailto:txres_at_txFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>
> = 0.007
> txres_at_txJust <mailto:txres_at_txJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>
> = "CenterCenter"
> txres_at_txPerimSpaceF <mailto:txres_at_txPerimSpaceF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 1.0
> txres_at_txPerimThicknessF <mailto:txres_at_txPerimThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimThicknessF>
> = 1.5
> txres_at_txConstantSpacingF <mailto:txres_at_txConstantSpacingF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txConstantSpacingF>
> = 1.0
> txres_at_txFontAspectF <mailto:txres_at_txFontAspectF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontAspectF>
> = 1.5
> txres_at_txFontThicknessF <mailto:txres_at_txFontThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontThicknessF>
> = 0.4
> txres_at_gsnDraw <mailto:txres_at_gsnDraw><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@gsnDraw>
> = False
> ;
> ; Note: the X and Y positions in this case don't matter, because the
> ; text will get repositioned in the "gsn_add_anotation" function.
> ;
> lambert_text = gsn_create_text(wks,"~F02~ Lambert Conformal Conic ~C~
> True at 20~0557~ and 40~0557~ North ",txres)
>
> if (.not. TypeOn) then
> txres_at_txFontHeightF <mailto:txres_at_txFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>
> = 0.006
> txres_at_txJust <mailto:txres_at_txJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>
> = "CenterCenter"
> txres_at_txPerimSpaceF <mailto:txres_at_txPerimSpaceF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 0.7
> txres_at_txPerimThicknessF <mailto:txres_at_txPerimThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimThicknessF>
> = 1.5
> txres_at_txConstantSpacingF <mailto:txres_at_txConstantSpacingF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txConstantSpacingF>
> = 1.0
> txres_at_txFontAspectF <mailto:txres_at_txFontAspectF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontAspectF>
> = 1.5
> txres_at_txFontThicknessF <mailto:txres_at_txFontThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontThicknessF>
> = 0.8
> txres_at_gsnDraw <mailto:txres_at_gsnDraw><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@gsnDraw>
> = True
> gsn_text_ndc(wks,"~F02~ Remnant low, tropical wave, and ~C~
> extratropical stages are not shown. ~C~~C~ Subtropical stages are
> dashed.",0.715,0.680,txres)
> end if
> txres_at_txFontHeightF <mailto:txres_at_txFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>
> = 0.012
> txres_at_txPerimThicknessF <mailto:txres_at_txPerimThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimThicknessF>
> = 1.5
> txres_at_txPerimSpaceF <mailto:txres_at_txPerimSpaceF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 0.5
> txres_at_txConstantSpacingF <mailto:txres_at_txConstantSpacingF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txConstantSpacingF>
> = 1.0
> txres_at_txFontAspectF <mailto:txres_at_txFontAspectF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontAspectF>
> = 1.5
> txres_at_txFontThicknessF <mailto:txres_at_txFontThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontThicknessF>
> = 1.6
> txres_at_gsnDraw <mailto:txres_at_gsnDraw><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@gsnDraw>
> = False
> ;
> ; Note: the X and Y positions in this case don't matter, because the
> ; text will get repositioned in the "gsn_add_anotation" function.
> ;
> atlantic_text = gsn_create_text(wks,"~F02~ " + yyyy + " Atlantic
> Tropical Cyclones",txres)
> txres_at_txFontHeightF <mailto:txres_at_txFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>
> = 0.005
> txres_at_txPerimThicknessF <mailto:txres_at_txPerimThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimThicknessF>
> = 1.5
> txres_at_txPerimSpaceF <mailto:txres_at_txPerimSpaceF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 1.0
> txres_at_txConstantSpacingF <mailto:txres_at_txConstantSpacingF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txConstantSpacingF>
> = 1.0
> txres_at_txFontAspectF <mailto:txres_at_txFontAspectF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontAspectF>
> = 1.5
> txres_at_txFontThicknessF <mailto:txres_at_txFontThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontThicknessF>
> = 0.8
> if (yyyy .eq. 2001) then
> txres_at_gsnDraw <mailto:txres_at_gsnDraw><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@gsnDraw>
> = True
> gsn_text_ndc(wks,"~F02~ 1 T Allison 05-17 Jun. ~C~ 2
> Two 11-12 Jul. ~C~ 3 T Barry 02-07 Aug. ~C~ 4 T
> Chantal 14-22 Aug. ~C~ 5 T Dean 22-28 Aug. ~C~ 6 H
> Erin 01-15 Sep. ~C~ 7 H Felix 06-18
> Sep.~C~",0.263,0.650,txres) gsn_text_ndc(wks,"~F02~ 8 H
> Gabrielle 11-19 Sep. ~C~ 9 Nine 19-20 Sep. ~C~10 H
> Humberto 21-27 Sep. ~C~11 H Iris 04-09 Oct. ~C~12 T
> Jerry 06-08 Oct. ~C~13 H Karen 12-15 Oct. ~C~14 T
> Lorenzo 27-31 Oct.~C~",0.263,0.355,txres)
> gsn_text_ndc(wks,"~F02~15 H Michelle 29 Oct.-05 Nov.~C~16 H
> Noel 04-06 Nov. ~C~17 H Olga 24 Nov.-04
> Dec.~C~"
> ,0.263,0.310,txres)
> end if if (yyyy .eq. 2002) then
> txres_at_gsnDraw <mailto:txres_at_gsnDraw><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@gsnDraw>
> = True
> gsn_text_ndc(wks,"~F02~ 1 T Arthur 14-16 Jul. ~C~ 2 T
> Bertha 04-09 Aug. ~C~ 3 T Cristobal 05-08 Aug. ~C~ 4 T
> Dolly 29 Aug.-04 Sep.~C~ 5 T Edouard 01-06 Sep. ~C~ 6 T
> Fay 05-08 Sep. ~C~ 7 Seven 07-08
> Sep.~C~",0.263,0.650,txres)
> gsn_text_ndc(wks,"~F02~ 8 H Gustav 08-12 Sep. ~C~ 9 T
> Hanna 11-14 Sep. ~C~10 H Isidore 14-26 Sep. ~C~11 T
> Josephine 17-19 Sep. ~C~12 H Kyle 20 Sep.-12 Oct.~C~13 H
> Lili 21 Sep.-04 Oct.~C~14 Fourteen 14-16
> Oct.~C~",0.263,0.360,txres)
> end if
> if(yyyy .eq. 2003) then
> txres_at_txFontHeightF <mailto:txres_at_txFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>
> = 0.0075
> txres_at_gsnDraw <mailto:txres_at_gsnDraw><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@gsnDraw>
> = False
> ana_text = gsn_create_text(wks,"~F02~ 1 T Ana 20-24 Apr.
> ~C~ 2 Two 10-11 Jun. ~C~ 3 T Bill 29 Jun.-02 Jul.~C~ 4 H
> Claudette 08-17 Jul. ~C~ 5 H Danny 16-21 Jul. ~C~ 6
> Six 19-21 Jul. ~C~ 7 Seven 25-27 Jul.~C~",txres)
> erika_text = gsn_create_text(wks,"~F02~ 8 H Erika 14-17 Aug.
> ~C~ 9 Nine 21-22 Aug. ~C~10 H Fabian 27 Aug.-08 Sep.~C~11 T
> Grace 30-02 Sep. ~C~12 T Henri 03-08 Sep. ~C~13 H
> Isabel 06-19 Sep. ~C~14 Fourteen 08-10 Sep.~C~",txres)
> juan_text = gsn_create_text(wks,"~F02~15 H Juan 24-29 Sep.
> ~C~16 H Kate 25 Sep.-07 Oct.~C~17 T Larry 01-06 Oct. ~C~18 T
> Mindy 10-14 Oct. ~C~19 T Nicholas 13-23 Oct. ~C~20 T
> Odette 04-07 Dec. ~C~21 T Peter 07-11 Dec.~C~",txres)
> amres = True
> amres_at_amParallelPosF <mailto:amres_at_amParallelPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amParallelPosF>
> = -0.49
> amres_at_amOrthogonalPosF <mailto:amres_at_amOrthogonalPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amOrthogonalPosF>= -0.43
> amres_at_amJust <mailto:amres_at_amJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amJust>
> = "TopLeft"
> txid1 = gsn_add_annotation(plot,ana_text,amres)
> amres_at_amParallelPosF <mailto:amres_at_amParallelPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amParallelPosF>
> = -0.49
> amres_at_amOrthogonalPosF <mailto:amres_at_amOrthogonalPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amOrthogonalPosF>= 0..35
> amres_at_amJust <mailto:amres_at_amJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amJust>
> = "BottomLeft"
> txid2 = gsn_add_annotation(plot,erika_text,amres)
> amres_at_amParallelPosF <mailto:amres_at_amParallelPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amParallelPosF>
> = -0.49
> amres_at_amOrthogonalPosF <mailto:amres_at_amOrthogonalPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amOrthogonalPosF>= 0..35
> amres_at_amJust <mailto:amres_at_amJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amJust>
> = "TopLeft"
> txid3 = gsn_add_annotation(plot,juan_text,amres)
> end if
> ;******************
> ; Plot a legend *
> ;******************
> lgres = True
>
> lgres_at_lgAutoManage <mailto:lgres_at_lgAutoManage><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgAutoManage>
> = False
>
> lgres_at_vpWidthF <mailto:lgres_at_vpWidthF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@vpWidthF>
> = 0.1 ; was 0.08 ; width of legend (NDC)
> lgres_at_vpHeightF <mailto:lgres_at_vpHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@vpHeightF>
> = 0.1 ; was 0.08 ; height of legend (NDC)
> ; lgres_at_lgBottomMarginF <mailto:lgres_at_lgBottomMarginF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgBottomMarginF>
> = 0.17 ; was 0.25
> lgres_at_lgPerimFill <mailto:lgres_at_lgPerimFill><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgPerimFill>
> = 0 ; Use solid fill (0) instead of the default hollow
> fill
> lgres_at_lgPerimFillColor <mailto:lgres_at_lgPerimFillColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgPerimFillColor>
> = "Background"
> ; lgres_at_lgBoxMajorExtentF <mailto:lgres_at_lgBoxMajorExtentF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgBoxMajorExtentF>
> = 0.4
> lgres_at_lgBoxMinorExtentF <mailto:lgres_at_lgBoxMinorExtentF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgBoxMinorExtentF>
> = 0.2 ; controls how wide the box holding the legend items (lines and
> markers) can be in relation to legend
>
> ; lgres_at_lgBoxBackground <mailto:lgres_at_lgBoxBackground><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgBoxBackground>
> = "PaleTurquoise3"
>
> lgres_at_lgMonoItemType <mailto:lgres_at_lgMonoItemType><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMonoItemType>
> = False ; indicates that we wish to set the item types
> individually
> lgres_at_lgMonoMarkerIndex <mailto:lgres_at_lgMonoMarkerIndex><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMonoMarkerIndex>
> = False
> lgres_at_lgMonoLineThickness <mailto:lgres_at_lgMonoLineThickness><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMonoLineThickness>
> = False
> lgres_at_lgMonoMarkerThickness <mailto:lgres_at_lgMonoMarkerThickness><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMonoMarkerThickness>= False
> lgres_at_lgMonoMarkerSize <mailto:lgres_at_lgMonoMarkerSize><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMonoMarkerSize>
> = False
> ; Position fine elements of legend relative to some positional values:
> if (yyyy .eq. 2002) then
> xlegend = 0.710
> ylegend = 0.350
> else
> xlegend = 0.680
> ylegend = 0.390
> end if
> if(TypeOn) then
> lgres_at_lgLabelFont <mailto:lgres_at_lgLabelFont><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFont>
> = 0
> lgres_at_lgLabelFontHeightF <mailto:lgres_at_lgLabelFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFontHeightF>
> = 0.04
> lgres_at_lgLabelFontAspectF <mailto:lgres_at_lgLabelFontAspectF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFontAspectF>
> = 1.2
> lgres_at_lgLabelConstantSpacingF <mailto:lgres_at_lgLabelConstantSpacingF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelConstantSpacingF>= 0.0
> lgres_at_lgItemCount <mailto:lgres_at_lgItemCount><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgItemCount>
> = 11
> lgres_at_lgLineDashSegLenF <mailto:lgres_at_lgLineDashSegLenF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLineDashSegLenF>
> = 0..1
> lgres_at_lgItemTypes <mailto:lgres_at_lgItemTypes><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgItemTypes>
> =
> (/"Markers","Markers","Markers","Lines","Lines","Lines","Lines","Lines","Lines","Lines","Lines"/)
>
> lgres_at_lgMarkerIndexes <mailto:lgres_at_lgMarkerIndexes><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerIndexes>
> = (/ 1, 4, 16, 0, 0, 0, 0,
> 0, 0, 0, 0/)
> lgres_at_lgLineThicknesses <mailto:lgres_at_lgLineThicknesses><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLineThicknesses>
> = (/ 0.1, 0.1, 0.1, 4.0, 4.0, 4.0, 4.0, 4.0,
> 4.0, 4.0, 4.0/)
> lgres_at_lgMarkerColors <mailto:lgres_at_lgMarkerColors><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerColors>
> = (/ "White", "Black", "Black"/)
> lgres_at_lgMarkerSizes <mailto:lgres_at_lgMarkerSizes><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerSizes>
> = (/ 0.0001, 0.004, 0.004/)
> lgres_at_lgLineColors <mailto:lgres_at_lgLineColors><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLineColors>
> = (/ "White", "Black", "Black",\
> "SlateBlue1", "DarkGreen",
> "Black", "Blue1", "Dark Orange", "DarkGreen",
> "Yellow", "Red" /) ; colors for legend lines
> lgres_at_lgDashIndexes <mailto:lgres_at_lgDashIndexes><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgDashIndexes>
> = (/ 0, 0, 0,\
> 2, 2,
> 2, 0, 0, 0,
> 0, 0 /) ; dash indexes
> legend_labels = (/"Tropical Cyclone No.","1200 UTC Position/Date", \
> "0000 UTC Position","Remnant Low","Tropical Wave", \
> "Extratropical","Subtropical Dep.","Subtropical
> Storm",\
> "Tropical Dep.","Tropical Storm (T)","Hurricane (H)"/)
>
> legend = gsn_create_legend(wks,10,legend_labels,lgres)
> yoffset_day = -0.0858
> yoffset_storm = -0.0910
> else
>
> lgres_at_lgLabelFont <mailto:lgres_at_lgLabelFont><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFont>
> = 0
> lgres_at_lgLabelFontHeightF <mailto:lgres_at_lgLabelFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFontHeightF>
> = 0.004
> lgres_at_lgLabelFontAspectF <mailto:lgres_at_lgLabelFontAspectF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelFontAspectF>
> = 1.2
> lgres_at_lgLabelConstantSpacingF <mailto:lgres_at_lgLabelConstantSpacingF><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLabelConstantSpacingF>= 0.0
> lgres_at_lgItemCount <mailto:lgres_at_lgItemCount><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgItemCount>
> = 6
> lgres_at_lgItemTypes <mailto:lgres_at_lgItemTypes><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgItemTypes>
> = (/"Markers","Markers","Markers","Lines" ,"Lines" ,"Lines"/)
> lgres_at_lgLineColors <mailto:lgres_at_lgLineColors><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLineColors>
> = (/"White", "Black" ,"Black" ,"DarkGreen","Yellow","Red" /) ; colors
> for legend lines
> lgres_at_lgLineThicknesses <mailto:lgres_at_lgLineThicknesses><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgLineThicknesses>
> = (/ 0.1, 0.1, 0.1, 4.0, 4.0, 4.0/)
> lgres_at_lgDashIndexes <mailto:lgres_at_lgDashIndexes><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgDashIndexes>
> = (/ 0, 0, 0, 0, 0, 0/)
> lgres_at_lgMarkerIndexes <mailto:lgres_at_lgMarkerIndexes><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerIndexes>
> = (/ 0, 4, 16, 0, 0, 0/)
> lgres_at_lgMarkerColors <mailto:lgres_at_lgMarkerColors><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerColors>
> = (/"White", "Black" , "Black"/)
> lgres_at_lgMarkerSizes <mailto:lgres_at_lgMarkerSizes><http://hk.mc191.mail.yahoo.com/mc/compose?to=lgres@lgMarkerSizes>
> = (/ 0.0001, 0.004, 0.004/)
> gsn_legend_ndc(wks,5,(/"Tropical Cyclone No.","1200 UTC
> Position/Date","0000 UTC Position",\
> "Tropical Dep.","Tropical Storm (T)","Hurricane
> (H)"/),xlegend,ylegend,lgres) yoffset_day = -0.0750 ; offsets for the
> case where we don't plot all the extra cases
> yoffset_storm = -0.0875
> end if
>
> ; Now draw a day label on the legend
> txres_at_txPerimOn <mailto:txres_at_txPerimOn><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimOn>
> = False
> txres_at_txFontHeightF <mailto:txres_at_txFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>
> = 0.0022
> txres_at_txPerimSpaceF <mailto:txres_at_txPerimSpaceF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 0.0
> txres_at_txJust <mailto:txres_at_txJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txJust>
> = "CenterCenter"
> txres_at_gsnDraw <mailto:txres_at_gsnDraw><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@gsnDraw>
> = False
> ;
> ; Note: the X and Y positions in this case don't matter, because the
> ; text will get repositioned in the "gsn_add_anotation" function.
> ;
> number_text = gsn_create_text(wks,"21",txres)
> ; Draw storm number on the legend txres@txFontHeightF
> <mailto:txres_at_txFontHeightF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txFontHeightF>= 0.0028
> txres_at_txPerimOn <mailto:txres_at_txPerimOn><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimOn>
> = True
> txres_at_txPerimColor <mailto:txres_at_txPerimColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimColor>
> = "Black"
> txres_at_txPerimThicknessF <mailto:txres_at_txPerimThicknessF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimThicknessF>
> = 1.0
> txres_at_txPerimSpaceF <mailto:txres_at_txPerimSpaceF><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txPerimSpaceF>
> = 0.4
> txres_at_txBackgroundFillColor <mailto:txres_at_txBackgroundFillColor><http://hk.mc191.mail.yahoo.com/mc/compose?to=txres@txBackgroundFillColor>= "White"
> three_text = gsn_create_text(wks,"3",txres) ;
> ; Add the various text and legend annotations to the plot.
> ;
> amres_at_amParallelPosF <mailto:amres_at_amParallelPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amParallelPosF>
> = -0.13
> amres_at_amOrthogonalPosF <mailto:amres_at_amOrthogonalPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amOrthogonalPosF>= -0.48
> amres_at_amJust <mailto:amres_at_amJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amJust>
> = "TopCenter"
> txid4 = gsn_add_annotation(plot,atlantic_text,amres)
> amres_at_amParallelPosF <mailto:amres_at_amParallelPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amParallelPosF>
> = 0.383
> amres_at_amOrthogonalPosF <mailto:amres_at_amOrthogonalPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amOrthogonalPosF>= 0.470
> amres_at_amJust <mailto:amres_at_amJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amJust>
> = "BottomRight"
> txid5 = gsn_add_annotation(plot,number_text,amres)
> amres_at_amParallelPosF <mailto:amres_at_amParallelPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amParallelPosF>
> = 0.3815
> amres_at_amOrthogonalPosF <mailto:amres_at_amOrthogonalPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amOrthogonalPosF>= 0.479
> amres_at_amJust <mailto:amres_at_amJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amJust>
> = "BottomRight"
> txid6 = gsn_add_annotation(plot,three_text,amres)
> amres_at_amParallelPosF <mailto:amres_at_amParallelPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amParallelPosF>
> = 0.49
> amres_at_amOrthogonalPosF <mailto:amres_at_amOrthogonalPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amOrthogonalPosF>= 0.49
> amres_at_amJust <mailto:amres_at_amJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amJust>
> = "BottomRight"
> annoid1 = gsn_add_annotation(plot,legend,amres)
> amres_at_amJust <mailto:amres_at_amJust><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amJust>
> = "BottomCenter"
> amres_at_amParallelPosF <mailto:amres_at_amParallelPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amParallelPosF>
> = 0.00
> amres_at_amOrthogonalPosF <mailto:amres_at_amOrthogonalPosF><http://hk.mc191.mail.yahoo.com/mc/compose?to=amres@amOrthogonalPosF>= 0.49
> annoid2 = gsn_add_annotation(plot,lambert_text,amres)
> draw(plot)
> frame(wks)
>
> end
>
>
> ------------------------------------------------------------------------
> Yahoo!­»´ä´£¨Ñºô¤W¦w¥þ§ð²¤¡A±Ð§A¦p¦ó¨¾½d¶Â«È!*¤F¸Ñ§ó¦h* <http://hk.promo.yahoo.com/security/><http://hk.promo.yahoo.com/security/>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> ------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> -----¤º§t¤U¦Cªþ¥ó-----
>
> ;********************************************************
> ; track_one.ncl
> ;
> ; Author: Jonathan Vigh (with assistance from Mary Haley)
> ; Location: Colorado State University
> ;
> ;
> ; The purpose of this script is to plot the best track
> ; for jut one storm including all data (subtropical
> ; storms, depressions, extrtropical lows, etc.)
> ;
> ; For future work - fix up annotations with new NCL annotation
> functionality.
> ; ALSO, see about controlling the lat/lon tickmark spacing using
> ; a resource like gsnMajorLatSpacing.
> ;
> ;********************************************************
> 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/csm/shea_util.ncl"
>
> begin
>
> fili = "BAL131998.DAT"
> name = "Mitch"
> ssn = "13"
>
> ; Next, set the plotting parameters (which cases to plot)
> TypeOn = True ; If you just want the legend to have
> the basic (H, TS, and TD) designators (* and S), set TypeOn to False
> ; NOTE -- this will cause the program to grab a
> different input file -- one in which all the
> ; extratropical (E), remnant low (L), and wave cases
> (W) have been taken out; additionally,
> ; there will not be a distinction between the S and *
> cases (they will just be plotted according to
> ; intensity
>
> PlotSubTropicalSegments = True ; If you wish to exclude all
> subtropical line segments, set to False
>
> ; Note: if TypeOn is set to False, the following (W, L, E) cases won't be
> plotted regardless of their value
> PlotWaveSegments = True ; If you wish to exclude all wave
> segments, set to False
> PlotLowSegments = True ; If you wish to exclude all remnant
> low segments, set to False
> PlotExtraTropicalSegments = True ; If you wish to exclude all
> extratropical line sements, set to False
>
>
>
> ;********************************
> ; get data
> ;********************************
> tStr = asciiread(fili, -1,"string") ; Info includes type so cases
> can be weeded out
>
> tChr = stringtochar(tStr)
>
> nrows = dimsizes(tStr)
>
>
> sn = stringtoint( chartostring(tChr(:,0:1)) )
> year = stringtoint( chartostring(tChr(:,2:3)) )
> month = stringtoint( chartostring(tChr(:,4:5)) )
> day = stringtoint( chartostring(tChr(:,6:7)) )
> hour = stringtoint( chartostring(tChr(:,8:9)) )
>
> lat = stringtofloat( chartostring(tChr(:,10:13)) )/10.0
> lon = -stringtofloat( chartostring(tChr(:,15:18)) )/10.0
> vmax = stringtoint( chartostring(tChr(:,21:23)) )
>
> type = chartostring(tChr(:,30:30))
>
> ; Now create arrays that only hold the points for the 00z locations
> lat0 = mask(lat,hour,0)
> lon0 = mask(lon,hour,0)
>
> lat12 = mask(lat,hour,12)
> lon12 = mask(lon,hour,12)
> day12 = mask(day,hour,12)
>
>
> ;********************************
> ; select sub-regions
> ;********************************
> minlat = 5.0 ;min(lat) ; 0.0 ; deg N ; was 0
> maxlat = 30.0 ;max(lat) ; 57.0 ; deg N ; was 57
> minlon = -95.0 ; min(lon) -.;-100.0 ; - deg E = deg W ; was
> -100
> maxlon = -70.0 ; max(lon) +10.; -10.0 ; - deg E = deg W ; was
> -20, then -15
>
> ;***** Define some NICE color maps to use.
> colors_8 =
> (/"White","Black","Black","MediumPurple1","MediumPurple3","Blue1",\
> "CadetBlue3","Aquamarine2", \
> "Gold","Tan1","Sienna1","Tomato","VioletRed1", \
> "Yellow","LimeGreen","Grey37","Red","Orange","GoldenRod1", \
> "DarkOrange","SteelBlue1","SlateBlue1","SlateGray1", \
> "LightSlateBlue","Magenta","DodgerBlue", \
> "LightSteelBlue1","Moccasin","LightYellow","LemonChiffon1", \
> "CornSilk","LightGoldenrodYellow","Tan","PaleTurquoise3"/)
>
>
> ;********************************
> ; create plot
> ;********************************
> wks = gsn_open_wks("eps",name)
>
> gsn_define_colormap(wks,colors_8)
>
> res = True
>
> ; res@gsnMaximize = True
> res@gsnDraw = False ; so we can add poly stuff
> res@gsnFrame = False ; do not advance frame
>
> res@gsnMaximize = True
>
> ; res@gsnPaperOrientation = "portrait"
>
> res@mpDataBaseVersion = "Ncarg4_1" ; Alias 'MediumRes'
> res@mpDataSetName = "Earth..1"
> ; res@mpProjection = "LambertConformal"
>
> res@mpLambertParallel1F = 20.0
> res@mpLambertParallel2F = 40.0
> res@mpLambertMeridianF = -60.0
>
> res@mpLimitMode = "LatLon"
>
> res@mpMinLatF = minlat
> res@mpMaxLatF = maxlat
> res@mpMinLonF = minlon
> res@mpMaxLonF = maxlon
>
> res@mpFillOn = True ; False to turn off gray continents
> res@mpOutlineOn = True ; turn on continental outline
> res@mpOutlineBoundarySets = "AllBoundaries"
>
> res@mpLandFillColor = "Tan" ; was "GoldenRod1"
> res@mpInlandWaterFillColor = "PaleTurquoise3" ; was "LightBlue1" ;
> was "PaleTurquoise3"
> res@mpOceanFillColor = "PaleTurquoise3" ; was "LightBlue1"
>
> res@mpGeophysicalLineColor = "Grey37"
> res@mpGeophysicalLineThicknessF = 0.5
>
> res@mpUSStateLineColor = "Grey37"
> res@mpUSStateLineThicknessF = 0.5
>
> res@mpNationalLineColor = "Grey37"
> res@mpNationalLineThicknessF = 0.5
>
> res@mpGridAndLimbOn = "True"
> res@mpGridAndLimbDrawOrder = "Draw"
> res@mpGridMaskMode = "MaskLand"
> res@mpGridSpacingF = 5.0
> res@mpGridLineColor = "Grey37"
>
> res@tmXBLabelFontHeightF = 0.012 ; 0.005
> res@tmXBMajorLengthF = -0.001
>
> res@pmTickMarkDisplayMode = "Always"
>
> ; res@tiMainString = "Hurricane Wilma (2005)"
>
> ;***************************************
> ; plot base map *
> ;***************************************
>
> plot = gsn_csm_map(wks,res) ; draw one of eight map projections
>
>
> ;***************************************
> ; Draw best track history as polylines *
> ;***************************************
> res_poly = True ; polyline mods desired
>
> ; create array of dummy graphic variables. This is required, b/c each line
> ; must be associated with a unique dummy variable.
>
> dum = new(dimsizes(hour),graphic)
>
> ic = 0
> do k=0,nrows-2
>
> if(.not.ismissing(lat(k)))
>
> res_poly@gsLineDashPattern = 0
> res_poly@gsLineThicknessF = 4
>
> if(.not. TypeOn) then
>
> ; Plot hurricane segments
> if((vmax(k).gt.64).and.(type(k).eq."*")) then
> res_poly@gsLineColor = "Red"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> ; Plot tropical storm segments
> if((vmax(k).lt.64).and.(vmax(k).gt.34).and.(type(k).eq."*"))
> then
> res_poly@gsLineColor = "Yellow"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> ; Plot tropical depression segments
> if((vmax(k).lt.34).and.(type(k).eq."*")) then
> res_poly@gsLineColor = "LimeGreen"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> ; Now plot the subtropical segments with dashed lines
>
> ; Plot hurricane segments of subtropical systems with dashed red lines
> if((vmax(k).gt.64).and.(type(k).eq."S")) then
> res_poly@gsLineColor = "Red"
> res_poly@gsLineDashPattern = 2
> res_poly@gsLineDashSegLenF = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> ; Plot tropical storm segments of subtropical systems with dashed yellow
> lines
> if((vmax(k).lt.64).and.(vmax(k).gt.34).and.(type(k).eq."S"))
> then
> res_poly@gsLineColor = "Yellow"
> res_poly@gsLineDashPattern = 2
> res_poly@gsLineDashSegLenF = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> ; Plot tropical depression segments of subtropical systems with dashed dark
> LimeGreen lines
> if((vmax(k).lt.34).and.(type(k).eq."S")) then
> res_poly@gsLineColor = "LimeGreen"
> res_poly@gsLineDashPattern = 2
> res_poly@gsLineDashSegLenF = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> else ; if(TypeOn) -- plot pure tropical segments as solid lines (red for
> hurricane, etc.).
>
> ; Plot hurricane segments
> if((vmax(k).gt.64).and.(type(k).eq."*")) then
> res_poly@gsLineColor = "Red"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> ; Plot tropical storm segments
> if((vmax(k).lt.64).and.(vmax(k).gt.34).and.(type(k).eq."*"))
> then
> res_poly@gsLineColor = "Yellow"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> ; Plot tropical depression segments
> if((vmax(k).lt.34).and.(type(k).eq."*")) then
> res_poly@gsLineColor = "LimeGreen"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> if(PlotWaveSegments) then
>
> ; Plot tropical wave segments
> if(type(k).eq."W") then
> res_poly@gsLineColor = "LimeGreen"
> res_poly@gsLineDashPattern = 2
> res_poly@gsLineDashSegLenF = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
>
>
> if(PlotLowSegments) then
>
> ; Plot remanant low segments
> if(type(k).eq."L") then
> res_poly@gsLineColor = "SlateBlue"
> res_poly@gsLineDashPattern = 2
> res_poly@gsLineDashSegLenF = 0.1
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
>
>
> if(PlotSubTropicalSegments) then
>
> ; Plot subtropical storm segments
> if((vmax(k).gt.34).and.(type(k).eq."S")) then
> res_poly@gsLineColor = "DarkOrange"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> ; Plot subtropical depression segments
> if((vmax(k).lt.34).and.(type(k).eq."S")) then
> res_poly@gsLineColor = "Blue1"
> dum(ic) =
> gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
>
> end if
>
>
> if(PlotExtraTropicalSegments) then
>
> ; Plot extratropical segments
> if(type(k).eq."E") then
> res_poly@gsLineColor = "Black"
> res_poly@gsLineDashPattern = 2
> res_poly@gsLineDashSegLenF = 0.1
> dum(ic) = gsn_add_polyline(wks,plot,lon(k:k+1),lat(k:k+1),res_poly)
> ic = ic + 1
> end if
> end if
> end if
>
> end if
>
> end do
>
>
> ;***************************************
> ; Draw black dots at lat/lon itersections
> ;***************************************
>
>
> ;***************************************
> ; Draw black polymarkers at 00Z locations
> ;***************************************
> res_mark = True
>
> res_mark@gsMarkerIndex = 1 ; polymarker style
> res_mark@gsMarkerSizeF = 0.02 ; polymarker size - was 0.012
> res_mark@gsMarkerColor = "Black" ; change marker color
>
> duma = new(1,graphic)
> duma = gsn_add_polymarker(wks,plot,lon0,lat0,res_mark)
>
>
> ; Now draw white polymarkers at 12z locations
> res_mark@gsMarkerIndex = 1
> res_mark@gsMarkerSizeF = 0.02 ; polymarker size - was 0.012
> res_mark@gsMarkerColor = "White" ; change marker color
>
>
> dumb = new(1,graphic)
> dumb = gsn_add_polymarker(wks,plot,lon12,lat12,res_mark)
>
>
> ;***************************
> ; Plot some text labels *
> ;***************************
> txres = True
>
> ; Now draw the day labels at each 00Z marker
> txres@txFontHeightF = 0.015 ; 0.008
> txres@txJust = "TopCenter"
>
> dumz = new(nrows,graphic)
>
> do k=0,nrows-1
> dumz(k) =
> gsn_add_text(wks,plot,day12(k),lon12(k),lat12(k)-0.25,txres)
> end do
>
> draw(wks)
>
>
> ; Draw storm number (actually these are strings) at beginning of track
>
> txres@txFontHeightF = 0.02 ; 0.0044
> txres@txJust = "CenterLeft"
>
> txres@txPerimOn = True
> txres@txPerimColor = "Black"
> txres@txPerimThicknessF = 1.0
> txres@txPerimSpaceF = 0.4
> txres@txBackgroundFillColor = "White"
>
> ; gsn_text(wks,plot,ssn,lon(0)+0.6,lat(0),txres)
>
>
> ; Now draw them at the end
> txres@txJust = "BottomRight"
> ; gsn_text(wks,plot,ssn,lon(nrows-1),lat(nrows-1),txres)
>
>
> if (.not. TypeOn) then
> txres@txFontHeightF = 0.02 ; 0.006
> txres@txJust = "CenterCenter"
> txres@txPerimSpaceF = 0.7
> txres@txPerimThicknessF = 1.5
> txres@txConstantSpacingF = 1.0
> txres@txFontAspectF = 1.5
> txres@txFontThicknessF = 0.8
> gsn_text_ndc(wks,"~F02~ Remnant low, tropical wave, and ~C~
> extratropical stages are not shown. ~C~~C~ Subtropical stages are
> dashed.",0.715,0.680,txres)
> end if
>
> txres@txFontHeightF = 0.005
> txres@txPerimThicknessF = 1.5
> txres@txPerimSpaceF = 1.0
> txres@txConstantSpacingF = 1.0
> txres@txFontAspectF = 1.5
> txres@txFontThicknessF = 0.8
>
>
> ;******************
> ; Plot a legend *
> ;******************
> lgres = False
>
> lgres@lgAutoManage = False
>
> lgres@vpWidthF = 0.2 ; was 0.1 ; width of legend
> (NDC)
> lgres@vpHeightF = 0.2 ; was 0.1 ; height of legend
> (NDC)
> ; lgres@lgBottomMarginF = 0.17 ; was 0.25
>
> lgres@lgPerimFill = 0 ; Use solid fill (0)
> instead of the default hollow fill
> lgres@lgPerimFillColor = "Background"
>
> ; lgres@lgBoxMajorExtentF = 0.4
> lgres@lgBoxMinorExtentF = 0.2 ; controls how wide the box holding the
> legend items (lines and markers) can be in relation to legend
>
> ; lgres@lgBoxBackground = "PaleTurquoise3"
>
> lgres@lgMonoItemType = False ; indicates that we
> wish to set the item types individually
> lgres@lgMonoMarkerIndex = False
> lgres@lgMonoLineThickness = False
> lgres@lgMonoMarkerThickness = False
> lgres@lgMonoMarkerSize = False
>
> ; position fine elements of legend relative to some positional values:
> xlegend = 0.66 ; 0.820
> ylegend = 0.35 ; 0.290
>
>
> if(TypeOn) then
>
> lgres@lgLabelFont = 0
> lgres@lgLabelFontHeightF = 0.012 ; 0.004
> lgres@lgLabelFontAspectF = 1.2
> lgres@lgLabelConstantSpacingF = 0.0
>
> lgres@lgItemCount = 11
> lgres@lgLineDashSegLenF = 0.1
> lgres@lgItemTypes =
> (/"Markers","Markers","Markers","Lines","Lines","Lines","Lines","Lines","Lines","Lines","Lines"/)
> lgres@lgMarkerIndexes = (/ 1, 4, 16, 0,
> 0, 0, 0, 0, 0, 0, 0/)
> lgres@lgLineThicknesses = (/ 0.1, 0.1, 0.1, 4.0,
> 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0/)
> lgres@lgMarkerColors = (/ "White", "Black", "Black"/)
> lgres@lgMarkerSizes = (/ 0.0001, 0.004, 0.004/)
> lgres@lgLineColors = (/ "White", "Black", "Black",\
> "SlateBlue1", "LimeGreen", "Black",
> "Blue1", "Dark Orange", "LimeGreen", "Yellow",
> "Red" /) ; colors for legend lines
> lgres@lgDashIndexes = (/ 0, 0, 0,\
> 2, 2, 2,
> 0, 0, 0, 0,
> 0 /) ; dash indexes
>
> ; gsn_legend_ndc(wks,10, (/"Tropical Cyclone No.","1200 UTC
> Position/Date","0000 UTC Position",\
> ; "Remnant Low","Tropical
> Wave","Extratropical","Subtropical Dep.","Subtropical Storm","Tropical
> Dep.","Tropical Storm (T)","Hurricane (H)"/),xlegend,ylegend,lgres)
>
> yoffset_day = -0.0858
> yoffset_storm = -0.0910
>
> else
>
> lgres@lgLabelFont = 0
> lgres@lgLabelFontHeightF = 0.004
> lgres@lgLabelFontAspectF = 1.2
> lgres@lgLabelConstantSpacingF = 0.0
>
> lgres@lgItemCount = 6
> lgres@lgItemTypes = (/"Markers","Markers","Markers","Lines"
> ,"Lines" ,"Lines"/)
> lgres@lgLineColors = (/"White", "Black" ,"Black"
> ,"LimeGreen","Yellow","Red" /) ; colors for legend lines
> lgres@lgLineThicknesses = (/ 0.1, 0.1, 0.1,
> 4.0, 4.0, 4.0/)
> lgres@lgDashIndexes = (/ 0, 0, 0,
> 0, 0, 0/)
> lgres@lgMarkerIndexes = (/ 0, 4, 16,
> 0, 0, 0/)
> lgres@lgMarkerColors = (/"White", "Black" , "Black"/)
> lgres@lgMarkerSizes = (/ 0.0001, 0.004, 0.004/)
>
> ; gsn_legend_ndc(wks,5,(/"Tropical Cyclone No.","1200 UTC
> Position/Date","0000 UTC Position",\
> ; "Tropical Dep.","Tropical Storm (T)","Hurricane
> (H)"/),xlegend,ylegend,lgres)
>
> yoffset_day = -0.0750 ; offsets for the case where we don't plot
> all the extra cases
> yoffset_storm = -0.0875
>
> end if
>
> ; Now draw a day label on the legend
>
> txres@txPerimOn = False
> txres@txFontHeightF = 0.01
> txres@txPerimSpaceF = 0.0
> txres@txJust = "CenterCenter"
>
> ; gsn_text_ndc(wks,"21",xlegend + 0.0183, ylegend + yoffset_day,txres)
>
>
> ; Draw storm number on the legend
> txres@txFontHeightF = 0.004
>
> txres@txPerimOn = True
> txres@txPerimColor = "Black"
> txres@txPerimThicknessF = 1.0
> txres@txPerimSpaceF = 0.4
> txres@txBackgroundFillColor = "White"
>
> ; gsn_text_ndc(wks,"3",xlegend + 0.0142, ylegend + yoffset_storm,txres)
>
> ; drawNDCGrid(wks) ; Use to put on a grid for fine-tuning placement
>
> frame(wks)
>
> end
>
>
> ------------------------------
> Yahoo!­»´ä´£¨Ñºô¤W¦w¥þ§ð²¤¡A±Ð§A¦p¦ó¨¾½d¶Â«È!*¤F¸Ñ§ó¦h* <http://hk.promo.yahoo.com/security/>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 3 04:52:21 2010

This archive was generated by hypermail 2.1.8 : Tue Aug 03 2010 - 15:09:38 MDT