-
Notifications
You must be signed in to change notification settings - Fork 210
Enable ensemble archiving via Globus #3479
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
Merged
DavidHuber-NOAA
merged 20 commits into
NOAA-EMC:develop
from
DavidHuber-NOAA:feature/ens_globus
Mar 24, 2025
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c0f5604
Rename ensemble globus JJob
DavidHuber-NOAA db1a43f
First stab at ensemble globus archiving
DavidHuber-NOAA 370195a
Merge in develop; resolve conflict in gfs tasks
DavidHuber-NOAA 6013bd0
Remove globus_earc config (not needed)
DavidHuber-NOAA d1cd8eb
Check for empty transfer sets
DavidHuber-NOAA 1eadd6a
Create ensgrp-based dataset yaml files
DavidHuber-NOAA db7e051
Move ensgrp definitions to new config file
DavidHuber-NOAA e946629
Merge remote-tracking branch 'origin/develop' into feature/ens_globus
DavidHuber-NOAA ef2a3f3
Add globus job description
DavidHuber-NOAA 91da1bf
Return to 40 members per group at C48-96
DavidHuber-NOAA 6222c7b
Update earc JJob name
DavidHuber-NOAA 3974ad2
Update CODEOWNERS
DavidHuber-NOAA b5d1243
Remove debug print statements
DavidHuber-NOAA 8cb19de
Add globus dependency for enkf cleanup task
DavidHuber-NOAA e8be679
Merge branch 'develop' into feature/ens_globus
DavidHuber-NOAA fdb41e4
Add group definitions
DavidHuber-NOAA 2517669
Merge branch 'develop' into feature/ens_globus
DavidHuber-NOAA 38d1d8e
Apply suggestions from code review
DavidHuber-NOAA 5d89c8f
Merge branch 'develop' into feature/ens_globus
DavidHuber-NOAA e8ea838
Merge branch 'develop' into feature/ens_globus
DavidHuber-NOAA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
15 changes: 10 additions & 5 deletions
15
jobs/JGDAS_ENKF_GLOBUS_ARCH → jobs/JGLOBAL_ENS_GLOBUS_ARCH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| source "${HOMEgfs}/ush/preamble.sh" | ||
|
|
||
| ############################################################### | ||
| # Source FV3GFS workflow modules | ||
| . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" | ||
| status=$? | ||
| if [[ ${status} -ne 0 ]]; then exit "${status}"; fi | ||
|
|
||
| ############################################################### | ||
| # setup python path for workflow utilities and tasks | ||
| PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush/python" | ||
| export PYTHONPATH | ||
|
|
||
| export job="globus_earc" | ||
| export jobid="${job}.$$" | ||
|
|
||
| ############################################################### | ||
| # Execute the JJOB | ||
| "${HOMEgfs}/jobs/JGLOBAL_ENS_GLOBUS_ARCH" | ||
| status=$? | ||
|
|
||
| exit "${status}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| ########## config.earc_groups ######## | ||
| # Specifies the grouping strategy for ensemble archiving | ||
| # This is used by the earc_tars and globus_earc jobs | ||
|
|
||
|
|
||
| # Set the number of ensemble members to archive per earc_tars/globus_earc job | ||
| case "${CASE_ENS}" in | ||
| "C48" | "C96") | ||
| export NMEM_EARCGRP=80 | ||
| ;; | ||
| "C192") | ||
| export NMEM_EARCGRP=20 | ||
| ;; | ||
| "C384" | "C768") | ||
| export NMEM_EARCGRP=10 | ||
| ;; | ||
| "C1152") | ||
| export NMEM_EARCGRP=4 | ||
| ;; | ||
| *) | ||
| echo "FATAL ERROR: Unknown ensemble resolution ${CASE_ENS}, ABORT!" | ||
| exit 1 | ||
| ;; | ||
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| #!/usr/bin/env python3 | ||
|
|
||
| import os | ||
|
|
||
| from pygfs.task.globus_hpss import GlobusHpss | ||
| from wxflow import AttrDict, Logger, cast_strdict_as_dtypedict, logit | ||
|
|
||
| # initialize root logger | ||
| logger = Logger(level=os.environ.get("LOGGING_LEVEL", "DEBUG"), colored_log=True) | ||
|
|
||
|
|
||
| @logit(logger) | ||
| def main(): | ||
|
|
||
| config = cast_strdict_as_dtypedict(os.environ) | ||
|
|
||
| # Instantiate the globus object | ||
| globus = GlobusHpss(config) | ||
|
|
||
| keys = ['STAGE_DIR', 'current_cycle', 'RUN', 'PDY', 'HOMEgfs', 'sven_dropbox', | ||
| 'doorman_gendel', 'DATASETS_YAML', 'PARMgfs', 'COMIN_CONF', 'KEEPDATA', | ||
| 'jobid', 'hpss_target_dir', 'server_home', 'SERVER_NAME', 'DOORMAN_ROOT', | ||
| 'CLIENT_GLOBUS_UUID', 'SERVER_GLOBUS_UUID', 'PSLOT', 'ENSGRP'] | ||
|
|
||
| globus_dict = AttrDict() | ||
| for key in keys: | ||
| try: | ||
| globus_dict[key] = globus.task_config[key] | ||
| except KeyError: | ||
| logger.warning(f"WARNING: key ({key}) not found in globus.task_config!") | ||
|
|
||
| # Determine which tarballs to send | ||
| transfer_sets = globus.configure(globus_dict) | ||
|
|
||
| # Send the tarballs to HPSS via Niagara. Start with non-rstprod (standard) data | ||
| count_sets = 0 | ||
| for transfer_set in ["standard", "rstprod"]: | ||
| if len(transfer_sets[transfer_set]['locations']) > 0: | ||
| has_rstprod = transfer_set == "rstprod" | ||
| globus.execute_transfer_data(transfer_sets[transfer_set], has_rstprod) | ||
| count_sets += 1 | ||
|
|
||
| if count_sets == 0: | ||
| raise RuntimeError("FATAL ERROR: Transfer sets were all empty!") | ||
|
|
||
| # Clean up any temporary files | ||
| globus.clean() | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.