function rd_band, fn, mol, iso, v_upper, v_lower ;+ ; NAME: ; rd_band ; PURPOSE: (one line) ; Read a molecular band from a HITRAN file ; DESCRIPTION: ; CATEGORY: ; Spectra ; CALLING SEQUENCE: ; rd_band, fn, mol, iso, v_upper, v_lower ; INPUTS: ; fn - the filename of a HITRAN molecular file. ; mol - index of molecule (or 0 for any) ; iso - index of isotope (or 0 for any) ; v_upper - upper vibrational quantum number, or 0 for any ; v_lower - lower vibrational quantum number, or 0 for any ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; Returns an array of spectral line structures ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; This doesn't use the main HITRAN file, but the files in the by_molec directory ; PROCEDURE: ; MODIFICATION HISTORY: ; Written 2000 October, by Leslie Young, SwRI ;- ln=new_specline() openr, fp, fn, /get_lun fs=fstat(fp) nmax=fs.size / 102 lna=replicate(ln, nmax) n=0L rd_next, fp, ln, mol, iso, v_upper, v_lower, -1., -1., -1. while ln.mol gt 0 do begin &$ lna(n)=ln &$ n=n+1 &$ rd_next, fp, ln, mol, iso, v_upper, v_lower, -1., -1., -1. &$ end close, fp lnb = replicate(ln, n) lnb(0:n-1) = lna(0:n-1) return, lnb end