ufs-community / ufs-srweather-app

UFS Short-Range Weather Application
Other
55 stars 116 forks source link

[develop] Bugfix bonanza #1108

Open gsketefian opened 1 month ago

gsketefian commented 1 month ago

DESCRIPTION OF CHANGES:

This PR fixes several bugs discovered in the verification portion of the app during recent testing by the DTC. The bugs are:

1) Change to parm/data_locations.yml to account for the change in prebpufr (NDAS) obs file names on May 22, 2024. This is currently causing get_obs_ndas tasks to fail for cycles at or after this date. [Bug found by @michelleharrold.]

2) Change to parm/wflow/verify_det.yaml so that all tasks have a cycldefs statement by default. This bug was causing GridStat workflow tasks for CCPA and NOHRSC obs to be created for cycles not defined for the workflow (these extraneous cycles probably correspond to the default set of cycles that a task gets assigned by ROCOTO when it does not contain an explicit cycledefs statement). [Bug found by @michelleharrold, solution by @mkavulich.] 3) Change to scripts/exregional_run_met_gridstat_or_pointstat.sh to append a string for the cycle date ("_YYYYMDDHH") to the name of the metplus log file for deterministic GridStat and PointStat tasks. This was causing the metplus log file for GridStat for a given cycle tasks to be overwritten by those for other cycles. [Bug found by @michelleharrold.]

4) Refactoring of scripts/exregional_get_verif_obs.sh to account for multiple overlapping cycles. It was found that when the experiment contains multiple cycles, the get_obs_ccpa, get_obs_mrms, and get_obs_ndas from the different cycles write to the same directories and clobber the output of other cycles or cause crashes (e.g. a directory is not empty when it is expected to be). [Bug found by @michelleharrold and @willmayfield.]. This script is refactored so that: a) "Raw" directories, i.e. the directories in which the data is pulled by the retrieve_data.py script, for each cycle or observation day are unique (contain either the cycle (raw_cycYYYYMMDDHH) or the date (raw_dayYYYYMMDD) in their names). Whether a cycle-based or obs-day-based raw directory is used depends on the obs type: CCPA raw directories are cycle-based, and MRMS and NDAS raw directories are day-based. b) There are checks on directories and files to make sure the get_obs_... task for another cycle is not writing to the directory and/or file the current cycle wishes to modify (write to, move, delete, etc). c) Data pulls and the final set of processed observations are organized so that there are no extra observation files that lie outside the range of the forecasts. d) Extra documentation is included in the script to describe in detail the behavior of the script for each obs type (CCPA, MRMS, NDAS).

Type of change

TESTS CONDUCTED:

DOCUMENTATION:

ISSUE:

CHECKLIST

LABELS (optional):

A Code Manager needs to add the following labels to this PR:

CONTRIBUTORS (optional):