irfpy.mars.exosphere

Martian exosphere models.

Several density models for the Martian upper atmosphere.

Sample scripts are also available at snippet_mars.exosphere_max, snippet_mars.exosphere_min, snippet_mars.exosphere_demo

class irfpy.mars.exosphere.ISSI2008_SolarMax[source]

Bases: object

The neutral upper atmosphere profiles of CO2, O, and H used in the ISSI SWIM model challenge (solar max)

Code author: X.-D. Wang

Height profiles of five species (CO2, hot_O, cold_O, hot_H, cold_H) are obtained. TODO: include the partition function into the solar maximum profiles too.

>>> from irfpy.mars.exosphere import ISSI2008_SolarMax as exosph
>>> co2_250 = exosph.CO2(250)   # CO2 density at 250 km in /cm3.
>>> print('{:.3e}'.format(co2_250))
1.089e+07
>>> oc_250 = exosph.O_cold(250)   # Cold O denisty at 250 km.
>>> print('{:.3e}'.format(oc_250))
1.655e+07
>>> oh_250 = exosph.O_hot(250)   # Hot O density at 250 km.
>>> print('{:.3e}'.format(oh_250))
1.761e+04
>>> hc_250 = exosph.H_cold(250)  # Cold H density at 250 km.
>>> print('{:.3e}'.format(hc_250))
2.923e+01
>>> hh_250 = exosph.H_hot(250)   # Hot H density at 250 km.
>>> print('{:.3e}'.format(hh_250))
2.835e+04

The original models are fed by the MTGCM model. This is an analytical copy obtained by manual scaling the plots in Brain’s presentation. Following are the original texts on http://www.issibern.ch/teams/martianplasma/

Neutral Atmosphere:

All information will be based on results from Steve Bougher’s MTGCM, and published results from Jean-Yves Chaufray for hydrogen densities /?? Reference preferable ??/. The MTGCM was run for Ls=270, F10.7=105 at Mars.

CO2 number density (CO2()):

5.88e18 * exp( -z / 7.00 ) + 3.55e13 * exp( -z / 16.67 )

‘Cold’ O number density (O_cold()):

2.33e13 * exp( -z / 12.27 ) + 2.84e09 * exp( -z / 48.57 )

‘Cold’ H number density (H_cold()):

1e3 * exp[ 9.25e5 * ( 1 / (z+3393.5) - 1/3593.5) ]

Neutral Temperature (?? Not implemented ??):

-161.13 * exp[ -0.5 * ( (z-112.6) / 25.25 )^2 ] + 291.78

Following are the description of the extra hot corona components of hydrogen and oxygen.

Hot corona / Extended exosphere:

‘Hot’ Neutral Hydrogen (H_hot()):

3e4 * exp[ 1.48e4 * ( 1 / (z+3393.5) - 1/3593.5) ]

‘Hot’ Neutral Oxygen (O_hot()):

1.56e4 * exp( -z / 696.9) + 2.92e3 * exp( -z / 2891.) + 5.01e4 * exp( -z / 99.19)

static CO2(z)[source]

CO2 density model for solar max at Mars.

Parameters:

z – Altitude in km.

Returns:

CO2 density in /cm3.

static O_cold(z)[source]

Cold O density model for solar max at Mars.

Parameters:

z – Altitude in km.

Returns:

Cold O density in /cm3.

static H_cold(z)[source]

Cold H density model for solar max at Mars.

Parameters:

z – Altitude in km.

Returns:

Cold H density in /cm3.

static H_hot(z)[source]

Hot H density model for solar max at Mars.

Parameters:

z – Altitude in km.

Returns:

Hot H density in /cm3.

static O_hot(z)[source]

Hot O density model for solar max at Mars.

Parameters:

z – Altitude in km.

Returns:

Hot O density in /cm3.

class irfpy.mars.exosphere.ISSI2008_SolarMin[source]

Bases: object

The neutral upper atmosphere profiles of CO2, O, and H used in the ISSI SWIM model challenge (solar min).

Code author: X.-D. Wang

Height profiles of the number densities for five species (CO2, hot_O, cold_O, hot_H, cold_H) are obtained.

>>> from irfpy.mars.exosphere import ISSI2008_SolarMin as exosph
>>> co2_250 = exosph.CO2(250)   # CO2 density at 250 km in /cm3.
>>> print('{:.3e}'.format(co2_250))
5.950e+05
>>> oc_250 = exosph.O_cold(250)   # Cold O denisty at 250 km.
>>> print('{:.3e}'.format(oc_250))
4.472e+06
>>> oh_250 = exosph.O_hot(250)   # Hot O density at 250 km.
>>> print('{:.3e}'.format(oh_250))
6.599e+03
>>> hc_250 = exosph.H_cold(250)  # Cold H density at 250 km.
>>> print('{:.3e}'.format(hc_250))
1.358e+05
>>> hh_250 = exosph.H_hot(250)   # Hot H density at 250 km.
>>> print('{:.3e}'.format(hh_250))
1.826e+04

The original models are fed by the MTGCM model. This is an analytical copy obtained by manual scaling the plots in Brain’s presentation. Following are the original texts on http://www.issibern.ch/teams/martianplasma/

Neutral Atmosphere:

All information will be based on results from Steve Bougher’s MTGCM, and published results from Jean-Yves Chaufray for hydrogen densities. The MTGCM was run for Ls=270, F10.7 = 34 at Mars.

z is referenced from the Martian surface, in km. Density has units of cm^-3.

CO2 number density:

6.04e18 * exp( -z / 6.98 ) + 1.67e15 * exp( -z / 11.49 )

O number density:

