Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow APP to differ between RUNs #2943

Open
wants to merge 45 commits into
base: develop
Choose a base branch
from

Conversation

DavidHuber-NOAA
Copy link
Contributor

@DavidHuber-NOAA DavidHuber-NOAA commented Sep 19, 2024

Description

This enables APP to be specified for each RUN. This also removes the need for a _no_run configuration dictionary and somewhat simplifies the _init_finalize method.

Resolves #2908
Resolves #2956

Type of change

  • New feature (adds functionality)

Change characteristics

  • Is this a breaking change (a change in existing functionality)? NO
  • Does this change require a documentation update? NO
  • Does this change require an update to any submodules? NO

How has this been tested?

  • Generated .xml files on Hera for all available CI tests and verified they were identical to develop.
  • Created an arbitrary APP configuration ({"gdas": "S2S", "gfs": "ATM"})

Checklist

  • 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

@DavidHuber-NOAA
Copy link
Contributor Author

This is going to require some more leg work as some APP-specific flags are currently read in without specifying a RUN:

base = conf.parse_config('config.base')
self.mode = base['MODE']
if self.mode not in self.VALID_MODES:
raise NotImplementedError(f'{self.mode} is not a valid application mode.\n'
f'Valid application modes are:\n'
f'{", ".join(self.VALID_MODES)}\n')
self.net = base['NET']
self.model_app = base.get('APP', 'ATM')
self.do_atm = base.get('DO_ATM', True)
self.do_wave = base.get('DO_WAVE', False)
self.do_wave_bnd = base.get('DOBNDPNT_WAVE', False)
self.do_ocean = base.get('DO_OCN', False)
self.do_ice = base.get('DO_ICE', False)
self.do_aero = base.get('DO_AERO', False)

This will require reworking the get_task_names methods to key off of RUN-specific flags.

@DavidHuber-NOAA
Copy link
Contributor Author

This PR now correctly generates identical CI XMLs as compared to develop (with the exception of the stage_ic and cleanup jobs which are now run on service partitions). An additional case was tested based on the C96C48_hybatmaerosnowDA case, but the APP was set to ATMA for RUN==gdas and ATM for RUN==gfs. In this case, the gfs tasks in the resultant XML did not include any aero-component jobs.

Marking ready for review.

workflow/applications/applications.py Outdated Show resolved Hide resolved
workflow/applications/gfs_cycled.py Outdated Show resolved Hide resolved
workflow/applications/applications.py Outdated Show resolved Hide resolved
workflow/applications/gfs_cycled.py Outdated Show resolved Hide resolved
workflow/applications/gfs_cycled.py Outdated Show resolved Hide resolved
workflow/applications/gfs_forecast_only.py Outdated Show resolved Hide resolved
workflow/rocoto/gfs_tasks.py Outdated Show resolved Hide resolved
workflow/rocoto/gfs_tasks.py Outdated Show resolved Hide resolved
@emcbot
Copy link

emcbot commented Oct 17, 2024

Experiment C48_ATM FAILED on Orion in Build# 1 in
/work2/noaa/stmp/CI/ORION/2943/RUNTESTS/EXPDIR/C48_ATM_1975b2f3

@emcbot
Copy link

emcbot commented Oct 17, 2024

Experiment C96_S2SWA_gefs_replay_ics FAILED on Orion in Build# 1 in
/work2/noaa/stmp/CI/ORION/2943/RUNTESTS/EXPDIR/C96_S2SWA_gefs_replay_ics_1975b2f3

@emcbot emcbot added CI-Orion-Failed **Bot use only** CI testing on Orion for this PR has failed and removed CI-Orion-Failed **Bot use only** CI testing on Orion for this PR has failed labels Oct 17, 2024
@emcbot
Copy link

emcbot commented Oct 17, 2024

CI Failed on Orion in Build# 1
Built and ran in directory /work2/noaa/stmp/CI/ORION/2943


