-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xarray output for power spec and rank hist metrics (#15)
* xarray wrapper creates dataset with var as data vars instead of metric as data vars to support variables with diff dimensions (ie. surface variables only have 1 level) * convert to xarray also creates xarray with vars as data vars * plot reads new format of xarray * remove option to return raw dict confusing and not used rather return metrics in formatted xarray anyways * fix convert metric dict with metadata * plot rankhist like paper * migrate rankhist to output xarray not labeled dict * fix timedelta in era5 metrics * handle extra dimensions in xarray when plotting * plot option color per model * fix plot var titles * fix rankhist check in plot.py * add option to filter files in pred_path for eval * convert to xarray dict reports readable error * document eval commands used for rankhist
- Loading branch information
Showing
14 changed files
with
437 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Evaluate | ||
|
||
Set model run name (used in hydra argument `++name=NAME`): | ||
```sh | ||
NAME=archesweathergen | ||
``` | ||
|
||
## Commands to compute metrics | ||
|
||
### Rank histogram | ||
```sh | ||
python -m geoarches.evaluation.eval_multistep \ | ||
--pred_path evalstore/${NAME}/ \ | ||
--output_dir evalstore/${NAME}_metrics/ \ | ||
--groundtruth_path data/era5_240/full/ \ | ||
--multistep 10 --num_workers 4 \ | ||
--metrics era5_rank_histogram_50_members | ||
``` | ||
|
||
## Commands to plot (WIP) | ||
|
||
### Rank histogram | ||
```sh | ||
python -m geoarches.evaluation.plot --output_dir plots/ | ||
--metric_paths evalstore/${NAME}_metrics/test-multistep=10-era5_rank_histogram_50_members.nc | ||
--model_names ArchesWeatherGen \ | ||
--model_colors red \ | ||
--metrics rankhist \ | ||
--vars Z500:geopotential:level:500 T850:temperature:level:850 Q700:specific_humidity:level:700 U850:u_component_of_wind:level:850 V850:v_component_of_wind:level:850 \ | ||
--rankhist_prediction_timedeltas 1 7 \ | ||
--figsize 10 4 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.