5.85e13 * exp( -z / 10.56 ) + 7.02e09 * exp( -z / 33.97 )

H number density:

1.5e5 * exp[ 25965 * ( 1 / (z+3393.5) - 1/3593.5) ]

Neutral Temperature:

-64.56 * exp[ -0.5 * ( (z-115.7) / 20.14 )^2 ] + 196.95

Following are the description of the extra hot corona components of hydrogen and oxygen.

Neutral Hydrogen (Cold and Hot):

Use the same cold hydrogen profile as before, but now add a hot component.

hot component:

1.9e4 * exp[ 10365 * ( 1 / (z+3393.5) - 1 / 3593.5) ]

Neutral Oxygen (Cold and Hot):

Use the same cold oxygen profile as before, but now add a hot component, supplied by Arnaud Valeille.

hot component:

5.23e3 * exp( -z / 626.2) + 9.76e2 * exp( -z / 2790.) + 3.71e4 * exp( -z / 88.47) ]

R_m = 3376000.0
static part_func(r, lam=None, Tc=200, partfun=0)[source]

Polynomial implementation of Chamberlain’s partition function zeta. Obselete due to large error for high altitudes.

Parameters:
  • r – radius from Mars center, in meters

  • zc – exobase altitude, in meters

  • hc – scale height at exobase, in meters

  • partfun – flag to determine what partition function to use. 1 for polynomial, 2 for Chamberlain1963.

Default values (zc=200e3, hc=1176e3) are for the hot hydrogen component: Tc = 500 K, nc = 1.5e4 cm-3 [chaufray2008] :return: (?? Any description ??)

static CO2(z)[source]

CO2 density model for solar min at Mars.

Parameters:

z – Altitude in km.

Returns:

CO2 density in /cm3.

static O_cold(z)[source]

Cold O density model for solar min at Mars.

Parameters:

z – Altitude in km.

Returns:

Cold O density in /cm3.

static H_cold(z, part=0)[source]

Cold H density model for solar min at Mars.

Parameters:
  • z – Altitude in km.

  • part – /?? Any description ??/

Returns:

Cold H density in /cm3.

static H_hot(z, part=0)[source]

Hot H density model for solar min at Mars.

Parameters:
  • z – Altitude in km.

  • part – /?? Any description ??/

Returns:

Hot H density in /cm3.

static O_hot(z)[source]

Hot O density model for solar min at Mars.

Parameters:

z – Altitude in km.

Returns:

Hot O density in /cm3.

class irfpy.mars.exosphere.ZetaChamberlain1963[source]

Bases: object

Implementation of Chamberlain’s partition function for ballistic, satellite and escape populations.

Code author: X.-D. Wang

<?? More detailed comments if this class is intended to be used by users ??>

G = 6.67408e-11
Mars_mass = 6.417e+23
mp = 1.67e-27
kb = 1.38e-23
R_m = 3376000.0
lam_c_tab = array([ 1. ,  2. ,  3. ,  4. ,  5. ,  7.5, 10. , 15. ])
lams_full = array([ 0.1,  0.2,  0.3,  0.4,  0.5,  0.6,  0.7,  0.8,  0.9,  1. ,  1.1,         1.2,  1.3,  1.4,  1.5,  1.6,  1.7,  1.8,  1.9,  2. ,  2.1,  2.2,         2.3,  2.4,  2.5,  2.6,  2.7,  2.8,  2.9,  3. ,  3.5,  4. ,  4.5,         5. ,  5.5,  6. ,  6.5,  7. ,  7.5,  8. ,  8.5,  9. ,  9.5, 10. ,        11. , 12. , 13. , 14. , 15. ])
beta = 5182756824.000002
Tcs = array([1449.31678523,  724.65839262,  483.10559508,  362.32919631,         289.86335705,  193.24223803,  144.93167852,   96.62111902])
static gam(a, x)[source]

UNNORMALIZED Incomplete Gamma function. = scipy.gamma * scipy.gammainc :param a: :param x: :return:

classmethod zeta_chamberlain1963_tab(lam_c_orig)[source]

Tabulated Chamberlain’s partition function. Copied from Chamberlain1963, used to verify the analytical implementation. :param lam_c_orig: Original lambda value.

Returns:

zeta values as a function of lambda.

classmethod zeta_bal_shen1963(r, T)[source]

Analytical format for the ballistic orbits from Shen 1963, cited by Chamberlain 1963.

Parameters:
  • r

  • T

Returns:

classmethod zeta_chamberlain1963(r, Tc=200, planetmass=6.417e+23, rc=3597000.0, particlemass=1.67e-27, lam=None)[source]

Partition function from Chamberlain 1963, analytical, with 3 types of orbits.

Parameters:
  • r – Radius of the point of interest, in meter.

  • Tc – Exobase temperature, in Kelvin. If lam kwarg is set, At least ONE of r and Tc must be scalar.

  • planetmass – Mass of the planet, in kg. By default Mars.

  • rc – Radius of the exobase, in meter. By default the Mars exobase at R_m + 200 km.

  • particlemass – Mass of the interested particles, in kg. By default hydrogen atom, 1 amu.

  • lam – Input lambda values instead of radius. If lam is input, it must have the same dimension as r.

Returns:

All returned values have same dimension as the array in r or Tc. lam, lambda values for r with exobase temperature Tc: lambda = G * M * m/(kb * Tc * r) lam_c, lambda value for exobase with temperature Tc: lambda_c = G * M * m/(kb * Tc * rc) z_bal, Ballistic orbit zeta function value(s) at radius r with exobase tmperature Tc. Range [0, 1] z_sat, Satellite orbit zeta function. z_esc, Escape orbit zeta function.