Experiment C96C48_hybatmDA_1975b2f3 Terminated with 0 tasks failed and 0 dead at Thu Oct 17 09:31:44 AM CDT 2024
Experiment C96C48_hybatmDA_1975b2f3 Terminated: *STALLED*
Experiment C96_atm3DVar_1975b2f3 Terminated with 0 tasks failed and 0 dead at Thu Oct 17 09:37:53 AM CDT 2024
Experiment C96_atm3DVar_1975b2f3 Terminated: *STALLED*
Experiment C48_ATM_1975b2f3 Terminated with 0
FAIL
FAIL tasks failed and 1 dead at Thu Oct 17 11:28:20 AM CDT 2024
Experiment C48_ATM_1975b2f3 Terminated: *FAIL*
Error logs:
/work2/noaa/stmp/CI/ORION/2943/RUNTESTS/COMROOT/C48_ATM_1975b2f3/logs/2021032312/gfs_metpg2o1.log
Experiment C96_S2SWA_gefs_replay_ics_1975b2f3 Terminated with 0 tasks failed and 0 dead at Thu Oct 17 11:34:29 AM CDT 2024
Experiment C96_S2SWA_gefs_replay_ics_1975b2f3 Terminated: *STALLED*
Experiment C48_S2SW_1975b2f3 Completed 1 Cycles: *SUCCESS* at Thu Oct 17 01:45:14 PM CDT 2024
Experiment C48_S2SWA_gefs_1975b2f3 Completed 1 Cycles: *SUCCESS* at Thu Oct 17 02:46:52 PM CDT 2024

@DavidHuber-NOAA DavidHuber-NOAA removed the CI-Orion-Failed **Bot use only** CI testing on Orion for this PR has failed label Oct 18, 2024
@DavidHuber-NOAA
Copy link
Contributor Author

I'm having some issues with this branch after merging the interval PR. Converting to draft until I get it squared away.

@DavidHuber-NOAA DavidHuber-NOAA marked this pull request as draft October 23, 2024 11:53
@DavidHuber-NOAA DavidHuber-NOAA added the CI-Wcoss2-Running **Bot use only** CI testing on WCOSS for this PR is in-progress label Oct 23, 2024
@DavidHuber-NOAA DavidHuber-NOAA removed the CI-Wcoss2-Running **Bot use only** CI testing on WCOSS for this PR is in-progress label Oct 24, 2024
@DavidHuber-NOAA
Copy link
Contributor Author

All features are working again. Reopening this PR for review.

@DavidHuber-NOAA DavidHuber-NOAA marked this pull request as ready for review October 24, 2024 19:17
@DavidHuber-NOAA DavidHuber-NOAA added CI-Hercules-Ready **CM use only** PR is ready for CI testing on Hercules and removed CI-Hercules-Passed **Bot use only** CI testing on Hercules for this PR has completed successfully CI-Hercules-Ready **CM use only** PR is ready for CI testing on Hercules labels Oct 25, 2024
@@ -133,11 +133,8 @@ export DO_COUPLED="NO"
export DO_WAVE="NO"
export DO_OCN="NO"
export DO_ICE="NO"
export DO_AERO="NO"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is there no DO_AERO for GEFS anymore (and not exported for GFS)?

Copy link
Contributor Author

@DavidHuber-NOAA DavidHuber-NOAA Nov 6, 2024

Choose a reason for hiding this comment

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

Because aerosols are controlled at the forecast and analysis level, not the application level.

For instance, previously, this was implemented in the config.fcst config by reading the AERO_FCST_RUN variable:

# Turn off waves if not used for this RUN
case ${WAVE_RUN} in
both | "${RUN/enkf}" ) ;; # Don't change
*) DO_WAVE="NO" ;; # Turn waves off
esac
# Turn off aerosols if not used for this RUN
case ${AERO_FCST_RUN} in
both | "${RUN/enkf}" ) ;; # Don't change
*) DO_AERO="NO" ;; # Turn aerosols off
esac

But now, it can rely on just the DO_AERO_FCST variable.

Keeping the DO_AERO flag would be redundant since it is superseded by DO_AERO_FCST (or DO_AERO_ANL in the analysis jobs).

Copy link
Contributor Author

@DavidHuber-NOAA DavidHuber-NOAA Nov 6, 2024

Choose a reason for hiding this comment

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

I debated whether to add DO_AERO (without exporting) to config.gefs. When analyses are enabled, having the flag will be handy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check reservable memory on Hercules and Orion Enable RUN-specific APP configurations
4 participants