Skip to content

Update plot_events script#1274

Open
AnnaKwa wants to merge 6 commits into
mainfrom
scripts/update-plot-events
Open

Update plot_events script#1274
AnnaKwa wants to merge 6 commits into
mainfrom
scripts/update-plot-events

Conversation

@AnnaKwa

@AnnaKwa AnnaKwa commented Jun 12, 2026

Copy link
Copy Markdown
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.

AnnaKwa and others added 6 commits June 11, 2026 11:51
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>
"""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)."""

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before, if there were files with the same name and different dates, only one was plotted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant