-
Notifications
You must be signed in to change notification settings - Fork 0
Support global models #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
21f6eb2
d8acf3c
48c98bb
7032716
ec82cfd
d308e5c
6ab5748
5e749f6
acac66e
ff74be9
ecc2a80
3b4b240
1ef6528
7da9067
8227668
ca6c275
b5cb08e
f99b4b1
6d27edc
8498383
2eee400
4d3752e
05657be
69099e2
3e29794
2a614d0
672fb7a
41256c7
05ba8af
4df7af2
e9fd7dc
9b1f1f4
c9c0ac6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,7 @@ experiment: | |
| - TOT_PREC6 | ||
| stratification: | ||
| regions: | ||
| - icon | ||
| - jura | ||
| - mittelland | ||
| - voralpen | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,7 @@ experiment: | |
| - TOT_PREC6 | ||
| stratification: | ||
| regions: | ||
| - icon | ||
| - jura | ||
| - mittelland | ||
| - voralpen | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,7 @@ experiment: | |
| - PMSL | ||
| stratification: | ||
| regions: | ||
| - icon | ||
| - jura | ||
| - mittelland | ||
| - voralpen | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,6 +54,7 @@ experiment: | |
| - PMSL | ||
| stratification: | ||
| regions: | ||
| - icon | ||
| - mittelland | ||
| - berge | ||
| - alpennordseite | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,16 @@ | |
| "2d": "TD_2M", | ||
| "sp": "PS", | ||
| "lsm": "FR_LAND", | ||
| "z": "FSI", | ||
| "tcc": "CLCT", | ||
| "lcc": "CLCL", | ||
| # TODO: ssrd is treated as a plain per-step field (no de-accumulation), | ||
| # which only holds because it's not currently listed in any | ||
| # accumulate_from_start_of_forecast.accumulations in the inference | ||
| # configs (unlike tp, see _tot_prec_handling). If ssrd/strd are ever | ||
| # added there, this needs the same cumulative-since-start handling tp | ||
| # gets, or verification/plots will silently be wrong. | ||
|
Comment on lines
+31
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So we already produce this, but in fact it is accumulated (or not)? I am confused...
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just for my enlightenment, not really important.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my understanding is that we predict the same variable used during training, which is period accumulated
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry missed the comment. |
||
| "ssrd": "SSRD", | ||
| "z": "FIS", | ||
| } | ||
| _ICON_TO_IFS = {v: k for k, v in _IFS_TO_ICON.items()} | ||
|
|
||
|
|
@@ -324,6 +333,20 @@ def _open_analysis_zarr(root: Path, params: list[str]) -> xr.Dataset: | |
| ) | ||
| ds = ds.assign_coords(elevation=elevation).drop_vars(["FIS"]) | ||
|
|
||
| # Drop grid points with undefined (NaN) coordinates. This can occur when | ||
| # xarray opens a zarr dataset whose lat/lon arrays have fill_value=0.0: any | ||
| # grid point sitting exactly on 0° longitude is masked to NaN by xarray even | ||
| # though it is a valid point in the raw zarr (e.g. aifs-ea-an-oper o96 ERA5 | ||
| # dataset has 192 such points). | ||
| if "values" in ds.dims and "latitude" in ds.coords and "longitude" in ds.coords: | ||
| valid = np.isfinite(ds["latitude"].values) & np.isfinite(ds["longitude"].values) | ||
| if not valid.all(): | ||
| LOG.warning( | ||
| "Dropping %d grid point(s) with undefined lat/lon from truth dataset.", | ||
| int((~valid).sum()), | ||
| ) | ||
| ds = ds.isel(values=valid) | ||
|
|
||
|
dnerini marked this conversation as resolved.
|
||
| return ds | ||
|
|
||
|
|
||
|
|
@@ -464,10 +487,21 @@ def load_from_grib_file(file: str | list[str], sel_kwargs): | |
|
|
||
|
|
||
| def variable_name_profile( | ||
| level_type: Literal["height_above_ground_level", "mean_sea", "surface", "pressure"], | ||
| level_type: Literal[ | ||
| "height_above_ground_level", | ||
| "mean_sea", | ||
| "surface", | ||
| "pressure", | ||
| "entire_atmosphere", | ||
| ], | ||
| ) -> dict[str, Any]: | ||
| """Resolve variable name profile based on the level type.""" | ||
| if level_type in ["height_above_ground_level", "mean_sea", "surface"]: | ||
| if level_type in [ | ||
| "height_above_ground_level", | ||
| "mean_sea", | ||
| "surface", | ||
| "entire_atmosphere", | ||
| ]: | ||
| return {} | ||
| elif level_type == "pressure": | ||
| return { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.