Skip to content

Commit 1e2b039

Browse files
committed
Use ifs name 'si' for wind speed instead of 'sp'
1 parent 36825f6 commit 1e2b039

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/plotting/colormap_defaults.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def _fallback():
1717
"2t": load_ncl_colormap("t2m_29lev.ct") | {"units": "degC"},
1818
"10v": load_ncl_colormap("modified_uv_17lev.ct") | {"units": "m/s"},
1919
"10u": load_ncl_colormap("modified_uv_17lev.ct") | {"units": "m/s"},
20-
"10sp": load_ncl_colormap("modified_uv_17lev.ct") | {"units": "m/s"},
21-
"10si": {"cmap": plt.get_cmap("GnBu", 11), "vmin": 0, "vmax": 25},
20+
"10si": load_ncl_colormap("modified_uv_17lev.ct") | {"units": "m/s"},
21+
# "10si": {"cmap": plt.get_cmap("GnBu", 11), "vmin": 0, "vmax": 25},
2222
"t_850": {"cmap": plt.get_cmap("inferno", 11), "vmin": 220, "vmax": 310},
2323
"z_850": {"cmap": plt.get_cmap("coolwarm", 11), "vmin": 8000, "vmax": 17000},
2424
"q_925": load_ncl_colormap("RH_6lev.ct"),

workflow/Snakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ rule showcase_all:
5252
/ "showcases/{run_id}/{init_time}/{init_time}_{param}_{region}.gif",
5353
init_time=[t.strftime("%Y%m%d%H%M") for t in REFTIMES],
5454
run_id=collect_all_candidates(),
55-
param=["tp", "2t", "10sp"],
55+
param=["tp", "2t", "10si"],
5656
region=["globe", "europe", "switzerland"],
5757
),
5858

workflow/scripts/plot_forecast_frame.mo.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ def _(ArgumentParser, Path):
7676
def _(grib_dir, init_time, lead_time, load_state_from_grib, param):
7777
# load grib file
7878
grib_file = grib_dir / f"{init_time}_{lead_time}.grib"
79-
if param == "10sp":
79+
if param == "10si":
8080
paramlist = ["10u", "10v"]
81-
elif param == "sp":
81+
elif param == "si":
8282
paramlist = ["u", "v"]
8383
else:
8484
paramlist = [param]
@@ -159,21 +159,21 @@ def _m_to_mm(arr):
159159
def preprocess_field(param: str, state: dict):
160160
"""
161161
- Temperatures (2t, 2d, t, d): K -> °C
162-
- Wind speed at 10m (10sp): m/s -> kn, sqrt(10u^2 + 10v^2)
163-
- Wind speed (sp): m/s -> kn, sqrt(u^2 + v^2)
162+
- Wind speed at 10m (10si): m/s -> kn, sqrt(10u^2 + 10v^2)
163+
- Wind speed (si): m/s -> kn, sqrt(u^2 + v^2)
164164
Returns: (field_array, units_override or None)
165165
"""
166166
fields = state["fields"]
167167
# temperature variables
168168
if param in ("2t", "2d", "t", "d"):
169169
return _k_to_c(fields[param]), "°C"
170170
# 10m wind speed (allow legacy 'uv' alias)
171-
if param == "10sp":
171+
if param == "10si":
172172
u = fields["10u"]
173173
v = fields["10v"]
174174
return np.sqrt(u**2 + v**2), "m/s"
175175
# wind speed from standard-level components
176-
if param == "sp":
176+
if param == "si":
177177
u = fields["u"]
178178
v = fields["v"]
179179
return np.sqrt(u**2 + v**2), "m/s"

0 commit comments

Comments
 (0)