;+ ; NAME: ; rt_bandread ; PURPOSE: (one line) ; read bandparams.dat ; DESCRIPTION: ; read bandparams.dat, return band structure ; CATEGORY: ; RT ; CALLING SEQUENCE: ; band = rt_bandread() ; INPUTS: ; none ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; band structure ; wave - wavenumbers (inverse cm) ; arad - ; pcol ; dgn ; rmass ; rdmol ; qrot - exponent for rotational partition function ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; file 'bandparams.dat' must be in current working directory ; PROCEDURE: ; ; EXAMPLE: ; band = rt_bandread() ; ; MODIFICATION HISTORY: ; Written 2004 May 8, Leslie Young SwRI ; based on mesopause.f, written by Roger Yelle, 1990 ;- function rt_bandread nmol = 4 nso = [3,2,1,1] maxiso = 3 ; maximum isotopes maxfund = 12 ; maximum number of fundementals name = strarr(nmol) nfund = intarr(nmol) qrot = dblarr(nmol) vis = dblarr(maxfund,maxiso,nmol) strs = dblarr(maxfund,maxiso,nmol) arads = dblarr(maxfund,maxiso,nmol) rmass = dblarr(maxiso,nmol) rdmol = dblarr(nmol) iso = intarr(maxiso,nmol) pcols = dblarr(maxfund,maxiso,nmol) dgns = dblarr(maxfund,maxiso,nmol) wgt = dblarr(nmol) str = dblarr(maxfund,nmol) arad = dblarr(maxfund,nmol) pcol = dblarr(maxfund,nmol) vi = dblarr(maxfund,nmol) dgn = dblarr(maxfund,nmol) namei = '' isoi=0 nfundi=0 openr, unit, 'bandparams.dat', /get_lun for im = 0, nmol-1 do begin for is = 0, nso[im]-1 do begin readf, unit, namei, nfundi, isoi, rmassi, rdmoli, qroti, $ format='(1x,a4,1x,i2,1x,i4,1x,f7.4,1x,f3.1,1x,f3.1)' name[im]=namei nfund[im]=nfundi iso[im]=isoi rmass[is,im]=rmassi rdmol[im]=rdmoli qrot[im]=qroti for nf = 0, nfundi-1 do begin readf, unit, visi, strsi, aradsi, pcolsi, di vis[nf,is,im]=visi strs[nf,is,im]=strsi arads[nf,is,im]=aradsi pcols[nf,is,im]=pcolsi dgns[nf,is,im] = di endfor endfor endfor close, unit & free_lun,unit for im = 0, nmol-1 do begin wgt[im] = rmass[0,im] for nf = 0, nfund[im]-1 do begin vi[nf,im] = vis[nf,0,im] str[nf,im] = strs[nf,0,im] arad[nf,im] = arads[nf,0,im] pcol[nf,im] = pcols[nf,0,im] dgn[nf,im] = dgns[nf,0,im] endfor endfor band = $ { nmol:nmol, wave:vi, arad:arad, pcol:pcol, dgn:dgn, $ rmass:wgt, rdmol:rdmol, rmcol:dblarr(nmol), qrot:qrot } return, band end