;***************************************************************************** ; Author : Josh Grant, COAPS ; Description: Plots a series of divergence strips at a given area for a ; given times span. These are all plotted side by side in order ; to see the day by day changes of the divergence in a given ; area. The variables within the main procedure can be modified ; to adjust the size of the area, width of the area, and area on ; the globe. Missing values are ignored and not shown. ;***************************************************************************** ;@movvec_pros ;@/usr/people/whalley/lidl/jday2date.pro PRO define_common_block common colors, white, rose, dkrose, red, ltyellow, yellow, dkyellow, ltgreen, $ green, dkgreen, ltaqua, aqua, dkaqua, ltblue, blue, dkblue, ltpink, pink, $ dkpink, dkred, ltpurple, purple, dkpurple, ltgray, gray, dkgray, ltbrown, $ brown, dkbrown, black, earth0, earth1, earth2, earth3, earth4, earth5, $ earth6, earth7, earth8, earth9, ice0, ice1, ice2, ice3, ice4, ice5, ice6, $ ice7, ice8, ice9 common map, title, maplimit, mappos, mapcolor, textcolor, poscolor, negcolor, $ elon, elat, eltopo, vhead, maplevels, mapcolors, levels, colors, labels, $ unit, lonlatratio end common colors common map pro mymaptick, limit, textcolor, months, startday, endday, spacing ticklocation, limit(1), limit(3), startlon, endlon, loninterval ticklocation, limit(0), limit(2), startlat, endlat, latinterval s = spacing xsym = [0, 0] & ysym = [-0.6, 0.4] USERSYM, xsym, ysym, COLOR = textcolor FOR i = 0, endday - startday DO BEGIN jday2date, i + startday, month, day, 1997 IF ( day EQ 1 ) THEN BEGIN USERSYM, xsym, ysym * 3, COLOR = textcolor PLOTS, limit(1) + (i*s) + 0.5, limit(0) - 3, PSYM = 8 XYOUTS, limit(1) + (i*s) + 0.5, limit(0) - 9, months( month - 1), $ ALIGNMENT = 0.0, COLOR = textcolor ENDIF ELSE BEGIN IF ( day MOD 5 EQ 0 ) THEN BEGIN USERSYM, xsym, ysym * 2, COLOR = textcolor PLOTS, limit(1) + (i*s) + 0.5, limit(0) - 2, PSYM = 8 XYOUTS, limit(1) + (i*s) + 0.5, limit(0) - 6, STRTRIM(day, 1), $ ALIGNMENT = 0.5, COLOR = textcolor ENDIF ELSE BEGIN xsym = [0, 0] & ysym = [-0.6, 0.4] USERSYM, xsym, ysym, COLOR = textcolor PLOTS, limit(1) + (i*s) + 0.5, limit(0) - 1, PSYM = 8 ENDELSE ENDELSE ENDFOR xsym = [-0.7, 0.2] & ysym = [0, 0] for i = startlat, endlat, latinterval do begin case 1 of (i EQ 0) : str_i = 'EQ' (i LT 0) : str_i = STRTRIM(-i, 1) + 'S' else : str_i = STRTRIM(i, 1) + 'N' endcase IF ( i EQ 0 ) THEN BEGIN xsym2 = [0.0, 1.0] * 179.5 USERSYM, xsym2, ysym, COLOR = textcolor ENDIF ELSE BEGIN USERSYM, xsym, ysym, COLOR = textcolor ENDELSE PLOTS, limit(1) - 2, i, PSYM = 8 XYOUTS, limit(1) - 2, i - 1, str_i, ALIGNMENT = 1.25, COLOR = textcolor endfor end mappos = [0.05, 0.2, 0.95, 0.9] lonlatratio = (mappos(2)-mappos(0))/(mappos(3)-mappos(1)) maplimit = [-20.0, 0, 30.0, 360.0] ; Set color table. setctabdp3 miss = 99999.0 base = "/Net/NSCAT/people/grant/diverg_proj/" dataDirectory = base + "div2grid/data/ytplot/" gifDirectory = base + "div2grid/gifs/ytplot/" mapcolor = black & textcolor = black & poscolor = dkblue & negcolor = dkred ; Contour levels and contour colors of speed. levels = [-124, -24, -20, -16, -12, -8, -4, 0, 4, 8, 12, 16, 20, 24] colors = [dkpurple, purple, ltpurple, dkblue, blue, aqua, ltgray, $ ltgray, ltgreen, green, dkgreen, dkpink, red, dkred] labels = [' ','-24','-20','-16','-12','-8','4','0','4','8','12','16',$ '20','24'] unit = 'x10!U-6!Nsec!U-1!N' months = ['January', 'February', 'March', 'April', 'May', 'June', $ 'July', 'August', 'September', 'October', 'November', 'December'] gif_name = gifDirectory + 'ytplot90e.gif' data_name = gifDirectory + 'ytplot90e.data' miss = 99999.0 startTime = 0l endTime = 0l data = FLTARR( 360, 180 ) newdata = FLTARR( 3, 51, 121 ) temp = FLTARR( 51 ) OPENR, input, data_name, /GET_LUN FOR day = 0, 120 DO BEGIN FOR lon = 0, 2 DO BEGIN READF, input, FORMAT = '(51F10.3)', temp newdata( lon, *, day ) = temp ENDFOR ENDFOR FREE_LUN, input mappostop = [0.05, 0.6, 0.95, 0.9] mapposbottom = [ 0.05, 0.2, 0.95, 0.5 ] lonlatratio = (mappos(2)-mappos(0))/(mappos(3)-mappos(1)) maplimit = [-20.0, 0, 30.0, 240.0] center = '90E' firstday = 60 lastday = 180 spacing = 3 interval = 1 middle = (lastday - firstday)/2 + 1 SET_PLOT, 'Z' !P.BACKGROUND = white dcolor = !D.N_COLORS DEVICE, SET_RESOLUTION = [800, 600], SET_COLORS = dcolor XYOUTS, '!6' ERASE jday2date, firstday, month, day, 1997 date1 = STRTRIM( months( month - 1 ), 1 ) + ' ' + STRTRIM( day, 1 ) $ + ', 1997' jday2date, lastday, month, day, 1997 date2 = STRTRIM( months( month - 1 ), 1 ) + ' ' + STRTRIM( day, 1 ) $ + ', 1997' XYOUTS, /NORMAL, 0.5, 0.96, 'Wind Divergence for ' + date1 + ' - ' $ + date2, ALIGNMENT = 0.5, CHARSIZE = 1.2, CHARTHICK = 1.0, $ COLOR = textcolor XYOUTS, /NORMAL, 0.5, 0.92, 'Centered about ' + center, $ ALIGNMENT = 0.5, CHARSIZE = 1.2, CHARTHICK = 1.0, COLOR = textcolor !P.POSITION = mappostop ; Set map coordinate. polon = (maplimit(1) + maplimit(3)) / 2.0 MAP_SET, /NOERASE, 0, polon, /CYLINDRICAL, LIMIT = maplimit, $ COLOR = mapcolor boxcolor = black x1 = [ mappostop(0), mappostop(2), mappostop(2), mappostop(0) ] y1 = [ mappostop(1), mappostop(1), mappostop(3), mappostop(3) ] x2 = [ mapposbottom(0), mapposbottom(2), mapposbottom(2), mapposbottom(0) ] y2 = [ mapposbottom(1), mapposbottom(1), mapposbottom(3), mapposbottom(3) ] numberoflats = maplimit(2) - maplimit(0) + 1 numberoflons = spacing plotdata = FLTARR( 3, 51 ) FOR day = 0, lastday - firstday DO BEGIN IF ( day GE middle ) THEN BEGIN !P.POSITION = mapposbottom polon = (maplimit(1) + maplimit(3)) / 2.0 MAP_SET, /NOERASE, 0, polon, /CYLINDRICAL, LIMIT = maplimit, $ COLOR = mapcolor plotdata = newdata( *, *, day ) plotdata = REFORM( plotdata ) lat = FINDGEN( numberoflats ) + maplimit(0) lon = FINDGEN( spacing ) + ( day - middle ) * (spacing + 1) - 1 x = [ 0, 0 ] y = [ 0, 1 ] USERSYM, x, y * ( numberoflats ) * .86, COLOR = textcolor PLOTS, lon(spacing - 1 ) + 1, lat(0), PSYM = 8 CONTOUR, plotdata, lon, lat, /OVERPLOT, /CELL_FILL, $ LEVELS = levels, C_COLORS = colors, MAX_VALUE = miss - 1 ENDIF ELSE BEGIN plotdata = newdata( *, *, day ) plotdata = REFORM( plotdata ) lat = FINDGEN( numberoflats ) + maplimit(0) lon = FINDGEN( spacing ) + day * (spacing + 1) - 1 x = [ 0, 0 ] y = [ 0, 1 ] USERSYM, x, y * ( numberoflats ) * .86, COLOR = textcolor PLOTS, lon(spacing - 1 ) + 1, lat(0), PSYM = 8 CONTOUR, plotdata, lon, lat, /OVERPLOT, /CELL_FILL, $ LEVELS = levels, C_COLORS = colors, MAX_VALUE = miss - 1 IF ( day EQ middle - 1 ) THEN BEGIN mymaptick, maplimit, textcolor, months, firstday, $ (firstday + lastday)/2, spacing + interval ENDIF ENDELSE ENDFOR ; Write tick marks and label. mymaptick, maplimit, textcolor, months, firstday + middle, lastday, $ spacing + interval colorbar, labels, colors, unit, 0.10, 0.90, 0.11, $ COLOR = textcolor, YLABEL = 0.055, XUNIT = 0.87, BOXWIDTH = 6.8 XYOUTS, /NORMAL, 0.01, 0.01, '!17Grant', ALIGNMENT = 0.0, $ CHARSIZE = 0.9, CHARTHICk = 1.0, COLOR = textcolor XYOUTS, /NORMAL, 0.99, 0.01, '!17COAPS-FSU 1999', $ ALIGNMENT = 1.0, CHARSIZE = 0.9, CHARTHICk = 1.0, $ COLOR = textcolor image = TVRD() TVLCT, red, green, blue, /GET red = BYTE( red ) green = BYTE( green ) blue = BYTE( blue ) filename = gif_name print, "Done with " + gif_name WRITE_GIF, fileName, image, red, green, blue END