easyclimate.physics.geo

Submodules

Functions

get_coriolis_parameter(→ xarray.DataArray | numpy.array)

Calculate the Coriolis parameter at each point.

calc_lat_weight_lin_rood(→ Tuple[numpy.ndarray, ...)

Calculate the latitudes and weights used by the Lin-Rood model.

Package Contents

easyclimate.physics.geo.get_coriolis_parameter(lat_data: xarray.DataArray | numpy.array, omega: float = 7.292e-05) xarray.DataArray | numpy.array

Calculate the Coriolis parameter at each point.

\[f = 2 \Omega \sin(\phi)\]

Parameters

lat_data: xarray.DataArray or numpy.array.

Latitude at each point.

omega: float, default: 7.292e-5 ( \(\mathrm{rad/s}\) ).

The angular speed of the earth.

Returns

Corresponding Coriolis force at each point ( \(\mathrm{s^{-1}}\) ).

xarray.DataArray or numpy.array.

Reference

easyclimate.physics.geo.calc_lat_weight_lin_rood(nlat: int) Tuple[numpy.ndarray, numpy.ndarray]

Calculate the latitudes and weights used by the Lin-Rood model.

The Lin-Rood model requires a specific distribution of latitudes and corresponding weights for numerical integration on a spherical grid. This function generates these values based on the number of desired latitudes.

Parameters

nlatint

Number of latitudes. Must be at least 2 to define a valid grid (from pole to pole).

Returns

Tuple[ndarray, ndarray]

A tuple containing two numpy arrays: - lat : ndarray

Array of latitudes in degrees, ranging from -90 (South Pole) to 90 (North Pole).

  • weightndarray

    Array of weights corresponding to each latitude, used for numerical integration.

Tip

The weights are computed such that they are suitable for use in the Lin-Rood semi-Lagrangian transport scheme. The latitudes are uniformly spaced between the poles.

References