;+ ; NAME: ; rt_atmread1 ; PURPOSE: (one line) ; read a model atmosphere ; DESCRIPTION: ; read a model atmosphere, return atmospheric structure ; CATEGORY: ; RT ; CALLING SEQUENCE: ; atm = rt_atmread1(fname) ; INPUTS: ; fname = file name of atmospheric structure ; OPTIONAL INPUT PARAMETERS: ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; returns an atmosphere structure, with the following fields ; nz number of atmospheric levels ; ns number of species ; z altitudes [nz] (cm) ; p pressures [nz] (microbar) ; t temperatures [nz] (K) ; n number density [nz,ns] (cm^-3) ; ncol number column density [nz,ns] (cm^-2) ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; None ; PROCEDURE: ; ; EXAMPLE: ; atm1 = rt_atmread1('titan.atm') ; ; MODIFICATION HISTORY: ; Written 2004 May 8, Leslie Young SwRI ; based on atmread1.f, written by Roger Yelle, 1990 ;- function rt_atmread1, fname openr, unit, fname, /get_lun readf, unit, nz ns = 5 z = dblarr(nz) p = dblarr(nz) t = dblarr(nz) ni = dblarr(nz) ncoli = dblarr(nz) n = dblarr(nz,ns) ncol = dblarr(nz,ns) species = [22, 6, 26, 27, 23] ;n2, ch4, acetylene (c2h2), ethane (c2h6), hcn iline='' readf, unit, iline, z readf, unit, iline, p readf, unit, iline, t for i = 0, ns-1 do begin readf, unit, iline, ni readf, unit, iline, ncoli n[*,i] = ni ncol[*,i] = ncoli end close, unit & free_lun,unit atm = { nz:nz, ns:ns, z:z, p:p, t:t, n:n, ncol:ncol } return, atm end