dtcenter / MET

Model Evaluation Tools
https://dtcenter.org/community-code/model-evaluation-tools-met
Apache License 2.0
74 stars 22 forks source link

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

Closed hsoh-u closed 2 months ago

hsoh-u commented 3 months ago

Describe the Problem

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

Labels

Milestone and Projects

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix Checklist

See the METplus Workflow for details.

JohnHalleyGotway commented 3 months ago

@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.

hsoh-u commented 3 months ago

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.