dtcenter/MET

Add new `-ugrid_config` command line option for unstructured grid inputs to Grid-Stat and Point-Stat

Closed this issue · 2 comments

Describe the Problem

  • Change -config option to -ugrid_config
  • The -ugrid_config <user_ugrid_config> is applied first and overridden by UGrid setting at the user's PointStat/GridStat configuration.
    • For example, 50km will be applied for the ugrid_max_distance_km when 50km at the user's PointStat configuration and 30km at -ugrid_config .
  • The ugrid_dataset will be ignored when -ugrid_config <user_ugrid_config>is given.

Provide a clear and concise description of the bug here.

There was a bug with -config option. There are warnings the given configuration file does not exist which is not correct.

export BEG_DS=-1800
export END_DS=1800
export CLIMO_FILE='"/d1/projects/MET/MET_test_data/unit_test/model_data/grib1/gfs/gfs_2012040900_F012_gNam.grib"'
export OUTPUT_PREFIX=GRIB1_NAM_GDAS

cp -p /d1/projects/MET/MET_regression/develop/NB20240319/MET-develop/internal/test_unit/config/PointStatConfig_ugrid_mpas_out .

/d1/projects/MET/MET_regression/develop/NB20240320/MET-develop/bin//point_stat /d1/personal/hsoh/data/MET-2231/mpasout.2012-04-09_12.00.00.nc /d1/projects/MET/MET_regression/develop/NB20240319/MET-develop/test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc PointStatConfig_ugrid_mpas_out -config PointStatConfig_ugrid_mpas_out -outdir out_point_grid -v 4

Note: The same configuration file /d1/projects/MET/MET_regression/develop/NB20240319/MET-develop/internal/test_unit/config/PointStatConfig_ugrid_mpas_out is used at -config option.

Log messages:

DEBUG 1: Default Config File: /d1/projects/MET/MET_regression/develop/NB20240320/MET-develop/share/met/config/PointStatConfig_default
DEBUG 1: User Config File: PointStatConfig_ugrid_mpas_out
WARNING:
WARNING: PointStatConfInfo::read_configs(StringArray) -> The configuration file "PointStatConfig_ugrid_mpas_out" does not exist.
WARNING:

Expected Behavior

Provide a clear and concise description of what you expected to happen here.

The same configuration file with -config should be read again.

Environment

Describe your runtime environment:
1. Machine: (Linux Workstation, seneca)
2. OS: (RedHat Linux)
3. Software version number(s): MET v12.0 beta4

To Reproduce

Describe the steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
Post relevant sample data following these instructions:
https://dtcenter.org/community-code/model-evaluation-tools-met/met-help-desk#ftp

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.
2799991 Met Office

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 Coordinated METplus-X.Y Support project for support of the current coordinated release
  • Select MET-X.Y.Z Development project for development toward the next official 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: Coordinated 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.Z Development project for development toward the next official release
  • Close this issue.

@hsoh-u this is not a bug. Point-Stat has never supported a -config option. In the usage statement, the configuration file is given as the 3rd positional argument. So adding support for a new -config option would be an enhancement.

I do see what you're trying to do here, providing a way to specify the configuration file which describes the UGRID input data. I can think of one existing example of where a MET tool supports 2 different types of config files, and that is in the MODE tool. In the MODE Usage statement, the -config_merge option specifies the config options to be applied when doing the "engine merging" step. Following this example, you could consider adding a config option named something like -config_ugrid to be a bit more explicit about what config options are being provided here.

Changed the type to new feature and updated the title and description. -config option was added initially for UGrid configurations. I thought it can be removed, but METplus will use this option.