diff --git a/ush/HWP_tools.py b/ush/HWP_tools.py index 3fdc1b662..21bedc720 100755 --- a/ush/HWP_tools.py +++ b/ush/HWP_tools.py @@ -18,7 +18,7 @@ def check_restart_files(hourly_hwpdir, fcst_dates): hourly_hwpdir: the directory where the RESTART data is copied (nwges/HOURLY_HWP) fcst_dates: Forecast dates Returns: - list of hwp_avail_hours, hwp_non_avail_hours + lists of hours with and without available RESTART files """ hwp_avail_hours = [] hwp_non_avail_hours = [] @@ -40,6 +40,11 @@ def check_restart_files(hourly_hwpdir, fcst_dates): def copy_missing_restart(nwges_dir, hwp_non_avail_hours, hourly_hwpdir): """Check the restart files. + The script loops through hwp_non_avail_hours (missing files in + nwges/HOURLY_HWP) and determines if an alternative RESTART file in + nwges/fcst_fv3lam/RESTART is available instead. If so, it is + appended to restart_avail_hours. + Args: nwges_dir: holds the boundary, INPUT, and RESTART files (e.g, described here: @@ -51,7 +56,9 @@ def copy_missing_restart(nwges_dir, hwp_non_avail_hours, hourly_hwpdir): hwp_non_avail_hours: a list of hours without available RESTART files hourly_hwpdir: the directory where the RESTART data is copied (nwges/HOURLY_HWP) Returns: - list of (restart_avail_hours, restart_nonavail_hours_test) + list of:: + - restart_avail_hours + - restart_nonavail_hours_test which is a subset of hwp_non_avail_hours. """ restart_avail_hours = [] @@ -118,7 +125,11 @@ def process_hwp(fcst_dates, hourly_hwpdir, cols, rows, intp_dir, rave_to_intp): intp_dir: the working directory for smoke processing (${CYCLE_DIR}/process_smoke) rave_to_intp: a string based on the grid name:: rave_to_intp = predef_grid+"intp" Returns: - list of (hwp_ave_arr, xarr_hwp, totprcp_ave_arr, xarr_totprcp) + list of:: + - average (through time) of HWP_AVE in the available RESTART files + - hwp_ave_arr converted to an xarray DataArray + - the total precipitation vector (totprcp) reshaped to the 2D grid + - totprcp_ave_arr converted to an xarray DataArray """ hwp_ave = [] totprcp = np.zeros((cols*rows))