pro changet_specline, ln, t ;+ ; NAME: ; changet_specline ; PURPOSE: (one line) ; Change the strength and pressure/doppler widths to reflect a new temperature ; DESCRIPTION: ; Given a spectral line structure and a temperature, update the strength, ; air-broadened half-width, and doppler width. ; CATEGORY: ; Spectra ; CALLING SEQUENCE: ; changet_specline, ln, t ; INPUTS: ; ln - the spectral line structure to be changed ; t - the new temperature for the line ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; None ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; Changes the following fields in ln: ; s intensity in cm^-1/(molecule cm^-2) ; gamma_air air-broadened halfwidth (HWHM) in cm^-1 at specified pressure ; t temperature for s, gamma_air, and gamma_self ; dopw doppler width (Goody&Yung definition), cm^-1 ; RESTRICTIONS: ; 1. Only works for molecules 1-7 (H2O, CO2, O3, N2O, CO, CH4, O2) ; 2. Assumes the partition function (Q) varies as temperature to some power ; (c.f.. Steve Lord's ATRAN program), rather than using the full polynomial ; expressions of select96. ; ------ NOW IT DOES. LAY 29 May 2001 ; 3. Does not change gamma, the self-braodened halfwidth. ; PROCEDURE: ; MODIFICATION HISTORY: ; Written 2000 October, by Leslie Young, SwRI ; 29 May 2001 LAY. Added call to qoft ; 22 Mar 2005 LAY. Changed rad calculation to call expm1 ;- c2 = 1.438786 ; C2 = hc/k (second radiation constant) t0=ln.t_orig ttref = t*t0 dttref = t - t0 energy = ln.e_lower freq = ln.nu0 s = ln.s_orig hwhm = ln.gamma_air_orig tdep = ln.n qref=qoft(ln.mol,ln.iso,t0) qt= qoft(ln.mol,ln.iso,t, /cold) ; Old Q&D code ; m = 0 ; ma = [1.5, 1.0, 1.5, 1.0, 1.0, 1.5, 1.0] ; if ln.mol le 7 then m = ma(ln.mol-1) ; qref = 1. ; qt = (t/t0)^m ; rad = (1. - exp(-c2*freq/t))/(1. - exp(-c2*freq/t0)) rad = expm1(-c2*freq/t)/expm1(-c2*freq/t0) s = s*(qref/qt)*rad*exp(c2*energy*dttref/ttref) hwhm = hwhm*(t0/t)^tdep; ln.s=s ln.gamma_air=hwhm ln.t=t ln.dopw = dopwidth(ln.nu0, ln.t, molec_weight(ln.mol,ln.iso)) end