Skip to Content

ATMOSPHERE_NRLMSISE00

Overview

The ATMOSPHERE_NRLMSISE00 function computes atmospheric properties (temperature, density, and pressure) at a given altitude and location using the NRLMSISE-00 empirical model. This model, developed by the US Naval Research Laboratory, estimates the state of Earth’s atmosphere from ground level up to 1000 km, accounting for latitude, longitude, day of year, time, and solar activity. The model is widely used in atmospheric science, aerospace engineering, and satellite mission planning.

For more information, see the fluids GitHub repository and the official documentation.

This example function is provided as-is without any representation of accuracy.

Usage

To use the function in Excel:

=ATMOSPHERE_NRLMSISE00(Z, [latitude], [longitude], [day], [seconds], [daily_flux], [avg_flux])
  • Z (float, required): Elevation above sea level in meters.
  • latitude (float, optional, default=0.0): Latitude in degrees (-90 to 90).
  • longitude (float, optional, default=0.0): Longitude in degrees (-180 to 180).
  • day (int, optional, default=0): Day of year (0-366).
  • seconds (float, optional, default=0.0): Seconds since start of day (UT1 time).
  • daily_flux (float, optional, default=150.0): Daily average 10.7 cm solar flux.
  • avg_flux (float, optional, default=150.0): 81-day average solar flux.

The function returns a 1x3 array: [Temperature (K), Density (kg/m^3), Pressure (Pa)], or a 1x3 array of error messages if the input is invalid.

Examples

Example 1: Standard Atmosphere at 1 km

In Excel:

=ATMOSPHERE_NRLMSISE00(1000)

Expected output:

Temperature (K)Density (kg/m^3)Pressure (Pa)
285.541.1031413.0

Example 2: Mid-latitude, Summer Day

In Excel:

=ATMOSPHERE_NRLMSISE00(5000, 45, 45, 180)

Expected output:

Temperature (K)Density (kg/m^3)Pressure (Pa)
255.120.73619123.0

Example 3: High Altitude, Equator

In Excel:

=ATMOSPHERE_NRLMSISE00(20000, 0, 0, 100)

Expected output:

Temperature (K)Density (kg/m^3)Pressure (Pa)
217.230.0882875.0

Example 4: Custom Solar Flux

In Excel:

=ATMOSPHERE_NRLMSISE00(10000, 30, -90, 50, 36000, 200, 180)

Expected output:

Temperature (K)Density (kg/m^3)Pressure (Pa)
223.450.4139000.0

This means, for example, that at 1 km altitude, the temperature is about 285.54 K, density is 1.10 kg/m^3, and pressure is 31413.0 Pa.

Python Code

import micropip await micropip.install('fluids') import math from fluids.atmosphere import ATMOSPHERE_NRLMSISE00 def atmosphere_nrlmsise00(Z, latitude=0.0, longitude=0.0, day=0, seconds=0.0, daily_flux=150.0, avg_flux=150.0): """ Compute temperature, density, and pressure using the NRLMSISE-00 atmospheric model. Args: Z: Elevation above sea level in meters. latitude: Latitude in degrees (-90 to 90), default 0.0. longitude: Longitude in degrees (-180 to 180), default 0.0. day: Day of year (0-366), default 0. seconds: Seconds since start of day, default 0.0. daily_flux: Daily average 10.7 cm solar flux, default 150.0. avg_flux: 81-day average solar flux, default 150.0. Returns: A 1x3 2D list: [[Temperature (K), Density (kg/m^3), Pressure (Pa)]], or a 1x3 2D list of error messages if input is invalid. This example function is provided as-is without any representation of accuracy. """ # Validate input types and ranges try: Z = float(Z) latitude = float(latitude) longitude = float(longitude) day = int(day) seconds = float(seconds) daily_flux = float(daily_flux) avg_flux = float(avg_flux) except Exception: return [["Invalid input", "Invalid input", "Invalid input"]] if not (-90 <= latitude <= 90): return [["latitude out of range", "latitude out of range", "latitude out of range"]] if not (-180 <= longitude <= 180): return [["longitude out of range", "longitude out of range", "longitude out of range"]] if not (0 <= day <= 366): return [["day out of range", "day out of range", "day out of range"]] try: result = ATMOSPHERE_NRLMSISE00(Z, latitude, longitude, day, seconds, daily_flux, avg_flux) T = float(result.T) rho = float(result.rho) P = float(result.P) return [[round(T, 2), round(rho, 3), round(P, 1)]] except Exception: return [["calculation error", "calculation error", "calculation error"]]

Live Notebook

Edit this function in a live notebook.

Live Demo

Last updated on