:py:mod:`pytmosph3r.atmosphere.altitudeatmosphere` ================================================== .. py:module:: pytmosph3r.atmosphere.altitudeatmosphere Module Contents --------------- .. py:class:: AltitudeAtmosphere(model=None, n_vertical=100, n_latitudes=49, n_longitudes=64) Bases: :py:obj:`pytmosph3r.atmosphere.atmosphere.Atmosphere` Atmospheric model with a (altitude, latitude, longitude) coordinate system. The attributes of this class are the same as :class:`~pytmosph3r.atmosphere.input_atmosphere.InputAtmosphere`, except that they have been interpolated in a spherical grid. .. py:property:: n_layers :type: int Number of layers in the model. .. py:property:: n_levels :type: int Number of levels in the model (equal to :py:attr:`n_layers` `+1`). .. py:attribute:: max_altitude Max altitude in the model, calculated based on :py:attr:`~pytmosph3r.model.Model.min_pressure`. .. py:attribute:: altitude_levels Altitudes of each level (separating each layer). :obj:`Array` of length :py:attr:`n_levels`. .. py:attribute:: altitude Altitudes in the middle of each layer. :obj:`Array` of length :py:attr:`n_layers`. .. py:attribute:: aerosols Aerosols for each point of the altitude grid, interpolated from :attr:`pytmosph3r.atmosphere.InputAtmosphere.aerosols` (each aerosol is a dictionary with keys {'mmr', 'reff', 'condensate_density'}). .. py:method:: build() Ensure that all data has been computed and formatted in arrays of the same shape. Handle different configurations of pressure, temperature and chemistry. .. py:method:: index_altitude(altitude) Gives the index of the layer containing an `altitude` (given in `m`). .. py:method:: generate_altitude_grid() Build an atmospheric grid based on the highest altitude of the level-based atmospheric grid, discretized into :py:attr:`n_vertical` points. .. py:method:: interpolate_from_input() Interpolate pressure, temperature and gas mix ratios from levels to the new coordinate system. .. py:method:: altitude_interp(lat, lon, dest, origin, interp='log') Interpolation of the values of :py:attr:`dest` based on the information of :py:attr:`origin`, associated with the altitude of the :class:`~pytmosph3r.atmosphere.InputAtmosphere`. This function operates on the (vertical) column at the location given by (:py:attr:`lat`, :py:attr:`lon`) in the atmosphere. The interpolation uses the altitude of the altitude grid as the input variables. :param lat: Latitude index :type lat: int :param lon: Longitude index :type lon: int :param dest: Destination array to interpolate into :type dest: :obj:`array` :param origin: Origin array to interpolate from :type origin: :obj:`array` :param interp: 'linear', 'log', ... :type interp: str .. py:method:: compute_pressure() Re-compute the pressure lower than min_pressure, using the hydrostatic equilibrium equation. .. py:method:: outputs()