pro print_plan,old_plan,color=color,nmc=nmc,airspeed=airspeed,psfile=psfile,scale0=scale0,$ solar_zenith_cont=solar_zenith_cont,dir=dir ;+ ; this routine prints the mini_plan - ; old_plan is the file name of the flight plan, string ; color - keyword to generate a color file ; nmc - used nmc forecast instead of dao ; psfile - name of postscript file (default idl.ps) ; scale0 = scale parameter for map ; ;- set_plot,'PS' device,bits_per_pixel=8,file=psfile,/landscape,/color,/bkman if n_elements(dir) eq 0 then dir='Macintosh HD:Applications:RSI:IDL 5.2:my idl stuff:' if keyword_set(color) then loadct,39 else loadct,0 ; set_plot,'MAC' ; used for tests ;start ; used for tests if n_elements(psfile) eq 0 then psfile='idl.ps' theta=480. proj=4 if n_elements(airspeed) eq 0 then airspeed=820. ; DC-8 speed in km/hr !quiet=1 if n_elements(date) eq 0 then date=today(3) while !d.window ne -1 do tvdelete,!d.window if n_elements(scale0) eq 0 then scale0=6.0e7 if n_elements(lat_home) eq 0 then lat_home=67.84 if n_elements(lon_home) eq 0 then lon_home=20.41 if n_elements(lat00) eq 0 then lat00=lat_home if n_elements(lon00) eq 0 then lon00=lon_home if n_elements(city) eq 0 then city='Kiruna' if n_elements(local_to_gmt) eq 0 then local_to_gmt=1. if n_elements(takeoff_time) eq 0 then takeoff_time=9. if n_elements(scale0) gt 0 then scale1=scale0 if n_elements(old_plan) gt 0 then begin lat_pathx=0. lon_pathx=0. restore,dir+old_plan ;,takeoff_time,lat00,lon00,lat_home,lon_home,city,lat_path,lon_path lat_home=lat_pathx(0) lon_home=lon_pathx(0) endif else stop,'need name of flight plan' if n_elements(scale1) gt 0 then scale0=scale1 ; override scale0 date_arr=strarr(4) for j=0,3 do date_arr(j)=today(j) n=where(date_arr eq date) id_date=n(0) lat_path=[lat_home] ; way point locations lon_path=[lon_home] local_to_gmt=float(local_to_gmt) takeoff_gmt=takeoff_time-local_to_gmt lat_pathd=lat_path ; the path with a denser series of points lon_pathd=lon_path flttime=[0] ; way point flight times flttimed=flttime ; a denser series of flight times yr=fix(strmid(date,0,2)) mon=fix(strmid(date,2,2)) day=fix(strmid(date,4,2)) dy19=day1900(yr,mon,day) read_sage2,dd,sage_lat,sage_lon,dir=dir read_haloe,ddh,haloe_lat,haloe_lon,dir=dir read_poam,ddp,poam_lat,poam_lon,dir=dir read_forecast,date,pv_arr,t_arr,m_arr,lats,lons,theta,err=data_err,source=source,nmc=nmc, $ rdf=rdf,trop_hgt=trop_hgt,badvals=badvals,standard=standard,dir=dir ; draw the map of the region and overplot fields map_set,lat00,lon00,proj=proj,scale=scale0,title=str(theta)+'K PV '+source+' '+nicedate(date)+$ ' Takeoff GMT= '+hrsmins(takeoff_gmt)+ ' Local= '+hrsmins(takeoff_time),position=[.1,.45,.65,0.95 ] sat_col=255 path_col=200 if data_err eq 0 then begin sat_col=0 path_col=20 field_map,pv_arr,t_arr,m_arr,lons,lats,theta,rdf,trop_hgt,lat_home,lon_home endif map_continents,col=230,/countries,/coasts map_grid ; plot 4 hour range ring range_ring,lat_home,lon_home,airspeed*4,360,bearing,latp,lonp oplot,lonp,latp,col=50 ; plot great circle route from dryden to kiruna gr_circ_rte,34.9,360.-117.9,67.84,20.48,30,bearing,dist,del,latp,lonp,rd oplot,lonp,latp,col=50 ; plot 500 km range rings out to 3000 km for j=500,3000,500 do begin ; 500 km range rings range_ring,lat_home,lon_home,j,360,bearing,latp,lonp oplot,lonp,latp,col=75 endfor ; plot location of city oplot,[lon_home],[lat_home],psym=1,col=80 xyouts,lon_home,lat_home,city,col=sat_col symb,10,/fill sat_col=255 ; plot poam points plot_sat_points,ddp,dy19,takeoff_gmt,poam_lat,poam_lon,sat_col,local_to_gmt,times=poam_times,sat_char=' ' ; plot sage 2 points if not keyword_set(no_sage) then $ plot_sat_points,dd,dy19,takeoff_gmt,sage_lat,sage_lon,sat_col,local_to_gmt,times=sage_times,sat_char=' S',/noarrow ; plot haloe points if not keyword_set(no_haloe) then $ plot_sat_points,ddh,dy19,takeoff_gmt,haloe_lat,haloe_lon,sat_col,local_to_gmt,times=haloe_times,sat_char=' H',/noarrow if keyword_set(solar_zenith_cont) then begin latbase=findgen(60)*2.-30. lonbase=findgen(91)*4. sz2d=fltarr(n_elements(lonbase),n_elements(latbase)) for j=0,n_elements(latbase)-1 do $ for i=0,n_elements(lonbase)-1 do $ sz2d(i,j)=solar_zenith(latbase(j),lonbase(i),mon=mon,day=day,year=yr,hour=takeoff_gmt+flttime) contour,sz2d,lonbase,latbase,c_col=220,/over,/follow,levels=[70.,75.,80.,85.,90.,95.,100.,105.] endif ; ok all done with set up istar=1 ; back to map window xx: ; find a location symb,12 lat0=lat_pathx(istar) lon0=lon_pathx(istar) istar=istar+1 ; now decide if this is a permanent point xx1=1 if istar gt n_elements(lat_pathx)-1 then xx1=-1 ns=n_elements(lat_path) oldlat=lat_path(ns-1) oldlon=lon_path(ns-1) ; go to map window and plot the path gr_circ_rte,oldlat,oldlon,lat0,lon0,20,bearing,dist2,del,latp,lonp,rdx oplot,[lon0],[lat0],psym=8 xyouts,lon0,lat0,' '+str(istar),size=0.8 oplot,lonp,latp,col=path_col,thick=5 lat_path=[lat_path,lat0] lon_path=[lon_path,lon0] lat_pathd=[lat_pathd,latp] lon_pathd=[lon_pathd,lonp] gr_circ_rte,oldlat,oldlon,lat0,lon0,2,bearing,dist,del,latp,lonp,rd flttime=[flttime,flttime(ns-1)+dist/airspeed] nss=n_elements(flttimed) flttimed=[flttimed,flttimed(nss-1)+rdx/airspeed] if xx1 eq -1 then goto,quitit ; quit plotting points and clean up goto,xx print,'out of range' quitit: ; legend xyouts,.7,.96,' Flight Plan: '+old_plan,/normal xyouts,.68,.92,'Legend',/normal xyouts,.68,.88,'Background: MPV at '+str(theta)+'K',/normal xyouts,.68,.86,'Gray rings: 500 km from origin',/normal xyouts,.68,.84,'Outer ring: 4 hours from origin',/normal xyouts,.68,.82,'Dashed contours: Stream function',/normal xyouts,.68,.80,'Thick contours: Temperature',/normal xyouts,.68,.78,'Thick dashed contours: NAT and Ice',/normal ;xyouts,.68,.76,'Thin white lines: SZA contours at takeoff',/normal xyouts,.68,.74,'Black dots: Satellite overpass',/normal xyouts,.68,.72,'Black dot legend: sat:day:hh:mm',/normal xyouts,.68,.70,'sat key: H=Haloe, S=Sage, _=Poam',/normal ; plot way points angles xyouts,.68,.6,'Way Time GMT Lat Lon ',/normal gmt_time=flttime+takeoff_gmt n=where(gmt_time gt 24.) if n(0) ge 0 then gmt_time(n)=gmt_time(n)-24. for j=0,n_elements(flttime)-1 do begin if j+1 lt 10 then crr=' ' else crr='' prstr=crr+str(j+1)+' '+hrsmins(flttime(j))+' '+hrsmins(gmt_time(j))+string(lat_path(j),format='(f6.1)')+$ string(lon_path(j),format='(f8.1)') xyouts,.7,.55-j*.02,prstr,/normal endfor szz=solar_zenith(lat_path,lon_path,mon=mon,day=day,year=yr,hour=takeoff_gmt+flttime) ; szzm=solar_zenith(lat_path,lon_path,mon=mon,day=day,year=yr,hour=takeoff_gmt+flttime,/moon) szzd=solar_zenith(lat_pathd,lon_pathd,mon=mon,day=day,year=yr,hour=takeoff_gmt+flttimed) ; szzmd=solar_zenith(lat_pathd,lon_pathd,mon=mon,day=day,year=yr,hour=takeoff_gmt+flttimed,/moon) position=[.1,.1,.57,.4] if data_err eq 0 then open_axis=1 else open_axis=0 zen_plot,date,takeoff_time,takeoff_gmt,poam_times,sage_times,haloe_times,/noerase,position=position,open_axis=open_axis,$ title='SZA, MPV and Temp. '+str(theta)+'K '+nicedate(date),/nomoon oplot,flttime+takeoff_time,szz,psym=1 ; oplot,flttime+takeoff_time,szzm,psym=1 oplot,flttimed+takeoff_time,szzd ; oplot,flttimed+takeoff_time,szzmd,linestyle=1 for j=0,n_elements(szz)-1 do xyouts,flttime(j)+takeoff_time,szz(j),' '+str(j+1),size=.6,noclip=0 if lons(0) eq 180. then begin pv_arr2=rotate_array(pv_arr,lons,outlon=lons2) t_arr2=rotate_array(t_arr,lons,outlon=lons2) endif else begin s=size(pv_arr) pv_arr2=pv_arr(0:s(1)-2,*) t_arr2=t_arr(0:s(1)-2,*) lons2=lons(0:s(1)-2) endelse pv=latlonintrp(pv_arr2,lons2,lats,lon_pathd,lat_pathd,/wrap,/reglon,/regular) temper=latlonintrp(t_arr2,lons2,lats,lon_pathd,lat_pathd,/wrap,/regular) yrange=[1.0,2.5] legend,['solar','MPV','T'],lines=[0,2,1],box=0 axis,yaxis=1,yrange=yrange,/save,ytitle='MPV oplot,flttimed+takeoff_time,pv,linest=2 xtend=11.2 xrange=takeoff_time+[0,xtend] if data_err eq 0 then begin plot,[0],[0],title=title,xrange=xrange,yrange=[180,220],$ ytitle='Zenith Angle',xst=5,yst=5,/noerase,position=[position(0),position(1),position(0)+(position(2)-position(0))*xtend/10.,position(3)] axis,yaxis=1,yrange=[180,220],/save,ytitle='Temperature oplot,flttimed+takeoff_time,temper,linesty=1 tnat=nat_theta(10.e-9,4.e-6,theta,type=1) tice=frost_theta(4.e-6,theta) oplot,takeoff_time+[0,10.],[tnat,tnat],linest=1 xyouts,takeoff_time+.5,tnat,'NAT',/data oplot,takeoff_time+[0,10.],[tice,tice],linest=1 xyouts,takeoff_time+.5,tice,'ICE',/data endif empty print,'Postscript file: '+dir+psfile device,/close return end