Skip to content

Replace gfs_cyc with an interval#2928

Merged
WalterKolczynski-NOAA merged 31 commits into
NOAA-EMC:developfrom
WalterKolczynski-NOAA:feature/interval
Oct 22, 2024
Merged

Replace gfs_cyc with an interval#2928
WalterKolczynski-NOAA merged 31 commits into
NOAA-EMC:developfrom
WalterKolczynski-NOAA:feature/interval

Conversation

@WalterKolczynski-NOAA
Copy link
Copy Markdown
Contributor

@WalterKolczynski-NOAA WalterKolczynski-NOAA commented Sep 17, 2024

Description

To facilitate longer and more flexible GFS cadences, the gfs_cyc variable is replaced with a specified interval. Up front, this is
reflected in a change in the arguments for setup_exp to:

--interval <n_hours>

Where n_hours is the interval (in hours) between gfs forecasts. n_hours must be a multiple of 6. If 0, no gfs will be run (only
gdas; only valid for cycled mode). The default value is 6 (every cycle). (This is a change from current behavior of 24.)

In cycled mode, there is an additional argument to control which cycle will be the first gfs cycle:

--sdate_gfs <YYYYMMDDHH>

The default if not provided is --idate + 6h (first full cycle). This is the same as current behavior when gfs_cyc is 6, but may vary from current behavior for other cadences.

As part of this change, some of the validation of the dates has been added. --edate has also been made optional and defaults to --idate if not provided.

During config.base template-filling, INTERVAL_GFS (renamed from STEP_GFS) is defined as --interval and SDATE_GFS as --sdate_gfs`.

Some changes were necessary to the gfs verification (metp) job, as gfs_cyc was being used downstream by verif-global. That has been removed, and instead workflow will be responsible for only running metp on the correct cycles. This also removes "do nothing" metp tasks that exit immediately, because only the last GFS cycle in a day would actually process verification.

Now, metp has its own cycledef and will (a) always runs at 18z, regardless of whether gfs is running at 18z or not, if the interval is less than 24h; (b) use the same cycledef as gfs if the interval is 24h or greater. This is simpler than trying to determine the last gfs cycle of a day when it could change from day to day. To facilitate this change, support for the
undocumented rocoto dependency tag taskvalid is added, as the metp task needs to know whether the cycle has a gfsarch task or not. metp will trigger on gfsarch completing (as before), or look backwards for the last gfsarch to exist.

Additionally, a couple EE2 issues with the metp job are resolved (even though it is not run in ops):

  • verif-global update replaced $CDUMP with $RUN
  • $DATAROOT is no longer redefined in the metp job

Depends on NOAA-EMC/EMC_verif-global#137
Resolves #260
Refs #1299

Type of change

  • New feature (adds functionality)

Change characteristics

How has this been tested?

  • Cycled test with 24-h interval on Hercules

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • I have made corresponding changes to the documentation if necessary

@WalterKolczynski-NOAA
Copy link
Copy Markdown
Contributor Author

More manual testing to come, but ready enough to get eyes on it.

Comment thread workflow/applications/gfs_cycled.py
@WalterKolczynski-NOAA WalterKolczynski-NOAA force-pushed the feature/interval branch 2 times, most recently from 61d05ae to 1e92c40 Compare September 28, 2024 01:19
To facilitate longer and more flexible GFS cadences, the `gfs_cyc`
variable is replaced with a specified interval. Up front, this is
reflected in a change in the arguments for setup_exp to:

```
--interval <n_hours>
```

Where `n_hours` is the interval (in hours) between gfs forecasts.
`n_hours` must be a multiple of 6. If 0, no gfs will be run (only
gdas; only valid for cycled mode). The default value is 6 (every
cycle).

In cycled mode, there is an additional argument to control which
cycle will be the first gfs cycle:

```
---sdate_gfs <YYYYMMDDHH>
```

The default if not provided is `--idate` + 6h (first full cycle).

As part of this change, some of the validation of the dates has
been added. `--edate` has also been made optional and defaults to
`--idate` if not provided.

During `config.base` template-filling, `INTERVAL_GFS` (renamed from
`STEP_GFS`) is defined as `--interval` and `SDATE_GFS as
`--sdate_gfs`.

