Model variable names#
aeolus
provides functionality to store model-specific variable and coordinate names in one container, which can be passed to various functions.
The base class is called Model
and is stored in the base
submodule
[1]:
from aeolus.model.base import Model
It can be used to create custom Model
classes for different datasets.
Example#
For example, for the LMD-G model, one can define the following.
[2]:
lmdg = Model(
# Coordinates
t="Time",
z="altitude",
y="latitude",
x="longitude",
# Variables
u="u",
v="v",
w="w",
pres="p",
)
[3]:
lmdg.x
[3]:
'longitude'
Unified Model#
The standard container for the UK Met Office Unified Model is called um
and can be imported from aeolus.model
:
[4]:
from aeolus.model import um
It does not amount to having the whole STASH table at hand, instead it contains names of commonly used variables and coordinates, which are useful in a specific project as shortcuts.
[5]:
um.u, um.v, um.w
[5]:
('x_wind', 'y_wind', 'upward_air_velocity')
[6]:
um.x, um.y, um.z
[6]:
('longitude', 'latitude', 'level_height')
There is also a duplicate class that has STASH indices for the same variables:
[7]:
from aeolus.model import um_stash
It does not amount to having the whole STASH table, but it contains names of some commonly used variables and coordinates.
[8]:
um_stash.u, um_stash.v, um_stash.w
[8]:
('m01s00i002', 'm01s00i003', 'm01s00i150')
[9]:
um_stash.x, um_stash.y, um_stash.z
[9]:
('longitude', 'latitude', 'level_height')