;+ ; NAME: ; oclc_fwd_h.pro ; ; PURPOSE: ; Calculates the pressure scale height, h, ; ; DESCRIPTION: ; ; CALLING SEQUENCE: ; h = oclc_fwd_h(r, t, mu, mp) ; ; INPUTS: ; **** All inputs in cgs units ******** ; ; r - An array of radius values from the center of the planet, in cm. ; The radius array could be in ascending or descending order. ; t - An array (corresponding to r) or scalar of the temperature, ; in Kelvin. ; mu - An array (corresponding to r) or scalar of the molecular weight ; (unitless). ; mp - the planetary mass, in grams. ; ; OUTPUTS: ; h - pressure scale height in cm ; ; EXAMPLE 1 - scalar temperature, molecular weight ; r = dindgen(200)*1d5 + 1200d5 ; array of r, in cm ; r0 = 1250d5 ; reference r in cm ; t = 104.d ; scalar temperature in K ; mu = 28.01d ; scalar molecular weight ; mp = 1.3d25 ; reference planet mass in g ; h = oclc_fwd_h(r, t, mu, mp) ; ; ---- exact calculation, see Elliot and Young 1992 ; lam = (!phys.g*mp*mu*!phys.m_u/(!phys.k*t*r )) ;energy ratio ; h2 = r/lam ; ; plot, r/1e5, (h-h2)/h2 ; print, minmax( (h-h2)/h2 ) ; ; print, mean( (h-h2)/h2 ) ; ; ; ; EXAMPLE 2 - variable temperature ; r = dindgen(200)*1d5 + 1200d5 ; array of r, in cm ; r0 = 1250d5 ; reference r in cm ; b = -2.d ; t0 = 104.d ; t = t0 * (r/r0)^b ; scalar temperature in K ; mu = 28.01d ; scalar molecular weight ; mp = 1.3d25 ; reference planet mass in g ; h = oclc_fwd_h(r, t, mu, mp) ; ; ---- exact calculation, see Elliot and Young 1992 ; lam = (!phys.g*mp*mu*!phys.m_u/(!phys.k*t *r )) ;energy ratio ; h2 = r/lam ; ; plot, r/1e5, (h-h2)/h2 ; print, minmax( (h-h2)/h2 ) ; ; print, mean( (h-h2)/h2 ) ; ; ; REVISON HISTORY: ; 25-Aug-2006 CBO SwRI -- modified from LAY's lightcurve.pro ; 23-Sep-2006 LAY SwRI -- changed some variable names, added example ; ;- function oclc_fwd_h, r, t, mu, mp physconstants gravacc = !phys.g * mp / (r^2) sclhgt= !phys.k * t/(mu * !phys.m_u * gravacc) return, sclhgt end