Pro READ_FIRE_ACE_C130_RAMS ; ------------------------------------------------------------------------ ; Program: READ_FIRE_ACE_C130_RAMS ; ; Version: 1.0 ; ; Date: September 23, 1999 ; ; Purpose/Function: ; Open and read FIRE-ACE RAMS tddr and bbr data files. ; Write every 10000th valu to the screen. ; Note: Two separate procedures are contained ; in this file, one to read data generated by the ; broad band radiometers (bbr) and one to read data generated ; by the multi-channel radiometers (tddr). The user ; will be prompted for what type of data to read. ; ; A call to dialog_pickfile is used to create dialog ; box for filename choice. This routine assumes those ; files are in the current working directory. The 'PATH' ; parameter in the call to dialog_pickfile in each of ; the subroutines may be changed to specify a different ; path name. ; The navigation files are also assumed to be in the current ; working directory. The navPath string variable my be ; changed to specify a different path to the navigation files. ; ; ; *** Please see the README file for further details *** ; ; Variables: See subroutines for variable definitions ; ; Invocation: idl> read_fire_ace_c130_rams ; ; ; Internal Routines: read_rams_bbr, read_rams_tddr ; ; Language/Compiler Version: IDL 5.0 and 5.2 ; ; Point of Contact: Comments or questions should be directed to: ; ; EOSDIS Langley DAAC ; Science, Users and Data Services Office ; NASA Langley DAAC Research Center ; Mail Code 157D ; 2 South Wright Street ; Hampton, Virginia 23681-2199 ; U.S.A. ; ; E-mail: larc@eos.nasa.gov ; Phone: (757)864-8656 ; FAX: (757)864-8807 ; ; ------------------------------------------------------------------------ type=0 while (type ne 1) and (type ne 2) do begin ; ; GET THE TYPE OF DATA TO BE READ ; print,'Enter "1" to read broadband data (bbr), ' read, ' or "2" for multi-channel narrowband radiometers (tddr) ',type print,'' ; ; CALL THE APPROPRIATE PROCEDURE ; If (fix(type) eq 1) then begin read_rams_bbr endif else if (fix(type) eq 2) then begin read_rams_tddr endif endwhile end Pro READ_RAMS_BBR ; IDL procedure: READ_RAMS_BBR ; ------------------------------------------------------------------------ ; Functions: Open and read FIRE-ACE RAMS bbr data file for a given flight. ; Open and read FIRE-ACE C130 navigation file for the same ; flight. Match-up the RAMS and navigation parameters. ; Write every 10,000th value of selected RAMS and ; navigation parameters to the screen. ; This routine assumes those files are in the directory data/. ; The 'PATH' parameter may be added to the dialog_pickfile call ; to specify a different data file location. ; The variable 'navPath' designates the location of the ; C130 navigation files. ; ; *** Please see the README file for further details *** ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ; ; ; Example Usage ; ------------- ; read_rams_bbr ; ; ------------------------------------------------------------------------ ; Variables: RAMS Variables ; base_time Scalar Seconds since 1 Jan 1970 ; time_offset N element array Seconds since base_time ; time N element array Seconds since start of day ; wavelength array TSBR response wavelength ; tsbrfilter array Normalized TSBR response ; zentsbrflux N element array Zenith TSBR Flux ; nadtsbrflux N element array Nadir TSBR Flux ; zenirbrflux N element array Zenith IRBR Flux ; nadirbrflux N element array Nadir IRBR Flux ; ------------------------------------------------------------------------ ; ; Variables C130 Navigation Variables ; nav_base_time Scalar seconds since Jan. 1, 1970 ; nav_time_offset N element array seconds since base_time ; glat N element array GPS latitude ; glon N element array GPS longitude ; hgm232 N element array geometric altitude (radar) ; alt N element array inertial altitude ; lat N element array inertial latitude ; lon N element array inertial longitude ; palt N element array NACA pressure altitude ; pitch N element array Aircraft Pitch Angle ; roll N element array Aircraft Roll Angle ; thdg N element array true heading ; ; ------------------------------------------------------------------------ ; ; SET THE EXPECTED MIN, MAX AND UNDEFINED FOR THE FILE ; undef=-99999. cmin=0. ctsmax=1400. cirmax=600. ; ; DIALOG BOX CONTAINS FILENAMES. (change default path to data here) ; file = dialog_pickfile(/read,filter='*bbr*.cdf',path='') ; ; SET THE PATH FOR C130 NAV FILES (change path the nav data here) ; navPath='' ; ; OPEN AND INITIALIZE NetCDF FILE ; cdfid=-1 print,file cdfid=ncdf_open(file,/nowrite) if (cdfid eq -1) then begin print,'Coulndnt open file ',file return endif ; ; GET THE VARIABLE ID'S. THESE ARE USED LATER TO READ ; THE VARIABLES FROM THE FILE. ; id_base_time=ncdf_varid(cdfid,"base_time") id_time_off=ncdf_varid(cdfid,"time_offset") id_tsbrwave=ncdf_varid(cdfid,"TSBR_wavelength") id_tsbrspect=ncdf_varid(cdfid,"TSBR_spect") id_tsbr_zen=ncdf_varid(cdfid,"Zen_TSBR") id_tsbr_nad=ncdf_varid(cdfid,"Nad_TSBR") id_irbr_zen=ncdf_varid(cdfid,"Zen_IRBR") id_irbr_nad=ncdf_varid(cdfid,"Nad_IRBR") ; ; READ THE BASE TIME AND TIME OFFSET INFORMATAION ; ncdf_varget,cdfid,id_base_time,base_time ncdf_varget,cdfid,id_time_off,time_offset ; ; DETERMINE THE NUMBER OF SECONDS SINCE THE BEGINNING OF THE DAY ; seconds_offset=(base_time mod 86400L) time=time_offset+seconds_offset ; ; READ THE WAVELENGTH AND RESPONSE FUNCTION DATA ; ncdf_varget,cdfid,id_tsbrwave,wavelength ncdf_varget,cdfid,id_tsbrspect,tsbrfilter ; ; READ THE ZENITH AND NADIR FLUX DATA ; ncdf_varget,cdfid,id_tsbr_zen,zentsbrflux ncdf_varget,cdfid,id_tsbr_nad,nadtsbrflux ncdf_varget,cdfid,id_irbr_zen,zenirbrflux ncdf_varget,cdfid,id_irbr_nad,nadirbrflux ; ; READ THE MISSION DATE FROM THE FILES GLOBAL ATTRIBUTES ; mdate='' ncdf_attget,cdfid,'Mission_Date',mdate,/global print, 'START DATE: ',strtrim(string(mdate)) stDate= string(mdate) endDate= string(mdate) ; ; CLOSE THE NetCDF FILE ; ncdf_close,cdfid ; ; CONVERT THE TIME TO HOURS, MINUTES, AND SECONDS ; NOTE: TIME IS IN GMT ; hs=time/3600 ms=(hs-fix(hs))*60 ss=(ms-fix(ms))*60 ; ;If the last flight ended past midnight, change the end date ;to the next data and subtract 24 hours from the time ; nevents=n_elements(hs) - 1 if hs[nevents] ge 24 then begin hs(where(hs ge 24))= hs(where(hs ge 24)) - 24 day_sep=str_sep(stDate,' ') day=fix(day_sep[0]) day=string(day+1) endDate=strtrim(day,2)+' '+day_sep[1]+' '+day_sep[2] endif hs=strtrim(fix(hs),2) & ms=strtrim(fix(ms),2) & ss=strtrim(fix(ss),2) hs(where(strlen(hs) eq 1))='0'+hs(where(strlen(hs) eq 1)) ms(where(strlen(ms) eq 1))='0'+ms(where(strlen(ms) eq 1)) ss(where(strlen(ss) eq 1))='0'+ss(where(strlen(ss) eq 1)) hours=hs[0] minutes=ms[0] seconds=ss[0] min_time=hours+':'+minutes+':'+seconds ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; OPEN THE C130 NAVIGATION NetCDF FILE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; DIALOG BOX CONTAINS FILENAMES. (change default path to data here) ; ; file = dialog_pickfile(/read,filter='*nav*.cdf',path=navPath) ; USE THESE LINES TO GET DATA FILE AUTOMATICALLY getDate=str_sep(file,'_') fileDate=strtrim(getDate[4],2) If (fileDate eq '19980504.cdf') then begin getDate=str_sep(fileDate,'.') file=strarr(2) file[0]=navPath+'fire_ace_c130_nav_'+getDate[0]+'a.cdf' file[1]=navPath+'fire_ace_c130_nav_'+getDate[0]+'b.cdf' Endif Else file=navPath+'fire_ace_c130_nav_'+fileDate ; ; Read the file (two files for the first flight) ; For i=0,n_elements(file)-1 do begin fileId=-1 fileId=ncdf_open(file[i],/nowrite) print, file print, '' if (fileId eq -1) then begin print,'Coulndnt open file ',file[i] return endif ; ; GET THE VARIABLE ID'S. THESE ARE USED LATER TO READ ; THE VARIABLES FROM THE FILE. ; id_base_time=ncdf_varid(fileId,"base_time") id_time_off=ncdf_varid(fileId,"time_offset") id_glat=ncdf_varid(fileId,"GLAT") id_glon=ncdf_varid(fileId,"GLON") id_hgm232=ncdf_varid(fileId,"HGM232") id_alt=ncdf_varid(fileId,"ALT") id_lat=ncdf_varid(fileId,"LAT") id_lon=ncdf_varid(fileId,"LON") id_palt=ncdf_varid(fileId,"PALT") id_paltf=ncdf_varid(fileId,"PALTF") id_pitch=ncdf_varid(fileId,"PITCH") id_roll=ncdf_varid(fileId,"ROLL") id_thdg=ncdf_varid(fileId,"THDG") ; ; READ ONLY THE SELECTED VARIABLES ; ncdf_varget,fileId,id_base_time,nav_base_time ncdf_varget,fileId,id_time_off,nav_time_offset ncdf_varget,fileId,id_palt,palt ncdf_varget,fileId,id_glat,glat ncdf_varget,fileId,id_glon,glon ; ; CLOSE NAVIGATION FILE ; ncdf_close,fileId ; ; IF IT'S THE FIRST DAY SAVE THE FIRST ARRAYS UNDER A DIFFERENT NAME ; If (fileDate eq '19980504.cdf') and (i eq 0) then begin nav_base_timea=nav_base_time nav_time_offseta=nav_time_offset palta=palt glata=glat glona=glon Endif Endfor ; ; IF IT'S THE FIRST DAY CONCATONATE THE ARRAYS ; If (fileDate eq '19980504.cdf') then begin ; ADJUST THE BASE TIME 24-HOURS AHEAD nav_base_time=nav_base_time + 24l*3600l nav_time_offset=nav_time_offset + (nav_base_time - nav_base_timea) nav_base_time=nav_base_timea nav_time_offset=[nav_time_offseta, nav_time_offset] palt=[palta, palt] glat=[glata, glat] glon=[glona, glon] Endif ; ; ADJUST RADIOMETER TIME OFFSET TO BE THE SAME AS NAVIGATION DATA ; time_offset=time_offset-(nav_base_time-base_time) ; ; TAKE EVERY 10,000TH ELEMENT OF THE NAVIGATION ARRAYS, ; STARTING AT THE FIRST RECORD IN THE RADIOMETER ARRAYA, ; AND FIND THE MATCHING ELEMENTS FROM THE RADIOMETER ARRAYS ;FIND WHERE NAVIGATION TIME SHOULD START (START OF RAMS TIME) navStart=ceil(min(time_offset)) navStart=where(nav_time_offset eq navStart) navStart=navStart[0] if (navStart eq -1) then begin print, 'There are no navigation data at the start of this RAMS data file' print, 'Going to the start of the navigation file instead' navStart=0 endif ;FIND HOW MANY DATA POINTS WILL BE OUPUT npr=floor((n_elements(nav_time_offset) - navStart -1)/10000l) if ((navStart+((npr)*10000l)) gt max(time_offset)) then npr = npr -1 radSub=lonarr(npr+1) navSub=lonarr(npr+1) ;FIND THE SUBSCRIPTS FOR EVERY ~10,000TH RECORD for i=0,npr do begin index=navStart+(i*10000l) minDiff=1.0 while (minDiff ge 0.5) do begin diff=time_offset-nav_time_offset[index] minDiff=min(abs(diff),minSub) ;If the nearest element is less than a half of a second away, ;include it. If it's not, find the next one that is close if minDiff lt 0.5 then begin radSub[i]=minSub navSub[i]=index endif else begin index=index+1 if (index ge n_elements(nav_time_offset)) Then begin print, 'No data for last time point.' npr=npr -1 radSub[i]=-1 navSub[i]=-1 minDiff=0.0 endif endelse endwhile endfor ; ; PRINT THE BASIC INFORMATION AT EACH TIME POINT ; title=' Date Time Alt Lat Lon Zentsbrflux ' title=title+'Nadtsbrflux Zenirbrflux Nadirbrflux' print,title print,'--------------------------------------------------------------------------------------------------------------' for i=0,npr do begin fp='(a11,2x,a2,":",a2,":",a2,3f9.2,3f12.2)' if (hs[radSub[i]] gt 13) then begin print, stDate, hs[radSub[i]],ms[radSub[i]],ss[radSub[i]],palt[navSub[i]],$ glat[navSub[i]],glon[navSub[i]],zentsbrflux[radSub[i]],nadtsbrflux[radSub[i]],$ zenirbrflux[radSub[i]],nadirbrflux[radSub[i]],format=fp endif else begin print, endDate, hs[radSub[i]],ms[radSub[i]],ss[radSub[i]],palt[navSub[i]],$ glat[navSub[i]],glon[navSub[i]],zentsbrflux[radSub[i]],nadtsbrflux[radSub[i]],$ zenirbrflux[radSub[i]],nadirbrflux[radSub[i]],format=fp endelse endfor a=0 print, 'Done' end Pro READ_RAMS_TDDR ; IDL procedures: READ_RAMS_TDDR ; ------------------------------------------------------------------------ ; Functions: Open and read FIRE-ACE RAMS tddr data file for a given flight. ; Open and read FIRE-ACE C130 navigation file for the same ; flight. Match-up the RAMS and navigation parameters. ; Write every 10,000th value of selected RAMS and ; navigation parameters to the screen. ; This routine assumes those files are in the directory data/. ; The 'PATH' parameter may be added to the dialog_pickfile call ; to specify a different data file location. ; The variable 'navPath' designates the the location of the ; C130 navigation files. ; ; *** Please see the README file for further details *** ; ------------------------------------------------------------------------ ; ; Example Usage ; ------------- ; read_rams_tddr ; ; ------------------------------------------------------------------------ ; Variables: RAMS Variables ; base_time Scalar Seconds since 1 Jan 1970 ; time_offset N element array Seconds since base_time ; time N element array Seconds since start of day ; wavelength 7 element array Center wavelength of band ; zbandwidth 7 element array Full width of Zenith TDDR ; nbandwidth 7 element array Full width of Nadir TDDR ; zenflux (7,N) element array Zenith Fluxes ; nadflux (7,N) element array Nadir Fluxes ; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------ ; Variables: C130 Navigation Variables ; nav_base_time Scalar seconds since Jan. 1, 1970 ; nav_time_offset N element array seconds since base_time ; glat N element array GPS latitude ; glon N element array GPS longitude ; hgm232 N element array geometric altitude (radar) ; alt N element array inertial altitude ; lat N element array inertial latitude ; lon N element array inertial longitude ; palt N element array NACA pressure altitude ; pitch N element array Aircraft Pitch Angle ; roll N element array Aircraft Roll Angle ; thdg N element array true heading ; ; ------------------------------------------------------------------------ ; ; SET THE EXPECTED MIN, MAX AND UNDEFINED FOR THE FILE ; undef=-99999. cmin=0. ctsmax=1400. cirmax=600. ; ; DIALOG BOX CONTAINS FILENAMES. (change default path to data here) ; file = dialog_pickfile(/read,filter='*tddr*.cdf',path='') ; ; SET THE PATH FOR C130 NAV FILES (change path the nav data here) ; navPath='' ; ; OPEN AND INITIALIZE NetCDF FILE ; cdfid=-1 print,file cdfid=ncdf_open(file,/nowrite) if (cdfid eq -1) then begin print,'Coulndnt open file ',file return endif ; ; GET THE VARIABLE ID'S. THESE ARE USED LATER TO READ ; THE VARIABLES FROM THE FILE. ; id_base_time=ncdf_varid(cdfid,"base_time") id_time_off=ncdf_varid(cdfid,"time_offset") id_wave=ncdf_varid(cdfid,"wavelength") id_band_zen=ncdf_varid(cdfid,"Zen_bandwidth") id_band_nad=ncdf_varid(cdfid,"Nad_bandwidth") id_tddr_zen=ncdf_varid(cdfid,"Zen_TDDR") id_tddr_nad=ncdf_varid(cdfid,"Nad_TDDR") ; ; READ THE BASE TIME AND TIME OFFSET INFORMATAION ; ncdf_varget,cdfid,id_base_time,base_time ncdf_varget,cdfid,id_time_off,time_offset ; ; DETERMINE THE NUMBER OF SECONDS SINCE THE BEGINNING OF THE DAY ; seconds_offset=(base_time mod 86400L) time=time_offset+seconds_offset ; ; READ THE WAVELENGTH AND BANDWIDTH INFORMATION ; ncdf_varget,cdfid,id_wave,wavelength ncdf_varget,cdfid,id_band_zen,zbandwidth ncdf_varget,cdfid,id_band_nad,nbandwidth ; ; READ THE ZENITH AND NADIR FLUX DATA ; ncdf_varget,cdfid,id_tddr_zen,zenflux ncdf_varget,cdfid,id_tddr_nad,nadflux ; ; READ THE MISSION DATE FROM THE FILES GLOBAL ATTRIBUTES ; mdate='' ncdf_attget,cdfid,'Mission_Date',mdate,/global print, 'START DATE: ',strtrim(string(mdate)) stDate= string(mdate) endDate= string(mdate) ; ; CLOSE THE NetCDF FILE ; ncdf_close,cdfid ; ; CONVERT THE TIME TO HOURS, MINUTES, AND SECONDS ; NOTE: TIME IS IN GMT ; hs=time/3600 ms=(hs-fix(hs))*60 ss=(ms-fix(ms))*60 hours=strtrim(string(fix(hs[0])),2) minutes=strtrim(string(fix(ms[0])),2) seconds=strtrim(string(fix(ss[0])),2) if strlen(hours) eq 1 then hours='0'+hours if strlen(minutes) eq 1 then minutes='0'+minutes if strlen(seconds) eq 1 then seconds='0'+seconds min_time=hours+':'+minutes+':'+seconds ; ;If the last flight ended past midnight, change the end date ;to the next data and subtract 24 hours from the time ; nevents=n_elements(hs) - 1 if hs[nevents] ge 24 then begin hs(where(hs ge 24))= hs(where(hs ge 24)) - 24 day_sep=str_sep(stDate,' ') day=fix(day_sep[0]) day=string(day+1) endDate=strtrim(day,2)+' '+day_sep[1]+' '+day_sep[2] endif ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; OPEN THE C130 NAVIGATION NetCDF FILE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; DIALOG BOX CONTAINS FILENAMES. (change default path to data here) ; ; file = dialog_pickfile(/read,filter='*nav*.cdf',path=navPath) ; USE THESE LINES TO GET DATA FILE AUTOMATICALLY getDate=str_sep(file,'_') fileDate=strtrim(getDate[4],2) If (fileDate eq '19980504.cdf') then begin getDate=str_sep(fileDate,'.') file=strarr(2) file[0]=navPath+'fire_ace_c130_nav_'+getDate[0]+'a.cdf' file[1]=navPath+'fire_ace_c130_nav_'+getDate[0]+'b.cdf' Endif Else file=navPath+'fire_ace_c130_nav_'+fileDate ; ; Read the file (two files for the first flight) ; For i=0,n_elements(file)-1 do begin fileId=-1 fileId=ncdf_open(file[i],/nowrite) print, file[i] print,'' if (fileId eq -1) then begin print,'Coulndnt open file ',file[i] return endif ; ; GET THE VARIABLE ID'S. THESE ARE USED LATER TO READ ; THE VARIABLES FROM THE FILE. ; id_base_time=ncdf_varid(fileId,"base_time") id_time_off=ncdf_varid(fileId,"time_offset") id_glat=ncdf_varid(fileId,"GLAT") id_glon=ncdf_varid(fileId,"GLON") id_hgm232=ncdf_varid(fileId,"HGM232") id_alt=ncdf_varid(fileId,"ALT") id_lat=ncdf_varid(fileId,"LAT") id_lon=ncdf_varid(fileId,"LON") id_palt=ncdf_varid(fileId,"PALT") id_paltf=ncdf_varid(fileId,"PALTF") id_pitch=ncdf_varid(fileId,"PITCH") id_roll=ncdf_varid(fileId,"ROLL") id_thdg=ncdf_varid(fileId,"THDG") ; ; READ ONLY THE SELECTED VARIABLES ; ncdf_varget,fileId,id_base_time,nav_base_time ncdf_varget,fileId,id_time_off,nav_time_offset ncdf_varget,fileId,id_palt,palt ncdf_varget,fileId,id_glat,glat ncdf_varget,fileId,id_glon,glon ; ; CLOSE NAVIGATION FILE ; ncdf_close,fileId ; ; IF IT'S THE FIRST DAY SAVE THE FIRST ARRAYS UNDER A DIFFERENT NAME ; If (fileDate eq '19980504.cdf') and (i eq 0) then begin nav_base_timea=nav_base_time nav_time_offseta=nav_time_offset palta=palt glata=glat glona=glon Endif Endfor ; ; IF IT'S THE FIRST DAY CONCATONATE THE ARRAYS ; If (fileDate eq '19980504.cdf') then begin ; ADJUST THE BASE TIME 24-HOURS AHEAD nav_base_time=nav_base_time + 24l*3600l nav_time_offset=nav_time_offset + (nav_base_time - nav_base_timea) nav_base_time=nav_base_timea nav_time_offset=[nav_time_offseta, nav_time_offset] palt=[palta, palt] glat=[glata, glat] glon=[glona, glon] Endif ; ; ADJUST RADIOMETER TIME OFFSET TO BE THE SAME AS NAVIGATION DATA ; time_offset=time_offset-(nav_base_time-base_time) ; ; TAKE EVERY 10,000TH ELEMENT OF THE NAVIGATION ARRAYS, ; STARTING AT THE FIRST RECORD IN THE RADIOMETER ARRAYA, ; AND FIND THE MATCHING ELEMENTS FROM THE RADIOMETER ARRAYS ; ;FIND WHERE NAVIGATION TIME SHOULD START (START OF RAMS TIME) navStart=ceil(min(time_offset)) navStart=where(nav_time_offset eq navStart) navStart=navStart[0] if (navStart eq -1) then begin print, 'There are no navigation data at the start' print, 'Going to the start of the navigation file instead' navStart=0 endif ;FIND HOW MANY DATA POINTS WILL BE OUPUT npr=floor((n_elements(nav_time_offset) - navStart -1)/10000l) if ((navStart+((npr)*10000l)) gt max(time_offset)) then npr = npr -1 radSub=lonarr(npr+1) navSub=lonarr(npr+1) ;FIND THE SUBSCRIPTS FOR EVERY ~10,000TH RECORD for i=0,npr do begin index=navStart+(i*10000l) minDiff=1.0 while (minDiff ge 0.5) do begin diff=time_offset-nav_time_offset[index] minDiff=min(abs(diff),minSub) ;If the nearest element is less than a half of a second away, ;include it. If it's not, find the next one that is close if minDiff lt 0.5 then begin radSub[i]=minSub navSub[i]=index endif else begin index=index+1 if (index ge n_elements(nav_time_offset)) Then begin print, 'No data for last time point.' npr=npr -1 radSub[i]=-1 navSub[i]=-1 minDiff=0.0 endif endelse endwhile endfor ; print, 'Length of Radiometer arrays ', n_elements(radSub) ; print, 'Length of Navigation arrays ', n_elements(navSub) ; ; PRINT THE BASIC INFORMATION AT EACH TIME POINT ; title=' Date Time Alt Lat Lon' for i=0,npr do begin fp='(a11,2x,i2,":",i2,":",i2,3f9.2)' fpr='(a10,7f8.2)' if (hs[radSub[i]] gt 13) then begin print, title print,'-----------------------------------------------' print, stDate, hs[radSub[i]],ms[radSub[i]],ss[radSub[i]],palt[navSub[i]],$ glat[navSub[i]],glon[navSub[i]],format=fp print, 'Zenflux = ',zenflux[*,navSub[i]],format=fpr print, 'Nadflux = ',nadflux[*,navSub[i]],format=fpr endif else begin print, title print,'-----------------------------------------------' print, endDate, hs[radSub[i]],ms[radSub[i]],ss[radSub[i]],palt[navSub[i]],$ glat[navSub[i]],glon[navSub[i]],format=fp print, 'Zenflux = ',zenflux[*,navSub[i]],format=fpr print, 'Nadflux = ',nadflux[*,navSub[i]],format=fpr endelse endfor a=0 print, 'Done' end