Operations on geographical grid¶
-
aeolus.grid.
roll_cube_0_360
(cube_in, inplace=False)[source]¶ Take a cube spanning -180…180 degrees in longitude and roll it to 0…360 degrees.
Works with global model output, and in some cases for regional.
- Parameters
cube (iris.cube.Cube) – Cube with longitude and latitude coordinates.
coord_name (str, optional) – Name of the longitude coordinate.
inplace (bool, optional) – Do this in-place or copy the cube.
- Returns
- Return type
See also
-
aeolus.grid.
roll_cube_pm180
(cube_in, coord_name='longitude', inplace=False)[source]¶ Take a cube spanning 0…360 degrees in longitude and roll it to -180…180 degrees.
Works with global model output, and in some cases for regional.
- Parameters
cube (iris.cube.Cube) – Cube with longitude and latitude coordinates.
coord_name (str, optional) – Name of the longitude coordinate.
inplace (bool, optional) – Do this in-place or copy the cube.
- Returns
- Return type
See also
-
aeolus.grid.
area_weights_cube
(cube, r_planet=None, normalize=False)[source]¶ Create a cube of area weights for an arbitrary planet.
- Parameters
cube (iris.cube.Cube) – Cube with longitude and latitude coordinates
r_planet (float, optional) – Radius of the planet.
normalize (bool, optional) – Normalize areas.
- Returns
Cube of area weights with the same metadata as the input cube
- Return type
-
aeolus.grid.
add_binned_lon_lat
(cube, lon_bins, lat_bins, coord_names=['latitude', 'longitude'], inplace=False)[source]¶ Add binned longitude and latitude as auxiliary coordinates to a cube.
- Parameters
cube (iris.cube.Cube) – Cube with longitude and latitude coordinates.
lon_bins (array-like) – Longitude bins.
lat_bins (array-like) – Latitude bins.
coord_names (list, optional) – List of latitude and longitude labels.
inplace (bool, optional) – Do this in-place or copy the cube.
- Returns
- Return type
-
aeolus.grid.
coarsen_cube
(cube, lon_bins, lat_bins, coord_names=['latitude', 'longitude'], inplace=False)[source]¶ Block-average cube in longitude and latitude.
Note: no weighting is applied!
- Parameters
cube (iris.cube.Cube) – Cube with longitude and latitude coordinates.
lon_bins (array-like) – Longitude bins.
lat_bins (array-like) – Latitude bins.
coord_names (list, optional) – List of latitude and longitude labels.
inplace (bool, optional) – Do this in-place or copy the cube.
- Returns
- Return type