;+ ; NAME: ; ch4t ; PURPOSE: (one line) ; Return vapor pressure of CH4 from Brown & Ziegler 1980 ; CATEGORY: ; Volatile Transport ; CALLING SEQUENCE: ; t = ch4t(vp) ; INPUTS: ; vp : vapor pressure in microbar ; KEYWORD INPUTS ; None ; OUTPUTS: ; t : temperature, K ; OPTIONAL OUTPUT ; None ; RESTRICTIONS: ; PROCEDURE: ; This function implements the tables of Brown and Zeigler ; MODIFICATION HISTORY: ; Written 2013 Jun 16, by Leslie Young, SwRI ;- function ch4t, p if isarray(p) then begin t = 0. * p for i = 0, n_elements(p)-1 do t[i] = ch4t(p[i]) return, t endif ; Return N2 temperature as a function of vapor pressure in microbar a=[1.71271658e1, -1.11039009e3, -4.34060967e3, 1.03503576e5, -7.91001903e5] a[0] = a[0] - alog(p/1.33322e3) roots = fz_roots(a) gd = where( imaginary(roots) eq 0 and real_part(roots) gt 0, ngd) t = 1/real_part(roots[gd[0]]) return, t end