;+ ; 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] (cm) ; 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: ; ; ; 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_name: 'number of altitudes', nz:nz, nz_unit: '', $ ns_name: 'number of species', ns:ns, ns_unit: '', $ z_name: 'altitudes', z:z, z_unit: 'cm [nz]', $ p_name: 'pressure', p:p, p_unit: 'microbar [nz]', $ t_name: 'temperature', t:t, t_unit: 'K [nz]', $ n_name: 'number density', n:n,$ n_unit: 'molecule cm^-3 [nz,ns]',$ ncol_name: 'column density', ncol:ncol,$ ncol_unit: 'molecule cm^-2 [nz,ns]' $ } return, atm end