Skip to content

Commit 0b99bbc

Browse files
authored
more forecast edits (#10)
1 parent 4130ed7 commit 0b99bbc

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

docs/earth/fmrc.png

117 KB
Loading

docs/earth/forecast.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ kernelspec:
99

1010
# rolodex: Weather Forecasts
1111

12+
```{seealso}
13+
Learn more at the [rolodex](https://rolodex.readthedocs.io) documentation.
14+
```
15+
1216
One way to model forecast output is a datacube with four dimensions :
1317

1418
- 2 spatial dimensions `x` and `y`,
@@ -18,14 +22,23 @@ One way to model forecast output is a datacube with four dimensions :
1822
There is one ancillary variable: 'valid time' which is the time for which the forecast is made: `valid_time = time + step`
1923

2024
```{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+
2233
```
2334

2435
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-
![FMRC indexing schematic](./fmrc.png)
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+
```
2942

3043
- "Model Run" : a single model run.
3144
- "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
3952
`ForecastIndex` encapsulates this logic and,
4053

4154
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").
4356

4457
## Example
4558

@@ -90,10 +103,12 @@ time = "2025-01-02T21:00"
90103
robust=True,
91104
# edgecolors="#fefefe",
92105
# linewidths=0.003,
93-
aspect=2,
106+
aspect=1.45,
94107
size=5,
108+
cbar_kwargs={"orientation": "horizontal"},
95109
)
96110
)
111+
plt.title("")
97112
plt.axhline(np.datetime64(time), color="k")
98113
plt.plot(
99114
cube.time.data[[0, -1, -1, 0, 0]],
@@ -103,12 +118,14 @@ plt.plot(
103118
],
104119
color="#32CD32",
105120
lw=2,
106-
)
121+
);
107122
```
108123

109124
We will index out all forecasts for 2025-01-02 21:00, notice that there are 4 valid forecasts.
110125

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.
112129

113130
```{code-cell}
114131
cube = (

0 commit comments

Comments
 (0)