Some changes were necessary to the gfs verification (metp) job, as
`gfs_cyc` was being used downstream by verif-global. That has been
removed, and instead workflow will be responsible for only running
metp on the correct cycles. This also removes "do nothing" metp
tasks that exit immediately, because only the last GFS cycle in a
day would actually process verification.

Now, metp has its own cycledef and always runs at 18z, regardless
of whether gfs is running at 18z or not. This is simplier than
trying to determine the last gfs cycle of a day when it could
change from day to day. To facilitate this change, support for the
undocumented rocoto dependency tag `taskvalid` is added, as the
metp task needs to know whether the cycle has a gfsarch task or not.
metp will trigger on gfsarch completing (as before), or gdasarch
completing if there is no gfsarch.

metp tasks are no longer generated for forecast-only, as the pgbanl
files (copied of the 1p00 pgbanl files) are not generated for f-o
anyway. If metp is needed for f-o, additional work will be needed.

Additionally, a couple EE2 issues with the metp job are resolved
(even though it is not run in ops):
- verif-global update replaced `$CDUMP` with `$RUN`
- `$DATAROOT` is no longer redefined in the metp job

Depends on NOAA-EMC/EMC_verif-global#137
Resolves NOAA-EMC#260
Refs NOAA-EMC#1299
To avoid running metp on days where there is no gfs, the cycledefs
are adjusted somewhat. First, if the interval is >= 24h, the metp
cycledef will be identical to gfs. If the interval is < 24h, it
remains 18z every day (except the last). Second, a last_gfs is
added so metp will run on for the last gfs cycle even if it there
is no gdas cycle for 18z that day. This required computing the real
gfs end date to use as the last cycle.
@WalterKolczynski-NOAA WalterKolczynski-NOAA marked this pull request as ready for review October 1, 2024 17:08
@WalterKolczynski-NOAA WalterKolczynski-NOAA added the CI-Hercules-Ready **CM use only** PR is ready for CI testing on Hercules label Oct 1, 2024
@emcbot emcbot added CI-Hercules-Building **Bot use only** CI testing is cloning/building on Hercules and removed CI-Hercules-Ready **CM use only** PR is ready for CI testing on Hercules labels Oct 1, 2024
@WalterKolczynski-NOAA
Copy link
Copy Markdown
Contributor Author

Ready for review. Also encourage third-party testing in excess of what CI will cover due to the nature of the change. I ran some different multi-day experiments myself, but outside validation would be appreciated.

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 16, 2024

Automated global-workflow Testing Results:

Machine: Wcoss2
Start: Wed Oct 16 16:23:30 UTC 2024 on clogin01
---------------------------------------------------
Build: Completed at 10/16/24 05:04:36 PM
Case setup: Completed for experiment C48_ATM_1f1d29b1
Case setup: Skipped for experiment C48mx500_3DVarAOWCDA_1f1d29b1
Case setup: Skipped for experiment C48_S2SWA_gefs_1f1d29b1
Case setup: Completed for experiment C48_S2SW_1f1d29b1
Case setup: Completed for experiment C96_atm3DVar_extended_1f1d29b1
Case setup: Skipped for experiment C96_atm3DVar_1f1d29b1
Case setup: Completed for experiment C96C48_hybatmaerosnowDA_1f1d29b1
Case setup: Completed for experiment C96C48_hybatmDA_1f1d29b1
Case setup: Completed for experiment C96C48_ufs_hybatmDA_1f1d29b1
Case setup: Completed for experiment C96_S2SWA_gefs_replay_ics_1f1d29b1

Comment thread workflow/rocoto/rocoto.py
Comment thread workflow/setup_expt.py
Copy link
Copy Markdown
Contributor

@DavidHuber-NOAA DavidHuber-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Approve pending successful WCOSS2 testing.

@TerrenceMcGuinness-NOAA
Copy link
Copy Markdown
Collaborator

Starting over from scratch with Walter's d54bc65 update.

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 16, 2024

CI Update on Wcoss2 at 10/16/24 07:40:37 PM
============================================
Cloning and Building global-workflow PR: 2928
with PID: 214205 on host: clogin09

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 16, 2024

Automated global-workflow Testing Results:

