dtcenter / METplus

Python scripting infrastructure for MET tools.
https://metplus.readthedocs.io
Apache License 2.0
97 stars 37 forks source link

Bugfix: Prevent crash when empty string set for INIT_INCREMENT or VALID_INCREMENT #2420

Closed georgemccabe closed 9 months ago

georgemccabe commented 9 months ago

Describe the Problem

Increment values are not needed if the [INIT/VALID]_BEG and [INIT/VALID]_END values are the same. If [INIT/VALID]_INCREMENT is not set in the METplus config, a default value of 60 seconds is used. However, if the increment value is set to an empty string, it causes a crash.

Expected Behavior

Setting the following should result in a successful run:

INIT_TIME_FMT = %Y%m%d%H
INIT_BEG = 2023111312
INIT_END = {INIT_BEG}
INIT_INCREMENT=

Environment

Describe your runtime environment: 1. Machine: (e.g. HPC name, Linux Workstation, Mac Laptop) 2. OS: (e.g. RedHat Linux, MacOS) 3. Software version number(s)

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.

Define the Metadata

Assignee

Labels

Projects and Milestone

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix Checklist

See the METplus Workflow for details.

georgemccabe commented 9 months ago

Fixed in commit 1a0dc1a89