Describe the Problem
When using ugrid_dataset=mpas;, the forecast lead time is not correctly parsed from the input file. To work around this, set_attr_lead can be configured to use the forecast lead time in METplus wrappers for each forecast variable. However, support for reading this directly from the MPAS files should be added.
In the ugrid_metadata_map, one option is to add a new item for forecast_lead_time_varname (or some other key name, I don't think this is the correct/best option), so the user can set the name of the variable that contains the forecast lead time. We can set the default to be the name we see in the diag files we have used or others have used, but this would allow the user to configure it themselves if it deviated from the default.
Expected Behavior
Grid-Stat and Point-Stat will correctly parse the forecast lead time from MPAS files so it can be used in the output filenames and the FCST_LEAD column in the output files.
Environment
I was working on Seneca preparing for the 2026 MPAS user's workshop mini-tutorial.
To Reproduce
On Seneca, you can find a sample file:
/home/dadriaan/projects/mpas/data/fcst/mpas/ugrid/OK_1km_ugrid/2025051800/ens_1/diag.2025-05-18_01.00.00.nc
There are three variables related to time:
I think that initial_time = forecast initialization time, xtime = forecast valid time, and Time = forecast lead time.
I've created an easy-to-run environment for testing at:
seneca:/home/dadriaan/projects/mpas/bugfix_3410_mpas_ugrid_lead_time
You can issue the command:
./grid_stat fcst_file obs_file GridStatConfig_bugfix -outdir /path/to/your/output
And replacing /path/to/your/output to an area that's writeable.
Running that command as-is, produces these three output files:
-rw-r--r-- 1 dadriaan rap 626 Jul 6 17:53 grid_stat_000000L_20250518_010000V_ctc.txt
-rw-r--r-- 1 dadriaan rap 11M Jul 6 17:53 grid_stat_000000L_20250518_010000V_pairs.nc
-rw-r--r-- 1 dadriaan rap 580 Jul 6 17:53 grid_stat_000000L_20250518_010000V.stat
However note that the 000000L in all of the files, should be 010000L for a "1-hr" lead time as that is the lead time being processed with the sample command.
Additionally, inside the file:
grid_stat_000000L_20250518_010000V.stat
The FCST_LEAD column shows 000000, which once fixed, should say 010000.
Relevant Deadlines
NONE
Funding Source
NCAR base 2702701
Define the Metadata
Assignee
Labels
Milestone and Projects
Define Related Issue(s)
Consider the impact to the other METplus components.
Bugfix Checklist
See the METplus Workflow for details.
Describe the Problem
When using
ugrid_dataset=mpas;, the forecast lead time is not correctly parsed from the input file. To work around this,set_attr_leadcan be configured to use the forecast lead time in METplus wrappers for each forecast variable. However, support for reading this directly from the MPAS files should be added.In the
ugrid_metadata_map, one option is to add a new item forforecast_lead_time_varname(or some other key name, I don't think this is the correct/best option), so the user can set the name of the variable that contains the forecast lead time. We can set the default to be the name we see in the diag files we have used or others have used, but this would allow the user to configure it themselves if it deviated from the default.Expected Behavior
Grid-Stat and Point-Stat will correctly parse the forecast lead time from MPAS files so it can be used in the output filenames and the
FCST_LEADcolumn in the output files.Environment
I was working on Seneca preparing for the 2026 MPAS user's workshop mini-tutorial.
To Reproduce
On Seneca, you can find a sample file:
/home/dadriaan/projects/mpas/data/fcst/mpas/ugrid/OK_1km_ugrid/2025051800/ens_1/diag.2025-05-18_01.00.00.ncThere are three variables related to time:
I think that
initial_time= forecast initialization time,xtime= forecast valid time, andTime= forecast lead time.I've created an easy-to-run environment for testing at:
seneca:
/home/dadriaan/projects/mpas/bugfix_3410_mpas_ugrid_lead_timeYou can issue the command:
And replacing
/path/to/your/outputto an area that's writeable.Running that command as-is, produces these three output files:
However note that the
000000Lin all of the files, should be010000Lfor a "1-hr" lead time as that is the lead time being processed with the sample command.Additionally, inside the file:
grid_stat_000000L_20250518_010000V.statThe
FCST_LEADcolumn shows000000, which once fixed, should say010000.Relevant Deadlines
NONE
Funding Source
NCAR base 2702701
Define the Metadata
Assignee
Labels
Milestone and Projects
Define Related Issue(s)
Consider the impact to the other METplus components.
Bugfix Checklist
See the METplus Workflow for details.
Branch name:
bugfix_<Issue Number>_main_<Version>_<Description>Pull request:
bugfix <Issue Number> main_<Version> <Description>Select: Reviewer(s) and Development issue
Select: Milestone as the next bugfix version
Select: METplus-X.Y Support project for support of the current coordinated release
Branch name:
bugfix_<Issue Number>_develop_<Description>Pull request:
bugfix <Issue Number> develop <Description>Select: Reviewer(s) and Development issue
Select: Milestone as the next official version
Select: MET-X.Y Development project for development toward the next coordinated release