;+ ; NAME: ; atm_ey92haze_p8 ; PURPOSE: (one line) ; Calculate the atmospheric structure given haze atm parameters ; DESCRIPTION: ; Calculate the atmospheric structure given haze atm parameters ; CATEGORY: ; Occultation lightcurve (oclc) ; CALLING SEQUENCE: ; atm = atm_ey92haze_p8, y, param ; INPUTS: ; y = shadow radius (km) ; param = [nuref * 1e9, lamref] or [nuref * 1e9, lamref, b] ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; atm: structure with ; rref : reference radius ; nuref : reference refractivity ; lamref : reference energy ratio ; a : molecular weight exponent ; b : temperature exponent ; r1 : top of haze radius (cm) ; kappa1 : linear optical depth at r1 (1/cm) ; htau1 : haze scale height at r1 ; distobs : distance to observer (cm) ; rsurf : surface radius ; farside : 0 = no farside ; haze : 1 = haze ; order : order for series in Elliot and Young 1992 ; ; y : shadow radius (cm) ; phi : flux ; r : radius (cm) ; t : temperature (K) ; dt : temperature derivative (K/cm), dT/dr ; d2t : temperature curvature (K/cm^2), d^2T/dr^2 ; H : scale height (cm) ; lam : energy ratio ; n : number density (cm^-3) ; nu : refractivity ; p : pressure (microbar) ; kappa : linear optical depth (cm^-1) ; tauvert : vertical optical depth ; tauobs : line-of-sight optical depth ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; None ; PROCEDURE: ; Elliot and Young 1992, AJ 103 ; MODIFICATION HISTORY: ; Written 2006 Jun 28, Leslie Young ;- function atm_ey92haze_p8, y, param print, param km = 1d5 rref = 1275. * km ; reference radius. PICK RADIUS ABOVE EY92 nuref = param[0] * 1e-9 lamref = param[1] a = 0 ; constant molecular weight if n_elements(param) eq 6 then b = param[5] else b = 0 ; temperature exponent r1 = param[2] * km ; top of haze kappa1 = param[3] ; haze ext coeff at onset htau1 = param[4] * km ; haze scale height at onset distobs = 4.343e9 * km ; distance in cm for p8 event rsurf = 1000. * km ; cutoff farside = 0 ; no farside haze = 1 ; haze order = 4 ; order for series expansion mu0 = 28.0100 ; molecular weight mp = 1.30497E+25 ; mass of planet (or dwanet) in g nustp = 0.000298000 ; refractivity at STP physconstants ; define !phys loschmidt = 1.01325e6/(!phys.k * 273.15) ; y : shadow radius (cm) ; r : radius (cm) r = oclc_ey92_r_of_rho(rref,nuref,lamref,a,b, distobs, order, y) ; phi : flux phi = oclc_ey92_phi_of_r(rref, nuref, lamref, a, b, r1, kappa1, htau1, $ distobs, rsurf, order, r) ; For debugging - confirm both give the same phi ; phi2 = oclc_ey92_phi_of_rho(rref, nuref, $ ; lamref, a, b, $ ; r1, kappa1, htau1, $ ; distobs, rsurf, farside, haze, order, $ ; y) ; t : temperature (K) t = oclc_ey92_t(rref,lamref, b, Mp, mu0, r) ; dt : temperature derivative (K/cm), dT/dr dt = oclc_ey92_dt(rref,lamref, b, Mp, mu0, r) ; d2t : temperature curvature (K/cm^2), d^2T/dr^2 d2t = oclc_ey92_d2t(rref,lamref, b, Mp, mu0, r) ; H : scale height (cm) h = oclc_ey92_h(rref,lamref, a, b, r) ; lam : energy ratio lam = oclc_ey92_lam(rref,lamref, a, b, r) ; n : number density (cm^-3) n = oclc_ey92_n(rref,nuref,lamref,a,b,nustp, r) ; nu : refractivity nu = oclc_ey92_nu(rref,nuref,lamref,a,b, r) ; p : pressure (microbar) p = oclc_ey92_p(rref, nuref, lamref, a, b, mp, mu0, nustp, r) ; kappa : linear optical depth (cm^-1) kappa = oclc_ey92_kappa(r1, kappa1, htau1, r) ; tauvert : vertical optical depth tauvert = oclc_ey92_tauvert(r1, kappa1, htau1, order, r) ; tauobs : line-of-sight optical depth tauobs = oclc_ey92_tauobs(r1, kappa1, htau1, order, r) atm = { $ rref:rref, $ ; rref : reference radius nuref : nuref, $ ; nuref : reference refractivity lamref : lamref, $ ; lamref : reference energy ratio a : a, $ ; a : molecular weight exponent b:b, $ ; b : temperature exponent r1:r1, $ ; r1 : top of haze radius (cm) kappa1:kappa1, $ ; kappa1 : linear optical depth at r1 (1/cm) htau1:htau1, $ ; htau1 : haze scale height at r1 distobs:distobs, $ ; distobs : distance to observer (cm) rsurf:rsurf, $ ; rsurf : surface radius farside:farside, $ ; farside : 0 = no farside haze:haze, $ ; haze : 1 = haze order:order, $ ; order : order for series in EY92 y:y, $ ; y : shadow radius (cm) phi:phi, $ ; phi : flux r:r, $ ; r : radius (cm) t:t, $ ; t : temperature (K) dt:dt, $ ; dt : T derivative (K/cm), dT/dr d2t:d2t, $ ; d2t : T curvature (K/cm^2), d^2T/dr^2 h:h, $ ; H : scale height (cm) lam:lam, $ ; lam : energy ratio n:n, $ ; n : number density (cm^-3) nu:nu, $ ; nu : refractivity p:p, $ ; p : pressure (microbar) kappa:kappa, $ ; kappa : linear optical depth (cm^-1) tauvert:tauvert, $ ; tauvert : vertical optical depth tauobs:tauobs $ ; tauobs : line-of-sight optical depth } return, atm end