pro spectralib2012, overwrite=overwrite ;+ ; NAME: ; spectralib ; PURPOSE: (one line) ; Add non-standard system variable for use with spectra library ; DESCRIPTION: ; Add the following: ; !hitrandir - the directory containing the HITRAN databases ; CATEGORY: ; Spectra ; CALLING SEQUENCE: ; spectralib ; INPUTS: ; none ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; None. ; COMMON BLOCKS: ; None. ; SIDE EFFECTS: ; Defines the system variables using defsysv ; RESTRICTIONS: ; PROCEDURE: ; MODIFICATION HISTORY: ; Written 2013 Aug, by Leslie Young, SwRI ;- on_error, 2 ; Don't add it if it already exists. DEFSYSV, '!spectralib', EXISTS = i if not keyword_set(overwrite) then begin IF i EQ 1 THEN return endif case !version.os of 'MacOS': delim = ':' 'vms': delim = ':' 'windows': delim = '\' 'Win32': delim = '\' else: delim = '/' endcase chemname=[ "H2O" ,"CO2" , "O3" , "N2O" , "CO" ,"CH4" ,"O2" , "NO" , $ "SO2" ,"NO2" , "NH3" , "HNO3", "OH" , "HF" , "HCl" ,"HBr" , $ "HI" , "ClO" , "OCS" ,"H2CO" , "HOCl" , "N2" ,"HCN" , "CH3Cl", $ "H2O2" , "C2H2" , "C2H6" , "PH3" , "COF2" , "SF6" , "H2S" , $ "HCOOH" , "HO2" , "O" , "ClONO2" , "NO+", $ "HOBr", "C2H4", "CH3OH", "CH3Br", "CH3CN", "CF4" ] hitrandir = '/Users/layoung/reference/HITRAN2012/' qtname=hitrandir + '../HITRAN2008/JavaHAWKS/Hawks/Qt.dat' initPartitionFunction, qtname, nmole, nspeci, isovec, q296, qcoef defsysv, '!spectralib', $ { $ version: 'HITRAN2012', $ hitrandir: hitrandir, $ by_molecdir: hitrandir + 'HITRAN2012/By-Molecule/Uncompressed-files/', $ nmole:nmole, $ nspeci:nspeci, $ chemname:chemname, $ isovec:isovec, $ q296:q296, $ qcoef:qcoef $ } message, $ 'Spectra library system variable (!spectralib) have been added', /inf end