pro plot_gmag,psoutput=psoutput,zbuffer=zbuffer ; ; plot THEMIS gmag stations, eg to produce plots for website ; This is just a routine for my personal use. Based on one given to me by Harald Frey. ; It was used to generate the maps on the gmag webpage (as it stands early 2012) ; ; Separate the stations you want to plot into their own file file = '/home/thmsoc/clrussells_stuff/plot/GMAG-Station-Code-19700101_pg.txt' thm_gmag_stations_fromfile,file, label,location; loadct,1 ;thm_init set_plot,'z' device,set_resolution=[750,500] chars=1.0 ; This is a bad attempt to get the colors to match those Emmanuel chose for the website tvlct, 166, 203, 237, 238 tvlct, 0,0,0,1 tvlct, R, G, B, /get ; map set like asi map ; ; for existing maps, uncomment the relevant lines below to set an appropriate scale and longitude/latitude ; ;map_set,80,90,0.,/stereo,/conti,scale=3.e7,$;58.5 -108 ; color=250,title='AARI GMAGs' map_set,-80,0,0.,/stereo,/conti,scale=3.8e7,$;58.5 -108 color=250,title='Antarctic GMAGs' ;map_set,70,0,0.,/stereo,/conti,scale=2.2e7,$;58.5 -108 ; color=250,title='TGO/DTU/SGU and LRV GMAGs' ;map_set,58.5,-108,0.,/stereo,/conti,scale=2.8e7,$;58.5 -108 ; color=250,title='THEMIS GMAGs' map_set,58.5,-108,0.,/stereo,/conti,scale=2.8e7,$;58.5 -108 ; color=250,title='MACCS/CARISMA/AUTUMN/GSC GMAGs' ;map_set,60,-140,0.,/stereo,/conti,scale=1.8e7,$;58.5 -108 ; color=250,title='GIMA and USGS GMAGs' borders=tvrd() erase ; change lat,long, scale here to match above map_set,58.5,-108,0.,/stereo,/conti,scale=3.8e7,$; draw country lines /usa,e_continents={COUNTRIES:1},color=100;,title='THEMIS' usaborders=tvrd() erase map_set,58.5,-108,0.,/stereo,/conti,scale=3.8e7,$ color=255,e_continents={FILL:1};,title='THEMIS GMAG' color_map=tvrd() erase color_map[where(usaborders eq 100)]=238;200 color_map[where(color_map eq 0)]=238 color_map[where(borders eq 250)]=1 tv,color_map stop ; show stations and label them for i=0.1,0.7,0.1 do plots,location[1,*],location[0,*],color=0,psym=4,symsize=i ; for simple cases just use this: for i=0,n_elements(label)-1 do xyouts,location[1,i],location[0,i]+0.5,$ label[i],charsize=chars,charthick=2,color=0,alignment=0.5 ; ; for more complicated cases... ; TGO, DTU and SGU and LRV networks: ; (labels are offset differently to not overlap etc) ;;ABK ;for i=0,0 do xyouts,location[1,i]+3.5,location[0,i]-0.5,$ ; label[i],charsize=chars,charthick=2,color=0,alignment=0.5 ; ; GDH ;for i=1,1 do xyouts,location[1,i]-2.5,location[0,i]-1.5,$ ; label[i],charsize=chars,charthick=2,color=0,alignment=0.5 ;; LYR ;for i=2,2 do xyouts,location[1,i]-0.5,location[0,i]-0.5,$ ; label[i],charsize=chars,charthick=2,color=0,alignment=1.5 ;; NAL ;for i=3,3 do xyouts,location[1,i]-1.5,location[0,i]+0.5,$ ; label[i],charsize=chars,charthick=2,color=0,alignment=0.5 ;; For all the rest of the stations ;for i=4,n_elements(label)-5 do xyouts,location[1,i],location[0,i]+0.5,$ ; label[i],charsize=chars,charthick=2,color=0,alignment=0.5 ; ; UMQ, UPN ;for i=n_elements(label)-4,n_elements(label)-2 do xyouts,location[1,i],location[0,i]+0.1,$ ; label[i],charsize=chars,charthick=2,color=0,alignment=-0.2 ; ; LRV (last just because I added it last) ;for i=n_elements(label)-1,n_elements(label)-1 do xyouts,location[1,i]+3,location[0,i]+0.5,$ ; label[i],charsize=chars,charthick=2,color=0,alignment=0.5 ; Below for Alaska ones ;for i=0,n_elements(label)-2 do xyouts,location[1,i],location[0,i]+0.5,$ ; label[i],charsize=chars,charthick=2,color=0,alignment=0.5 ;for i=n_elements(label)-1,n_elements(label)-1 do xyouts,location[1,i],location[0,i]-0.8,$ ; label[i],charsize=chars,charthick=2,color=0,alignment=0.5 ; ; geographic latitude/longitude ;for i=5,85,5 do plots,findgen(361),fltarr(361)+i,line=1,color=1 ;for i=0,360,30 do plots,fltarr(91)+i,findgen(91),line=1,color=1 ; geographic latitude/longitude - Southern hemisphere? map_grid, color=0 stop image=tvrd() device,/close set_plot,'win' window,5,xsize=750,ysize=500 tv,image stop ; if you like the output you can save the variable image into a gif-file ; write_gif, 'filename.gif',image write_gif, '/home/thmsoc/clrussells_stuff/plot/test.gif', image, R, G, B;, [0,166], [0,203],[0,237] end