Machine: Wcoss2
Start: Wed Oct 16 19:46:20 UTC 2024 on clogin09
---------------------------------------------------
Build: Completed at 10/16/24 08:28:44 PM
Case setup: Completed for experiment C48_ATM_d54bc650
Case setup: Skipped for experiment C48mx500_3DVarAOWCDA_d54bc650
Case setup: Skipped for experiment C48_S2SWA_gefs_d54bc650
Case setup: Completed for experiment C48_S2SW_d54bc650
Case setup: Completed for experiment C96_atm3DVar_extended_d54bc650
Case setup: Skipped for experiment C96_atm3DVar_d54bc650
Case setup: Completed for experiment C96C48_hybatmaerosnowDA_d54bc650
Case setup: Completed for experiment C96C48_hybatmDA_d54bc650
Case setup: Completed for experiment C96C48_ufs_hybatmDA_d54bc650
Case setup: Completed for experiment C96_S2SWA_gefs_replay_ics_d54bc650

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 16, 2024

Experiment C96C48_hybatmaerosnowDA_d54bc650 FAIL on Wcoss2 at 10/16/24 09:14:32 PM

Error logs:

/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96C48_hybatmaerosnowDA_d54bc650/logs/2021122018/gfs_snowanl.log

Follow link here to view the contents of the above file(s): (link)

@WalterKolczynski-NOAA
Copy link
Copy Markdown
Contributor Author

WalterKolczynski-NOAA commented Oct 16, 2024

Sync'd missing snow observation data to cactus.

The UFS model executable is not built for the structured wave grid
used by GEFS on WCOSS, so GEFS tests should not run on WCOSS.
@emcbot
Copy link
Copy Markdown

emcbot commented Oct 17, 2024

CI Update on Wcoss2 at 10/17/24 03:46:44 PM
============================================
Cloning and Building global-workflow PR: 2928
with PID: 76983 on host: clogin06

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 17, 2024

Automated global-workflow Testing Results:

Machine: Wcoss2
Start: Thu Oct 17 15:53:21 UTC 2024 on clogin06
---------------------------------------------------
Build: Completed at 10/17/24 04:33:29 PM
Case setup: Completed for experiment C48_ATM_2b6c45de
Case setup: Skipped for experiment C48mx500_3DVarAOWCDA_2b6c45de
Case setup: Skipped for experiment C48_S2SWA_gefs_2b6c45de
Case setup: Completed for experiment C48_S2SW_2b6c45de
Case setup: Completed for experiment C96_atm3DVar_extended_2b6c45de
Case setup: Skipped for experiment C96_atm3DVar_2b6c45de
Case setup: Completed for experiment C96C48_hybatmaerosnowDA_2b6c45de
Case setup: Completed for experiment C96C48_hybatmDA_2b6c45de
Case setup: Completed for experiment C96C48_ufs_hybatmDA_2b6c45de
Case setup: Skipped for experiment C96_S2SWA_gefs_replay_ics_2b6c45de

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 17, 2024

Experiment C96C48_hybatmaerosnowDA_2b6c45de FAIL on Wcoss2 at 10/17/24 06:56:28 PM

Error logs:

/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96C48_hybatmaerosnowDA_2b6c45de/logs/2021122018/gfs_metpg2o1.log

Follow link here to view the contents of the above file(s): (link)

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 18, 2024

CI Update on Wcoss2 at 10/18/24 05:09:06 PM
============================================
Cloning and Building global-workflow PR: 2928
with PID: 199683 on host: clogin09

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 18, 2024

Automated global-workflow Testing Results:

Machine: Wcoss2
Start: Fri Oct 18 17:16:34 UTC 2024 on clogin09
---------------------------------------------------
Build: Completed at 10/18/24 05:57:55 PM
Case setup: Completed for experiment C48_ATM_2b6c45de
Case setup: Skipped for experiment C48mx500_3DVarAOWCDA_2b6c45de
Case setup: Skipped for experiment C48_S2SWA_gefs_2b6c45de
Case setup: Completed for experiment C48_S2SW_2b6c45de
Case setup: Completed for experiment C96_atm3DVar_extended_2b6c45de
Case setup: Skipped for experiment C96_atm3DVar_2b6c45de
Case setup: Completed for experiment C96C48_hybatmaerosnowDA_2b6c45de
Case setup: Completed for experiment C96C48_hybatmDA_2b6c45de
Case setup: Completed for experiment C96C48_ufs_hybatmDA_2b6c45de
Case setup: Skipped for experiment C96_S2SWA_gefs_replay_ics_2b6c45de

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 18, 2024

Experiment C96_atm3DVar_extended_2b6c45de FAIL on Wcoss2 at 10/18/24 08:35:52 PM

