Skip to content

Several fixes#110

Merged
maddenp-cu merged 8 commits intoNOAA-GSL:mainfrom
maddenp-cu:fixes-2026-03-26
Mar 26, 2026
Merged

Several fixes#110
maddenp-cu merged 8 commits intoNOAA-GSL:mainfrom
maddenp-cu:fixes-2026-03-26

Conversation

@maddenp-cu
Copy link
Copy Markdown
Collaborator

Doing some testing today, I ran into three novel issues:

  1. I had a GFS forecast GRIB file in my current directory, so set forecast.path to just the GRIB filename, gfs.t00z.pgrb2.0p25.f024. When this value was written to the MET grid_stat config as the input path, though, grid_stat failed because that file was not in its run directory. This PR adds some .resolve() calls on Path objects to turn potentially relative paths into absolute paths, which are then valid in e.g. a grid_stat run directory.
  2. It was previously not possible to specify a value for forecast.name with spaces, which I noticed when I tried to call my forecast dataset GFS Forecast (because my truth.name was set to GFS and I needed a different value for forecast.name). This PR adds support for that, by replacing spaces with underscores where required in filenames and in MET config files.
  3. The schema for the wxvx config required that paths.grids.forecast be set, but this path isn't used when the forecast dataset is local GRIB: MET is directed to just read the original GRIB file, so no grid files are extracted from it, and so no directory is needed to store them. So the schema and docs are updated here. Note that there was already post-schema validation logic in place to deal with a missing value when it is actually needed, i.e. when the forecast dataset is not GRIB:
    $ wxvx -c config.yaml -t plots
    [2026-03-26T21:21:31]     INFO Schema validation succeeded for config
    [2026-03-26T21:21:31]     INFO Preparing task graph for 'plots'
    [2026-03-26T21:21:31]    ERROR Specify path.grids.forecast when forecast dataset is netCDF or Zarr
    
  4. This PR adds a truth-data class, GDAS, which is identical to GFS (at least I think so -- real world testing will follow soon) except in name. GDAS is the Global Data Assimilation System, and its output is used to initialize the GFS.

@maddenp-cu maddenp-cu self-assigned this Mar 26, 2026
Comment on lines +231 to +233
# Scalar: quoted with no whitespace.
case MET.model:
return _kvpair(k, _quoted(v.replace(" ", "_")), level)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

MET doesn't allow whitespace in the model name, which is too bad because then the ugly name with an underscore shows up in the plot legend, but it might be tricky to change, because sometimes you might really have an underscore in a name and wouldn't want it converted to a space.

@maddenp-cu maddenp-cu marked this pull request as ready for review March 26, 2026 21:46
@maddenp-cu maddenp-cu merged commit 4f5368d into NOAA-GSL:main Mar 26, 2026
1 check passed
@maddenp-cu maddenp-cu deleted the fixes-2026-03-26 branch March 26, 2026 23:23
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.

2 participants