Skip to content

Bugfix: Fix Grid-Stat to correct the timing information of the SEEPS data written to the NetCDF matched pairs output file #3362

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Problem

As noted by @RachelNorth, the timing information of the SEEPS data written to Grid-Stat NetCDF matched pairs output files is incorrect. I double-checked the output from an existing MET unit test and found the problem in these Grid-Stat NetCDF matched pairs output variables:

  float SEEPS_MPR_SCORE_precipitation_amount_all_all_FULL(lat, lon) ;
  float SEEPS_MPR_FCAT_precipitation_amount_all_all_FULL(lat, lon) ;
  float SEEPS_MPR_OCAT_precipitation_amount_all_all_FULL(lat, lon) ;

All 3 variables have the followed bad timing info:

  init_time = "19700101_000000" ;
  init_time_ut = "0" ;
  valid_time = "19700101_000000" ;
  valid_time_ut = "0" ;

The bug can be found in Lines 1702-1704 of compute_stats.cc. The compute_aggregated_seeps_grid() function only initializes the (Nx, Ny) dimensions of the SEEPS fields. This section of code should also initialize the timing information.

Following existing precedent where forecast time are used for fcst - obs difference fields, recommend also initializing all 3 SEEPS fields with the forecast times rather than the observation times.

To Reproduce

Describe the steps to reproduce the behavior:
Run existing unit test:

export 'OMP_NUM_THREADS=2'
export 'OUTPUT_PREFIX=SEEPS'
export 'SEEPS_FLAG=BOTH'
export 'SEEPS_GRID_CLIMO_NAME=${MET_TEST_INPUT}/climatology_data/seeps/PPT24_seepsweights_grid.nc'
export 'SEEPS_P1_THRESH=NA'
/d1/personal/johnhg/METplus/development/METplus-6.2-Support/MET-main_v12.2/internal/test_unit/../../share/met/../../bin/grid_stat \
      /d1/projects/MET/MET_test_data/unit_test/model_data/seeps/gpm_2021120100_2021120200_trmmgrid.nc \
      /d1/projects/MET/MET_test_data/unit_test/model_data/seeps/prods_op_gl-mn_2021120100_f024_A24_trmmgrid.nc \
      /d1/personal/johnhg/METplus/development/METplus-6.2-Support/MET-main_v12.2/internal/test_unit/config/GridStatConfig_SEEPS \
      -outdir /d1/personal/johnhg/METplus/development/METplus-6.2-Support/MET-main_v12.2/internal/test_unit/../../test_output/grid_stat -v 1

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

UK Met Office Funding

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Review default alert labels
  • Select component(s)
  • Select priority
  • Select requestor(s)

Milestone and Projects

  • Select Milestone as the next bugfix version
  • Select METplus-X.Y Support project for support of the current coordinated release
  • Select MET-X.Y Development project for development toward the next coordinated release

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of main_<Version>.
    Branch name: bugfix_<Issue Number>_main_<Version>_<Description>
  • Fix the bug and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into main_<Version>.
    Pull request: bugfix <Issue Number> main_<Version> <Description>
  • Define the pull request metadata, as permissions allow.
    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
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Complete the steps above to fix the bug on the develop branch.
    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
  • Close this issue.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

Status
🏁 Done
Status
🏁 Done

Relationships

None yet

Development

No branches or pull requests

Issue actions