Error logs:

/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f000.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f001.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f002.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f003.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f004.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f005.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f006.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f007.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f008.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f009.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f010.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f011.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f012.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f013.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f014.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f015.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f016.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f017.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f018.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f019.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f020.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f021.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f022.log
/lfs/h2/emc/global/noscrub/globalworkflow.ci/GFS_CI_ROOT/PR/2928/RUNTESTS/COMROOT/C96_atm3DVar_extended_2b6c45de/logs/2021122100/gfs_atmos_prod_f023.log

Follow link here to view the contents of the above file(s): (link)

@WalterKolczynski-NOAA
Copy link
Copy Markdown
Contributor Author

WalterKolczynski-NOAA commented Oct 18, 2024

Failed because restarts from previous attempt weren't wiped, so forecast picked up in the middle.

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 21, 2024

CI Update on Wcoss2 at 10/21/24 01:54:58 PM
============================================
Cloning and Building global-workflow PR: 2928
with PID: 52475 on host: clogin01

@emcbot
Copy link
Copy Markdown

emcbot commented Oct 21, 2024

Automated global-workflow Testing Results:

Machine: Wcoss2
Start: Mon Oct 21 14:02:10 UTC 2024 on clogin01
---------------------------------------------------
Build: Completed at 10/21/24 02:43:11 PM
Case setup: Completed for experiment C48_ATM_2b6c45de
Case setup: Skipped for experiment C48mx500_3DVarAOWCDA_2b6c45de
Case setup: Skipped for experiment C48_S2SWA_gefs_2b6c45de
Case setup: Completed for experiment C48_S2SW_2b6c45de
Case setup: Completed for experiment C96_atm3DVar_extended_2b6c45de
Case setup: Skipped for experiment C96_atm3DVar_2b6c45de
Case setup: Completed for experiment C96C48_hybatmaerosnowDA_2b6c45de
Case setup: Completed for experiment C96C48_hybatmDA_2b6c45de
Case setup: Completed for experiment C96C48_ufs_hybatmDA_2b6c45de
Case setup: Skipped for experiment C96_S2SWA_gefs_replay_ics_2b6c45de

@WalterKolczynski-NOAA
Copy link
Copy Markdown
Contributor Author

All manual CI tests passed on WCOSS:

08:05:32 EXPDIR/>while [[ 1 ]]; do echo; echo; date; for d in C*; do echo "******** ${d} ********"; cd $d; rocotostat -d ${d}.db -w ${d}.xml | tail -n 1; echo; cd ..; done; echo; sleep 300; done


Tue Oct 22 08:05:39 UTC 2024
******** C48_ATM ********
202103231800            gfs_metppcp1                   158916037           SUCCEEDED                   0         1          15.0

******** C48_S2SW ********
202103231800            gfs_metppcp1                   158916989           SUCCEEDED                   0         1          16.0

******** C96_atm3DVar_extended ********
202112211800             gfs_cleanup                   158951431           SUCCEEDED                   0         1          17.0

******** C96C48_hybatmaerosnowDA ********
202112210000        enkfgdas_cleanup                   158920982           SUCCEEDED                   0         1          15.0

******** C96C48_hybatmDA ********
202112210600        enkfgdas_cleanup                   158921341           SUCCEEDED                   0         1          16.0

******** C96C48_ufs_hybatmDA ********
202402240600        enkfgdas_cleanup                   158925325           SUCCEEDED                   0         1          15.0

Copy link
Copy Markdown
Contributor

@DavidHuber-NOAA DavidHuber-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the work on this @WalterKolczynski-NOAA!

Copy link
Copy Markdown
Contributor

@KateFriedman-NOAA KateFriedman-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @WalterKolczynski-NOAA !


date2 = sdate_gfs + interval_gfs
if date2 <= edate_gfs:
date2_gfs_str = date2_gfs.strftime("%Y%m%d%H%M")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed that date2_gfs should be date2. I'll fix this in #2943.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised PEP8 didn't complain about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-Hera-Passed **Bot use only** CI testing on Hera for this PR has completed successfully CI-Hercules-Passed **Bot use only** CI testing on Hercules for this PR has completed successfully CI-Wcoss2-Passed CI testing on WCOSS for this PR has completed successfully

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Supporting GFS interval greater than 24 hours

6 participants