You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/earth/forecast.md
+26-9Lines changed: 26 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,10 @@ kernelspec:
9
9
10
10
# rolodex: Weather Forecasts
11
11
12
+
```{seealso}
13
+
Learn more at the [rolodex](https://rolodex.readthedocs.io) documentation.
14
+
```
15
+
12
16
One way to model forecast output is a datacube with four dimensions :
13
17
14
18
- 2 spatial dimensions `x` and `y`,
@@ -18,14 +22,23 @@ One way to model forecast output is a datacube with four dimensions :
18
22
There is one ancillary variable: 'valid time' which is the time for which the forecast is made: `valid_time = time + step`
19
23
20
24
```{note}
21
-
Note that not all forecast model runs are run for the same length of time! We could model these missing forecasts as NaN values in the output.
25
+
Note that not all forecast model runs are run for the same length of time!
26
+
We could model these missing forecasts as NaN values in the output.
27
+
A further complication is that different forecast systems have different output patterns,
28
+
though most don't have _any_ missing output.
29
+
```
30
+
31
+
```{margin}
32
+
22
33
```
23
34
24
35
There are many ways one might index weather forecast output.
25
-
These different ways of constructing views of a forecast data are called "Forecast Model Run Collections" (FMRC).
26
-
For reference, see [this classic image](https://www.unidata.ucar.edu/presentations/caron/FmrcPoster.pdf) where the
27
-
y-axis is the 'valid time', and the x-axis is the 'forecast reference or initialization time':
28
-

36
+
These different ways of constructing views of a forecast data are called "Forecast Model Run Collections" (FMRC),
37
+
38
+
```{figure} fmrc.png
39
+
An illustration of different indexing patterns for weather forecast datasets. The y-axis is the 'valid time', and the x-axis is the 'forecast reference or initialization time'.
40
+
For a high-resolution schematic with expanded description of the different indexing patterns see the [original PDF](https://www.unidata.ucar.edu/presentations/caron/FmrcPoster.pdf).
41
+
```
29
42
30
43
- "Model Run" : a single model run.
31
44
- "Constant Offset" : all values for a given lead time.
@@ -39,7 +52,7 @@ All of these patterns are "vectorized indexing", though generating the needed in
39
52
`ForecastIndex` encapsulates this logic and,
40
53
41
54
1. Demonstrates how fairly complex indexing patterns can be abstracted away with a custom Index, and
42
-
1. Again illustrates the value of a custom Index in persisting "state" or extra metadata (here the type of model used).
55
+
1. Again illustrates the value of a custom Index in persisting "state" or extra metadata (here the type of model used "HRRR").
43
56
44
57
## Example
45
58
@@ -90,10 +103,12 @@ time = "2025-01-02T21:00"
90
103
robust=True,
91
104
# edgecolors="#fefefe",
92
105
# linewidths=0.003,
93
-
aspect=2,
106
+
aspect=1.45,
94
107
size=5,
108
+
cbar_kwargs={"orientation": "horizontal"},
95
109
)
96
110
)
111
+
plt.title("")
97
112
plt.axhline(np.datetime64(time), color="k")
98
113
plt.plot(
99
114
cube.time.data[[0, -1, -1, 0, 0]],
@@ -103,12 +118,14 @@ plt.plot(
103
118
],
104
119
color="#32CD32",
105
120
lw=2,
106
-
)
121
+
);
107
122
```
108
123
109
124
We will index out all forecasts for 2025-01-02 21:00, notice that there are 4 valid forecasts.
110
125
111
-
And then assign `rolodex.ForecastIndex` to `time`, `step`, `valid_time`. We pass a custom kwarg `model` to indicate the type of forecast model used, here "HRRR".
126
+
And then assign `rolodex.ForecastIndex` to `time`, `step`, `valid_time`.
127
+
128
+
We pass an optional custom kwarg `model` to indicate the type of forecast model used, here "HRRR". `ForecastIndex` knows about HRRR's output pattern.
0 commit comments