Update plot_events script#1274
Open
AnnaKwa wants to merge 6 commits into
Open
Conversation
AnnaKwa
commented
Jun 12, 2026
Contributor
- Add option to cache the downloaded dataset instead of saving to temp directory. Currently it defaults to caching so that it's less tedious to call the script, but if desired I can change the default to not cache.
- Fix bug where the coarse data would select the 00 hour timestep if the event filename only had YYYYMMDD in the name. Now the script checks the config in the beaker dataset to get the exact event timestamp.
- Add TMP2m to the coarse variables to read
- Remove coarse PRESsfc relabeling to PRMSL since we now use PRMSL for both inputs and outputs.
The coarse panel was selected using a timestamp parsed from the event filename, defaulting to 12Z when the filename had no hour suffix. Most events are not at 12Z (e.g. the heat wave events are at 00Z), so the coarse field showed the wrong time of day. Read each event's date from the config.yaml saved with the beaker dataset instead, falling back to filename parsing (now defaulting to 00Z, the evaluator convention) only when the event is missing from the config. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
find_event_files keyed files by the event name with the date stripped, so when a dataset contained several dates for the same event (e.g. three Phl_tc_landfall files) only the last one alphabetically was processed. Key by the full filename stem instead; this also makes the keys match the event names in the evaluator config.yaml. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AnnaKwa
commented
Jun 15, 2026
| """Find netCDF files matching the event naming pattern, keyed by event name.""" | ||
| """Find netCDF files matching the event naming pattern, keyed by filename | ||
| stem (event name including date, so multiple dates of the same event are | ||
| kept).""" |
Contributor
Author
There was a problem hiding this comment.
Before, if there were files with the same name and different dates, only one was plotted.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.