INNER CODE UNIT · Python

_ensure_pressure_ordering

QianyeSu/Skyborn · src/skyborn/calc/GPI/core.py:207

def _ensure_pressure_ordering(pressure_levels, temperature, mixing_ratio):
    """
    Ensure pressure levels are ordered from surface to top (high to low pressure).

    The Fortran code expects pressure levels with:
    - Index 1 = highest pressure (surface/ground level)
    - Index N = lowest pressure (top of atmosphere)

    Parameters
    ----------
    pressure_levels : ndarray
        Pressure levels [mb]
    temperature : ndarray
        Temperature data with pressure as first or second dimension
    mixing_ratio : ndarray
        Mixing ratio data with same shape as temperature

    Returns

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…