Skip to content

Add a function to create COM-like paths under DATAROOT#4476

Merged
aerorahul merged 7 commits intoNOAA-EMC:developfrom
DavidHuber-NOAA:feature/dataroot_util
Jan 28, 2026
Merged

Add a function to create COM-like paths under DATAROOT#4476
aerorahul merged 7 commits intoNOAA-EMC:developfrom
DavidHuber-NOAA:feature/dataroot_util

Conversation

@DavidHuber-NOAA
Copy link
Contributor

Description

This adds the dataroot_com_path function to bash_utils.sh to create a COM-like path in DATAROOT space.
Resolves #4474

Type of change

  • Bug fix (fixes something broken)
  • New feature (adds functionality)
  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

  • Is this change expected to change outputs NO
  • 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 of the following submodules? NO

How has this been tested?

Tested at the command line on C6:

> . bash_utils.sh
> ROTDIR=/gpfs/f6/drsa-hurr1/world-shared/David.Huber/rt_metp/COMROOT/C96C48_hybatmDA_metp
> DATAROOT=/gpfs/f6/drsa-precip4/world-shared/David.Huber/RUNDIRS/C96C48_hybatmDA_metp
> dataroot_com_path ${ROTDIR}/gfs.20211229
/gpfs/f6/drsa-precip4/world-shared/David.Huber/RUNDIRS/C96C48_hybatmDA_metp/gfs.20211229

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
  • I have documented my code, including function, input, and output descriptions
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • This change is covered by an existing CI test or a new one has been added
    - Not yet. A future PR will use this in CI tests.
  • Any new scripts have been added to the .github/CODEOWNERS file with owners

aerorahul
aerorahul previously approved these changes Jan 28, 2026
Copy link
Contributor

@aerorahul aerorahul 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. Just one suggestion to disable tracing inside the function.

@DavidHuber-NOAA
Copy link
Contributor Author

DavidHuber-NOAA commented Jan 28, 2026

@aerorahul I have retested this:

> COMROOT=/gpfs/f6/drsa-hurr1/world-shared/David.Huber/rt_gsidiags/COMROOT
> DATAROOT=/gpfs/f6/drsa-precip4/world-shared/David.Huber/RUNDIRS/C96C48_hybatmDA_gsidiags/gdas.2021122100
> COMOUT_ATMOS_ANALYSIS=/gpfs/f6/drsa-hurr1/world-shared/David.Huber/rt_gsidiags/COMROOT/C96C48_hybatmDA_gsidiags/gdas.20211221/00//analysis/atmos
> dataroot_com_path ${COMOUT_ATMOS_ANALYSIS}
/gpfs/f6/drsa-precip4/world-shared/David.Huber/RUNDIRS/C96C48_hybatmDA_gsidiags/gdas.2021122100/C96C48_hybatmDA_gsidiags/gdas.20211221/00/analysis/atmos

It gets a little redundant/deep into the DATAROOT, but in operations this would look something like

> COMROOT=/lfs/h1/ops/prod/com
> DATAROOT=/lfs/f1/tmp
> COMOUT_ATMOS_ANALYSIS=/lfs/h1/ops/prod/com/gfs/v17/gdas.20211221/00/analysis/atmos
> dataroot_com_path ${COMOUT_ATMOS_ANALYSIS}
/lfs/f1/tmp/gfs/v17.0/gdas.20211221/00/analysis/atmos

which is the desired outcome.

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

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

lgtm

@aerorahul aerorahul merged commit 302e9cf into NOAA-EMC:develop Jan 28, 2026
5 checks passed
@aerorahul aerorahul deleted the feature/dataroot_util branch January 28, 2026 20:16
JessicaMeixner-NOAA pushed a commit to JessicaMeixner-NOAA/global-workflow that referenced this pull request Feb 9, 2026
# Description
This adds the `dataroot_com_path` function to bash_utils.sh to create a
`COM`-like path in `DATAROOT` space.
Resolves NOAA-EMC#4474
DavidHuber-NOAA added a commit to DavidHuber-NOAA/global-workflow that referenced this pull request Feb 10, 2026
CatherineThomas-NOAA pushed a commit that referenced this pull request Feb 11, 2026
This will bring in PRs #4476 and #4487 to the dev/gfs.v17 branch to
enable the use of DATAROOT space for gsi diagnostic files, which allows
easy use of links rather than sending a tarball to COM.
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.

Add a utility to create a COM structure under DATAROOT

2 participants