Skip to content

Commit b9b48f3

Browse files
[pre-commit.ci] pre-commit autoupdate (#216)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/keewis/blackdoc: v0.3.9 → v0.4.1](keewis/blackdoc@v0.3.9...v0.4.1) - [github.com/PyCQA/flake8: 7.2.0 → 7.3.0](PyCQA/flake8@7.2.0...7.3.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent d9d3d0f commit b9b48f3

File tree

3 files changed

+31
-30
lines changed

3 files changed

+31
-30
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ repos:
2828
- id: black-jupyter
2929

3030
- repo: https://github.com/keewis/blackdoc
31-
rev: v0.3.9
31+
rev: v0.4.1
3232
hooks:
3333
- id: blackdoc
3434

3535
- repo: https://github.com/PyCQA/flake8
36-
rev: 7.2.0
36+
rev: 7.3.0
3737
hooks:
3838
- id: flake8
3939

docs/source/branding/index.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from matplotlib.patches import BoxStyle, FancyBboxPatch, Polygon
77
import matplotlib.pyplot as plt
88
import numpy as np
9+
910
%matplotlib inline
1011
%config InlineBackend.figure_format='retina'
1112
```
@@ -22,7 +23,7 @@ font_options = {
2223
"fontweight": "semibold",
2324
"fontsize": 200,
2425
"ha": "center",
25-
"va": "center_baseline"
26+
"va": "center_baseline",
2627
}
2728
letter_y_shift = 0.038
2829
```
@@ -32,11 +33,7 @@ def generate_xwrf_logo(ax, bg_type="bg_light"):
3233
"""Create xwrf logo using provided Axes and specified color pattern."""
3334
# Define the "X" triangles
3435
gap_side = gap_width / np.sqrt(2)
35-
tri_left = np.array([
36-
[-0.5, 0.5 - gap_side],
37-
[-gap_side, 0],
38-
[-0.5, -0.5 + gap_side]
39-
])
36+
tri_left = np.array([[-0.5, 0.5 - gap_side], [-gap_side, 0], [-0.5, -0.5 + gap_side]])
4037
tri_right = tri_left * np.array([[-1, 1]])
4138
tri_bottom = tri_left[:, ::-1]
4239
tri_top = tri_right[:, ::-1]
@@ -49,25 +46,29 @@ def generate_xwrf_logo(ax, bg_type="bg_light"):
4946
ax.text(i, letter_y_shift, letter, fontdict=local_font_options)
5047

5148
# u ticks and v ticks
52-
for u_pos in np.arange(-0.5, 4, 1.):
53-
ax.add_patch(FancyBboxPatch(
54-
(-tick_width / 2 + u_pos, -tick_height),
55-
tick_width,
56-
tick_height,
57-
boxstyle=BoxStyle("Round", pad=tick_height/4),
58-
facecolor=tick_color,
59-
edgecolor=tick_color
60-
))
61-
for v_pos in np.arange(0, 4, 1.):
62-
for y_offset in (-0.5, 0.5):
63-
ax.add_patch(FancyBboxPatch(
64-
(-tick_height / 2 + v_pos, -tick_width / 2 + y_offset),
65-
tick_height,
49+
for u_pos in np.arange(-0.5, 4, 1.0):
50+
ax.add_patch(
51+
FancyBboxPatch(
52+
(-tick_width / 2 + u_pos, -tick_height),
6653
tick_width,
67-
boxstyle=BoxStyle("Round", pad=tick_height/4),
54+
tick_height,
55+
boxstyle=BoxStyle("Round", pad=tick_height / 4),
6856
facecolor=tick_color,
69-
edgecolor=tick_color
70-
))
57+
edgecolor=tick_color,
58+
)
59+
)
60+
for v_pos in np.arange(0, 4, 1.0):
61+
for y_offset in (-0.5, 0.5):
62+
ax.add_patch(
63+
FancyBboxPatch(
64+
(-tick_height / 2 + v_pos, -tick_width / 2 + y_offset),
65+
tick_height,
66+
tick_width,
67+
boxstyle=BoxStyle("Round", pad=tick_height / 4),
68+
facecolor=tick_color,
69+
edgecolor=tick_color,
70+
)
71+
)
7172

7273
# Bounding
7374
ax.set_xlim(-0.6, 3.6)

docs/source/how-to/load-wrf-data.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import xarray as xr
88
import xwrf
99

1010
ds = xr.open_mfdataset(
11-
"./wrfout_d01*",
12-
engine="netcdf4",
13-
concat_dim="Time",
14-
combine="nested",
15-
).xwrf.postprocess()
11+
"./wrfout_d01*",
12+
engine="netcdf4",
13+
concat_dim="Time",
14+
combine="nested",
15+
).xwrf.postprocess()
1616
```
1717

1818
At the moment, xWRF aims to support `met_em`, `wrfinput`, `wrfbdy` and `wrfout` files.

0 commit comments

Comments
 (0)