Skip to content

Commit 4bb9dd6

Browse files
committed
cset successful run
1 parent 41446d2 commit 4bb9dd6

File tree

3 files changed

+57
-3
lines changed

3 files changed

+57
-3
lines changed

cset_bash.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ export CFLAGS="-I$LIBMO_DIR/include"
2020
export LDFLAGS="-L$LIBMO_DIR/lib"
2121
export PKG_CONFIG_PATH="$LIBMO_DIR/lib/pkgconfig:$PKG_CONFIG_PATH"
2222

23-
uv pip install --no-binary :all: git+https://github.com/SciTools/mo_pack.git
24-
uv pip install numpy==1.26.4
25-
uv pip install CSET==25.12.1
23+
uv pip install --no-binary :all: git+https://github.com/SciTools/mo_pack.git@8fb088227f4ffd1b45823309feb65cc6495fb19a
24+
uv pip install numpy==1.26.4 CSET==25.12.1
2625

2726
echo $LD_LIBRARY_PATH
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1+
from pathlib import Path
2+
import CSET.operators
3+
import yaml
4+
from yaml.loader import SafeLoader
5+
import numpy
16

7+
print(numpy.__version__)
8+
9+
recipe_path = "/users/sowens/WeatherGenerator/test_CSETinput/air_temperature_spatial_plot.yaml"
10+
with open(recipe_path) as stream:
11+
recipe = yaml.load(stream, Loader=SafeLoader)
12+
13+
CSET.operators.execute_recipe(
14+
recipe,
15+
#Path("/users/sowens/WeatherGenerator/test_CSETinput/air_temp.nc"),
16+
Path("/users/sowens/WeatherGenerator/test_CSETinput")
17+
)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Name of the recipe.
2+
title: Surface air temperature spatial plot
3+
# Category of recipe, used to group together multiple recipes in output.
4+
category: Quick look
5+
# Description will be displayed alongside output.
6+
description: |
7+
Extended description that can go across multiple lines. It is written in
8+
[Markdown](https://commonmark.org/help/) and can thus contain links and
9+
_formatting_.
10+
11+
# Sequence of steps to run.
12+
steps:
13+
# Specify the operator to run in each step.
14+
- operator: read.read_cubes
15+
# Specify the name of the argument, and its value.
16+
file_paths: "/users/sowens/WeatherGenerator/test_CSETinput/*.nc"
17+
18+
- operator: filters.filter_cubes
19+
# Can specify extra keyword arguments as sub-maps.
20+
constraint:
21+
operator: constraints.combine_constraints
22+
var_constraint:
23+
# Can nest in another operator to use its output as an argument,
24+
# multiple levels deep if needed.
25+
operator: constraints.generate_var_constraint
26+
# Input implicitly taken from the previous step, but can be overridden
27+
# by using the appropriate keyword argument.
28+
varname: m01s03i236
29+
cell_method_constraint:
30+
operator: constraints.generate_cell_methods_constraint
31+
# Values can be more than just strings, such as this empty list.
32+
cell_methods: []
33+
34+
# Save a sequence of plots, one per time.
35+
- operator: plot.spatial_pcolormesh_plot
36+
37+
# Save a single cube with all the processed data.
38+
- operator: write.write_cube_to_nc
39+
overwrite: True

0 commit comments

Comments
 (0)