-
Notifications
You must be signed in to change notification settings - Fork 168
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
GEFS Staging in exglobal_stage_ic #1892
Merged
WalterKolczynski-NOAA
merged 59 commits into
NOAA-EMC:develop
from
AnilKumar-NOAA:upstream/develop
Oct 27, 2023
Merged
Changes from 56 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
43bdac8
start stagging the code
AnilKumar-NOAA 1456514
Add gefs selections and modified source and target in ATMOS INPUT
AnilKumar-NOAA 7d348dc
remove comment line
AnilKumar-NOAA 4b7a978
gefs sourcing and target updates
AnilKumar-NOAA a05819c
updated code to read mem_dir in gefs
AnilKumar-NOAA 2794a19
update the gefs ensemble source dir
AnilKumar-NOAA 4b6e50a
updated source for the gfs_ctrl.nc
AnilKumar-NOAA 944f49a
Add Ensemble flag check
AnilKumar-NOAA f78761e
Removed if block from gefs selection
AnilKumar-NOAA 5c52db3
fixed loop in ATMOS sections
AnilKumar-NOAA 9dd29b8
assign value to ensemble members
AnilKumar-NOAA 1c9f446
GEFS Stagging in ocean, ice, and wave
AnilKumar-NOAA c3934a3
GEFS Stagging with NSEM_ENS fixed
AnilKumar-NOAA 3fdd4a8
Removing Shell checks
AnilKumar-NOAA fc173ec
Removing Shell checks
AnilKumar-NOAA eac7d37
Removing Shell checks
AnilKumar-NOAA bb2cb50
Removing Shell checks
AnilKumar-NOAA 7849bfb
made modifications with =GFS
AnilKumar-NOAA 246854b
Fixed
AnilKumar-NOAA be72d5c
fixed if loops for gfs and gefs
AnilKumar-NOAA ac0a101
looping over memdir for all staging components
AnilKumar-NOAA f7e37fb
memdir loop over all the components of exglobal_stage_ic
AnilKumar-NOAA 3197351
fixed shellcheck warning for memdir loop
AnilKumar-NOAA 3d37401
Merge branch 'NOAA-EMC:develop' into upstream/develop
AnilKumar-NOAA 5c3094a
completed patch for PR 1892
AnilKumar-NOAA e34a3c6
Checked all indent issues
AnilKumar-NOAA d0547a5
Merge branch 'NOAA-EMC:develop' into upstream/develop
AnilKumar-NOAA a4fe130
Fixed indent issues for exglobal_stage_ic.sh
AnilKumar-NOAA ebc0eba
removed -r switch for all the generate_com
AnilKumar-NOAA 0967029
remove if condition and gefs manually staged condition in setup_expt.py
AnilKumar-NOAA bdd775c
Add stage_ic to GEFS job mesh and update dependencies
WalterKolczynski-NOAA 0c1b0a1
Add BASE_CPLIC to GEFS config.base
WalterKolczynski-NOAA 906e3e0
Add stage_ic to GEFS config
WalterKolczynski-NOAA 2c3819b
Remove stale coupled_ic config from GEFS
WalterKolczynski-NOAA 23b172d
Fix low-res staged IC directory names
WalterKolczynski-NOAA abb512f
Add GEFS forecast dependency on stage_ic
WalterKolczynski-NOAA 26ca715
Fix indentation of print in setup_expt
WalterKolczynski-NOAA b1d9368
Load stage_ic config during exp setup for GEFS
WalterKolczynski-NOAA 9fb206b
Change BASE_CPLIC location to temp new structure on Hera
WalterKolczynski-NOAA bd148ca
Update rocoto generation for new stage_ic and add GEFS from WalterKol…
AnilKumar-NOAA df68735
indent issue resolved
AnilKumar-NOAA b678b47
indent issue resolved
AnilKumar-NOAA cd2c740
Merge pull request #4 from WalterKolczynski-NOAA/feature/stage_gefs
AnilKumar-NOAA d3799d2
Merge branch 'NOAA-EMC:develop' into upstream/develop
AnilKumar-NOAA 29f4144
gefs staging-exglobal_stage_ic.sh file is tested and code is running …
AnilKumar-NOAA 5da2ab2
Merge branch 'NOAA-EMC:develop' into upstream/develop
AnilKumar-NOAA e925422
Update prototype IC paths for refactored directories
WalterKolczynski-NOAA b0bdc4c
successful- tested coupled ic for gefs and gfs
AnilKumar-NOAA 5c168cf
Merge branch 'upstream/develop' of https://github.com/AnilKumar-NOAA/…
AnilKumar-NOAA 5590aaa
Merge pull request #5 from WalterKolczynski-NOAA/feature/stage_gefs
AnilKumar-NOAA 8113cae
changes write permission to config.resource file
AnilKumar-NOAA 4e0604e
config file permission to write for gfs
AnilKumar-NOAA 93621ee
undo permission for both gfs ad gefs
AnilKumar-NOAA b6c8e99
undo permission for gfs/config.ocn
AnilKumar-NOAA a271675
Merge branch 'develop' into upstream/develop
WalterKolczynski-NOAA bdc4846
Update scripts/exglobal_stage_ic.sh
aerorahul aeb1879
Update scripts/exglobal_stage_ic.sh
aerorahul 3178ced
Delete parm/config/gefs/config.waveinit
aerorahul de8a7d9
Update workflow/rocoto/gefs_tasks.py
aerorahul 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 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 was deleted.
Oops, something went wrong.
This file contains 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 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,23 @@ | ||
#! /usr/bin/env bash | ||
|
||
########## config.stage_ic ########## | ||
|
||
echo "BEGIN: config.stage_ic" | ||
|
||
# Get task specific resources | ||
source "${EXPDIR}/config.resources" stage_ic | ||
|
||
case "${CASE}" in | ||
"C48") | ||
export CPL_ATMIC="gefs_test" | ||
export CPL_ICEIC="gefs_test" | ||
export CPL_OCNIC="gefs_test" | ||
export CPL_WAVIC="gefs_test" | ||
;; | ||
*) | ||
echo "FATAL ERROR Unrecognized resolution: ${CASE}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
echo "END: config.stage_ic" |
This file contains 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,14 @@ | ||
#! /usr/bin/env bash | ||
|
||
########## config.waveinit ########## | ||
# Wave steps specific | ||
|
||
echo "BEGIN: config.waveinit" | ||
|
||
# Get task specific resources | ||
. $EXPDIR/config.resources waveinit | ||
|
||
|
||
# Step label | ||
export sigMODE=${sigMODE:-init} | ||
|
||
echo "END: config.waveinit" |
This file contains 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 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#! /usr/bin/env bash | ||
#!/usr/bin/env bash | ||
|
||
source "${HOMEgfs}/ush/preamble.sh" | ||
|
||
|
@@ -8,99 +8,89 @@ GDATE=$(date --utc -d "${PDY} ${cyc} - ${assim_freq} hours" +%Y%m%d%H) | |
gPDY="${GDATE:0:8}" | ||
gcyc="${GDATE:8:2}" | ||
|
||
MEMDIR_ARRAY=() | ||
if [[ "${RUN}" == "gefs" ]]; then | ||
# Populate the member_dirs array based on the value of NMEM_ENS | ||
for ((ii = 0; ii <= "${NMEM_ENS}"; ii++)); do | ||
MEMDIR_ARRAY+=("mem$(printf "%03d" "${ii}")") | ||
done | ||
else | ||
MEMDIR_ARRAY+=("") | ||
fi | ||
|
||
# Initialize return code | ||
err=0 | ||
|
||
error_message(){ | ||
echo "FATAL ERROR: Unable to copy ${1} to ${2} (Error code ${3})" | ||
error_message() { | ||
echo "FATAL ERROR: Unable to copy ${1} to ${2} (Error code ${3})" | ||
} | ||
|
||
############################################################### | ||
# Start staging | ||
|
||
# Stage the FV3 initial conditions to ROTDIR (cold start) | ||
YMD=${PDY} HH=${cyc} generate_com -r COM_ATMOS_INPUT | ||
[[ ! -d "${COM_ATMOS_INPUT}" ]] && mkdir -p "${COM_ATMOS_INPUT}" | ||
source="${BASE_CPLIC}/${CPL_ATMIC}/${PDY}${cyc}/${CDUMP}/${CASE}/INPUT/gfs_ctrl.nc" | ||
target="${COM_ATMOS_INPUT}/gfs_ctrl.nc" | ||
${NCP} "${source}" "${target}" | ||
rc=$? | ||
(( rc != 0 )) && error_message "${source}" "${target}" "${rc}" | ||
err=$((err + rc)) | ||
for ftype in gfs_data sfc_data; do | ||
for tt in $(seq 1 6); do | ||
source="${BASE_CPLIC}/${CPL_ATMIC}/${PDY}${cyc}/${CDUMP}/${CASE}/INPUT/${ftype}.tile${tt}.nc" | ||
target="${COM_ATMOS_INPUT}/${ftype}.tile${tt}.nc" | ||
${NCP} "${source}" "${target}" | ||
rc=$? | ||
(( rc != 0 )) && error_message "${source}" "${target}" "${rc}" | ||
err=$((err + rc)) | ||
done | ||
done | ||
|
||
# Stage ocean initial conditions to ROTDIR (warm start) | ||
if [[ "${DO_OCN:-}" = "YES" ]]; then | ||
YMD=${gPDY} HH=${gcyc} generate_com -r COM_OCEAN_RESTART | ||
[[ ! -d "${COM_OCEAN_RESTART}" ]] && mkdir -p "${COM_OCEAN_RESTART}" | ||
source="${BASE_CPLIC}/${CPL_OCNIC}/${PDY}${cyc}/ocn/${OCNRES}/MOM.res.nc" | ||
target="${COM_OCEAN_RESTART}/${PDY}.${cyc}0000.MOM.res.nc" | ||
${NCP} "${source}" "${target}" | ||
for MEMDIR in "${MEMDIR_ARRAY[@]}"; do | ||
# Stage the FV3 initial conditions to ROTDIR (cold start) | ||
YMD=${PDY} HH=${cyc} generate_com COM_ATMOS_INPUT | ||
[[ ! -d "${COM_ATMOS_INPUT}" ]] && mkdir -p "${COM_ATMOS_INPUT}" | ||
src="${BASE_CPLIC}/${CPL_ATMIC}/${PDY}${cyc}/${MEMDIR}/atmos/gfs_ctrl.nc" | ||
tgt="${COM_ATMOS_INPUT}/gfs_ctrl.nc" | ||
${NCP} "${src}" "${tgt}" | ||
rc=$? | ||
(( rc != 0 )) && error_message "${source}" "${target}" "${rc}" | ||
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}" | ||
err=$((err + rc)) | ||
case "${OCNRES}" in | ||
"500" | "100") # Only 5 degree or 1 degree ocean does not have MOM.res_[1-4].nc files | ||
;; | ||
"025") # Only 1/4 degree ocean has MOM.res_[1-4].nc files | ||
for nn in $(seq 1 4); do | ||
source="${BASE_CPLIC}/${CPL_OCNIC}/${PDY}${cyc}/ocn/${OCNRES}/MOM.res_${nn}.nc" | ||
if [[ -f "${source}" ]]; then | ||
target="${COM_OCEAN_RESTART}/${PDY}.${cyc}0000.MOM.res_${nn}.nc" | ||
${NCP} "${source}" "${target}" | ||
rc=$? | ||
(( rc != 0 )) && error_message "${source}" "${target}" "${rc}" | ||
err=$((err + rc)) | ||
fi | ||
done | ||
;; | ||
*) | ||
echo "FATAL ERROR: Unsupported ocean resolution ${OCNRES}" | ||
rc=1 | ||
for ftype in gfs_data sfc_data; do | ||
for ((tt = 1; tt <= 6; tt++)); do | ||
src="${BASE_CPLIC}/${CPL_ATMIC}/${PDY}${cyc}/${MEMDIR}/atmos/${ftype}.tile${tt}.nc" | ||
tgt="${COM_ATMOS_INPUT}/${ftype}.tile${tt}.nc" | ||
${NCP} "${src}" "${tgt}" | ||
rc=$? | ||
tgt="${COM_ATMOS_INPUT}/${ftype}.tile${tt}.nc" | ||
${NCP} "${src}" "${tgt}" | ||
rc=$? | ||
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}" | ||
err=$((err + rc)) | ||
;; | ||
esac | ||
fi | ||
|
||
# Stage ice initial conditions to ROTDIR (warm start) | ||
if [[ "${DO_ICE:-}" = "YES" ]]; then | ||
YMD=${gPDY} HH=${gcyc} generate_com -r COM_ICE_RESTART | ||
[[ ! -d "${COM_ICE_RESTART}" ]] && mkdir -p "${COM_ICE_RESTART}" | ||
ICERESdec=$(echo "${ICERES}" | awk '{printf "%0.2f", $1/100}') | ||
source="${BASE_CPLIC}/${CPL_ICEIC}/${PDY}${cyc}/ice/${ICERES}/cice5_model_${ICERESdec}.res_${PDY}${cyc}.nc" | ||
target="${COM_ICE_RESTART}/${PDY}.${cyc}0000.cice_model.res.nc" | ||
${NCP} "${source}" "${target}" | ||
rc=$? | ||
(( rc != 0 )) && error_message "${source}" "${target}" "${rc}" | ||
err=$((err + rc)) | ||
fi | ||
done | ||
done | ||
|
||
# Stage the WW3 initial conditions to ROTDIR (warm start; TODO: these should be placed in $RUN.$gPDY/$gcyc) | ||
if [[ "${DO_WAVE:-}" = "YES" ]]; then | ||
YMD=${PDY} HH=${cyc} generate_com -r COM_WAVE_RESTART | ||
[[ ! -d "${COM_WAVE_RESTART}" ]] && mkdir -p "${COM_WAVE_RESTART}" | ||
for grdID in ${waveGRD}; do # TODO: check if this is a bash array; if so adjust | ||
source="${BASE_CPLIC}/${CPL_WAVIC}/${PDY}${cyc}/wav/${grdID}/${PDY}.${cyc}0000.restart.${grdID}" | ||
target="${COM_WAVE_RESTART}/${PDY}.${cyc}0000.restart.${grdID}" | ||
${NCP} "${source}" "${target}" | ||
# Stage ocean initial conditions to ROTDIR (warm start) | ||
if [[ "${DO_OCN:-}" = "YES" ]]; then | ||
YMD=${gPDY} HH=${gcyc} generate_com COM_OCEAN_RESTART | ||
[[ ! -d "${COM_OCEAN_RESTART}" ]] && mkdir -p "${COM_OCEAN_RESTART}" | ||
src="${BASE_CPLIC}/${CPL_OCNIC}/${PDY}${cyc}/${MEMDIR}/ocean/${PDY}.${cyc}0000.MOM.res.nc" | ||
tgt="${COM_OCEAN_RESTART}/${PDY}.${cyc}0000.MOM.res.nc" | ||
${NCP} "${src}" "${tgt}" | ||
rc=$? | ||
(( rc != 0 )) && error_message "${source}" "${target}" "${rc}" | ||
[[ ${rc} -ne 0 ]] && error_message "${src}" "${tgt}" "${rc}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why
aerorahul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
err=$((err + rc)) | ||
done | ||
fi | ||
fi | ||
# Stage ice initial conditions to ROTDIR (warm start) | ||
if [[ "${DO_ICE:-}" = "YES" ]]; then | ||
YMD=${gPDY} HH=${gcyc} generate_com COM_ICE_RESTART | ||
[[ ! -d "${COM_ICE_RESTART}" ]] && mkdir -p "${COM_ICE_RESTART}" | ||
src="${BASE_CPLIC}/${CPL_ICEIC}/${PDY}${cyc}/${MEMDIR}/ice/${PDY}.${cyc}0000.cice_model.res.nc" | ||
tgt="${COM_ICE_RESTART}/${PDY}.${cyc}0000.cice_model.res.nc" | ||
${NCP} "${src}" "${tgt}" | ||
rc=$? | ||
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}" | ||
err=$((err + rc)) | ||
fi | ||
|
||
# Stage the WW3 initial conditions to ROTDIR (warm start; TODO: these should be placed in $RUN.$gPDY/$gcyc) | ||
if [[ "${DO_WAVE:-}" = "YES" ]]; then | ||
YMD=${PDY} HH=${cyc} generate_com COM_WAVE_RESTART | ||
[[ ! -d "${COM_WAVE_RESTART}" ]] && mkdir -p "${COM_WAVE_RESTART}" | ||
for grdID in ${waveGRD}; do # TODO: check if this is a bash array; if so adjust | ||
src="${BASE_CPLIC}/${CPL_WAVIC}/${PDY}${cyc}/${MEMDIR}/wave/${PDY}.${cyc}0000.restart.${grdID}" | ||
tgt="${COM_WAVE_RESTART}/${PDY}.${cyc}0000.restart.${grdID}" | ||
${NCP} "${src}" "${tgt}" | ||
rc=$? | ||
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}" | ||
err=$((err + rc)) | ||
done | ||
fi | ||
|
||
done # for MEMDIR in "${MEMDIR_ARRAY[@]}"; do | ||
############################################################### | ||
# Check for errors and exit if any of the above failed | ||
if [[ "${err}" -ne 0 ]] ; then | ||
if [[ "${err}" -ne 0 ]]; then | ||
echo "FATAL ERROR: Unable to copy ICs from ${BASE_CPLIC} to ${ROTDIR}; ABORT!" | ||
exit "${err}" | ||
fi | ||
|
This file contains 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 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being added? Are we running with waves in GEFS at this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we just copy that files from gfs when we were trying to run with wave.