pytmosph3r.atmosphere.altitudeatmosphere
Module Contents
- class AltitudeAtmosphere(model=None, n_vertical=100, n_latitudes=49, n_longitudes=64)[source]
Bases:
pytmosph3r.atmosphere.atmosphere.AtmosphereAtmospheric model with a (altitude, latitude, longitude) coordinate system. The attributes of this class are the same as
InputAtmosphere, except that they have been interpolated in a spherical grid.- property n_layers: int
Number of layers in the model.
- max_altitude
Max altitude in the model, calculated based on
min_pressure.
- aerosols
Aerosols for each point of the altitude grid, interpolated from
pytmosph3r.atmosphere.InputAtmosphere.aerosols(each aerosol is a dictionary with keys {‘mmr’, ‘reff’, ‘condensate_density’}).
- build()[source]
Ensure that all data has been computed and formatted in arrays of the same shape. Handle different configurations of pressure, temperature and chemistry.
- generate_altitude_grid()[source]
Build an atmospheric grid based on the highest altitude of the level-based atmospheric grid, discretized into
n_verticalpoints.
- interpolate_from_input()[source]
Interpolate pressure, temperature and gas mix ratios from levels to the new coordinate system.
- altitude_interp(lat, lon, dest, origin, interp='log')[source]
Interpolation of the values of
destbased on the information oforigin, associated with the altitude of theInputAtmosphere. This function operates on the (vertical) column at the location given by (lat,lon) in the atmosphere. The interpolation uses the altitude of the altitude grid as the input variables.- Parameters:
lat (int) – Latitude index
lon (int) – Longitude index
dest (
array) – Destination array to interpolate intoorigin (
array) – Origin array to interpolate frominterp (str) – ‘linear’, ‘log’, …