Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/CSET/operators/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from pathlib import Path
from typing import Literal

import dask
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are now explicitly importing dask we need to add it as a new dependency.

import iris
import iris.coord_systems
import iris.coords
Expand Down Expand Up @@ -789,8 +790,7 @@ def _fix_lfric_cloud_base_altitude(cube: iris.cube.Cube):
varnames = filter(None, [cube.long_name, cube.standard_name, cube.var_name])
if any("cloud_base_altitude" in name for name in varnames):
# Mask cube where set > 144kft to catch default 144.35695538058164
cube.data = np.ma.masked_array(cube.data)
cube.data[cube.data > 144.0] = np.ma.masked
cube.data = dask.array.ma.masked_greater(cube.core_data(), 144.0)


def _fix_um_winds(cubes: iris.cube.CubeList):
Expand Down Expand Up @@ -842,8 +842,8 @@ def _convert_wind_true_dirn_um(cubes: iris.cube.CubeList):
v_grids = cubes.extract(iris.AttributeConstraint(STASH="m01s03i226"))
for u, v in zip(u_grids, v_grids, strict=True):
true_u, true_v = rotate_winds(u, v, iris.coord_systems.GeogCS(6371229.0))
u.data = true_u.data
v.data = true_v.data
u.data = true_u.core_data()
v.data = true_v.core_data()


def _normalise_var0_varname(cube: iris.cube.Cube):
Expand Down
Loading