;+ ; NAME: ; aerispec.pro ; ; PURPOSE: ; Create the ability to read AERI radiance spectra in RNA or NETCDF ; Format ; CATEGORY: ; Read and Plot AERI spectra ; CALLING SEQUENCE: ; aerispec.pro ; colour_hp.pro ; his_reader.pro ; aeri_record_select.pro ; ; INPUTS: ; ; OPTIONAL INPUTS: ; ; KEYWORD PARAMETERS: ; ; OUTPUTS: ; ; OPTIONAL OUTPUTS: ; ; COMMON BLOCKS: ; aeriinfo ; ; SIDE EFFECTS: ; ; RESTRICTIONS: ; ; PROCEDURE: ; ; EXAMPLE: ; IDL>@compile_aerispec ; IDL>aerispec ; ; Then Select File! ; ; MODIFICATION HISTORY: ; Written by: Wayne F. Feltz SSEC/CIMSS ; ; $Date:$ April 21, 1998 ; $Id:$ ; $Log:$ ; ; April 22, 1998 - Converted decimal time to hhmm (WFF) ;- ;------------------------------------------------------------------------- ; Make Common Block to Pass to Widget ;------------------------------------------------------------------------- pro aerispec common aeriinfo,recno,wave,rads,timehhmm,wave2,rads2,time2,max_records,record ;------------------------------------------------------------------------- ; Set up window ;------------------------------------------------------------------------- !p.multi=[0,1,2,0,0] window_size=700 !p.background=1 colour_hp record=0 window,0,xsize=window_size, ysize=window_size,title='AERI SPECTRA',retain=2 ;------------------------------------------------------------------------- ;Read in file and identify if netcdf or RNA ;------------------------------------------------------------------------- filename=pickfile(path='/home3/waynef/public_html/camexiii/archive/aeri/netcdf/',filter='9*') extension=str_sep(filename,'.') if extension(1) eq 'RNA' then begin his_reader,filename,recno,wave,rads,time filename2=strmid(filename,0,strpos(filename,'C'))+'C2.RNA' his_reader,filename2,recno2,wave2,rads2,time2 time_minute=floor((time-floor(time))*60) time_hour=floor(time)*100 timehhmm=time_hour+time_minute endif if extension(1) eq 'CDF' then begin fid = ncdf_open(filename) result=ncdf_varid(fid,'wnum') if result ge 0 then begin print,'ARM DOE NETCDF TYPE' ncdf_varget, fid, 'base_time', base_time ncdf_varget, fid, 'time_offset', time_offset ncdf_varget, fid, 'wnum', wave ncdf_varget, fid, 'mean_rad', rads ncdf_close,fid time_convert,base_time+time_offset,date,time=time time_minute=floor((time-floor(time))*60) time_hour=floor(time)*100 timehhmm=time_hour+time_minute filename2=strmid(filename,0,strpos(filename,'C'))+'C2.CDF' fid2 = ncdf_open(filename2) ncdf_varget, fid2, 'base_time', base_time2 ncdf_varget, fid2, 'time_offset', time_offset2 ncdf_varget, fid2, 'wnum', wave2 ncdf_varget, fid2, 'mean_rad', rads2 ncdf_close,fid2 time_convert,base_time2+time_offset2,date2,time=time2 endif else begin print,'Wisconsin NETCDF TYPE' fid = ncdf_open(filename) ncdf_varget, fid, 'base_time', base_time ncdf_varget, fid, 'time_offset', time_offset ncdf_varget, fid, 'wnum1', wave ncdf_varget, fid, 'mean_rad', rads ncdf_close,fid time_convert,base_time+time_offset,date,time=time time_minute=floor((time-floor(time))*60) time_hour=floor(time)*100 timehhmm=time_hour+time_minute filename2=strmid(filename,0,strpos(filename,'C'))+'C2.CDF' fid2 = ncdf_open(filename2) ncdf_varget, fid2, 'base_time', base_time2 ncdf_varget, fid2, 'time_offset', time_offset2 ncdf_varget, fid2, 'wnum1', wave2 ncdf_varget, fid2, 'mean_rad', rads2 ncdf_close,fid2 time_convert,base_time2+time_offset2,date2,time=time2 endelse endif max_records=n_elements(time) aerispec_record_select end