;+ ; NAME: ; rt_bandread ; PURPOSE: (one line) ; read bandparams.dat ; DESCRIPTION: ; read bandparams.dat, return band structure ; CATEGORY: ; RT ; CALLING SEQUENCE: ; band = rt_bandread ; INPUTS: ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; band structure ; wave ; arad ; pcol ; dgn ; rmass ; rdmol ; qrot ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; None ; PROCEDURE: ; ; ; 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_name:'number of molecules', nmol:nmol, nmol_unit:'', $ wave_name:'wavenumber of transition', wave: vi, wave_unit:'invcm', $ arad_name:'Einstein A coefficient', arad: arad, arad_unit:'s^-1', $ pcol_name:'P10 = V-T transition probability', pcol:pcol, pcol_unit: '',$ dgn_name:'degeneracy', dgn: dgn, dgn_unit:'', $ rmass_name:'molecular weight', rmass: wgt, rmass_unit:'amu', $ rdmol_name:'collision diameter', rdmol: rdmol, rdmol_unit:'cm',$ rmcol_name:'reduced mass',rmcol: dblarr(nmol), rmcol_unit:'g', $ qrot_name:'rotational partition functions', qrot:qrot, qrot_unit:'' $ } return, band end