-
Notifications
You must be signed in to change notification settings - Fork 202
Create Gaussian sfcanl file at the beginning of IAU window #4049
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
Conversation
Marking this PR as ready for review. All preliminary offline CI GFS tests passed on WCOSS2 except for the
|
ush/gaussian_sfcanl.sh
Outdated
iy=${gcycle_date:0:4} | ||
im=${gcycle_date:4:2} | ||
id=${gcycle_date:6:2} | ||
ih=${gcycle_date:8:2} | ||
|
||
# input analysis tiles (with nst records) | ||
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile1.nc" "./anal.tile1.nc" | ||
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile2.nc" "./anal.tile2.nc" | ||
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile3.nc" "./anal.tile3.nc" | ||
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile4.nc" "./anal.tile4.nc" | ||
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile5.nc" "./anal.tile5.nc" | ||
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile6.nc" "./anal.tile6.nc" | ||
export OMP_NUM_THREADS=${OMP_NUM_THREADS_SFC:-1} |
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.
iy=${gcycle_date:0:4} | |
im=${gcycle_date:4:2} | |
id=${gcycle_date:6:2} | |
ih=${gcycle_date:8:2} | |
# input analysis tiles (with nst records) | |
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile1.nc" "./anal.tile1.nc" | |
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile2.nc" "./anal.tile2.nc" | |
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile3.nc" "./anal.tile3.nc" | |
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile4.nc" "./anal.tile4.nc" | |
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile5.nc" "./anal.tile5.nc" | |
${NLN} "${COMIN_ATMOS_RESTART}/${PDY}.${cyc}0000.sfcanl_data.tile6.nc" "./anal.tile6.nc" | |
export OMP_NUM_THREADS=${OMP_NUM_THREADS_SFC:-1} |
Move this section closer to where it is used, and no need to set OMP_NUM_THREADS
each time in the loop.
ush/gaussian_sfcanl.sh
Outdated
gcycle_dates+=("${BDATE}") | ||
fi | ||
|
||
for hr in "${!gcycle_dates[@]}"; do |
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.
for hr in "${!gcycle_dates[@]}"; do | |
for ii in "${!gcycle_dates[@]}"; do |
This is an index, not hour.
ush/gaussian_sfcanl.sh
Outdated
|
||
for hr in "${!gcycle_dates[@]}"; do | ||
|
||
gcycle_date=${gcycle_dates[hr]} |
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.
gcycle_date=${gcycle_dates[hr]} | |
gcycle_date=${gcycle_dates[ii]} |
ush/gaussian_sfcanl.sh
Outdated
fi | ||
export err=$? | ||
if [[ ${err} -ne 0 ]]; then | ||
echo "FATAL ERROR: ${GAUSFCANLEXE} returned non-zero exit status!" |
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.
echo "FATAL ERROR: ${GAUSFCANLEXE} returned non-zero exit status!" | |
echo "FATAL ERROR: ${GAUSFCANLEXE} returned non-zero exit status processing ${gcycle_date}!" |
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.
Thanks for this PR @EricSinsky-NOAA
A few suggestions if you wouldn't mind taking into consideration.
ush/gaussian_sfcanl.sh
Outdated
################################################################################ | ||
# Postprocessing | ||
cd "${pwd}" | ||
cd "${pwd}" || exit |
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.
cd "${pwd}" || exit | |
cd "${DATA}" || exit |
Thank you for the review, @aerorahul. I have committed and pushed your suggestions. |
ush/gaussian_sfcanl.sh
Outdated
if [[ ${err} -ne 0 ]]; then | ||
echo "FATAL ERROR: ${GAUSFCANLEXE} returned non-zero exit status processing ${gcycle_date}!" | ||
# Since we are in "${DATA}/gausfcanl_${gcycle_date:8:2}", we need to step out | ||
cd "${DATA}" || exit "${err}" |
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.
cd "${DATA}" || exit "${err}" | |
exit "${err}" |
This is incorrect, as cd ${DATA}
will be true, and the ||
will not be executed.
ush/gaussian_sfcanl.sh
Outdated
if [[ ! -d "${DATA}/gausfcanl_${gcycle_date:8:2}" ]]; then | ||
mkdir -p "${DATA}/gausfcanl_${gcycle_date:8:2}" | ||
fi | ||
|
||
cd "${DATA}/gausfcanl_${gcycle_date:8:2}" |
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.
if [[ ! -d "${DATA}/gausfcanl_${gcycle_date:8:2}" ]]; then | |
mkdir -p "${DATA}/gausfcanl_${gcycle_date:8:2}" | |
fi | |
cd "${DATA}/gausfcanl_${gcycle_date:8:2}" | |
rm -rf "${DATA}/gausfcanl_${gcycle_date:8:2}" | |
mkdir -p "${DATA}/gausfcanl_${gcycle_date:8:2}" | |
cd "${DATA}/gausfcanl_${gcycle_date:8:2}" |
We should perhaps start with a clean directory each time, so that when/if the job fails and restarts, it gets a clean directory.
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.
Looks good.
Just one suggestion on starting with a clean directory for the gcycle_date
each time.
Ready to run the tests after it.
Thank you, @aerorahul. I have also requested a review from @CatherineThomas-NOAA. Would it be possible to hold off on CI testing until she’s had a chance to review? |
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.
looks good. thanks for addressing the comments and for this work.
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.
Thanks for putting this together @EricSinsky-NOAA and running the tests. I did a spot check of the new output from the low res v17 tests and it looks reasonable.
One consideration for both @aerorahul @EricSinsky-NOAA : the new file is called gdas.tHHz.sfcanl.nc
with HH being the time at the beginning of the window. For the 3D fields, we have analyses and increment files valid at the beginning of the window with the nomenclature of gdas.tHHz.atmi003.nc
and gdas.tHHz.atma003.ensres.nc
where the HH is the cycle and 003 signifies they are valid at the beginning of the window. What do you think about naming this new file gdas.tHHz.sfca003.nc
?
@CatherineThomas-NOAA Good catch there. |
Thanks for the suggestion @CatherineThomas-NOAA! I'll work on changing the file names to |
Converting this PR back to draft since options are being explored to see if the creation of an sfcanl gaussian file at the beginning of the IAU window can be bypassed. The status of this PR will be updated from draft as soon as a decision is made. |
Closing this PR since a sfcanl file at the beginning of the IAU window is no longer needed. |
Description
This PR creates a Gaussian sfcanl file at the beginning of the IAU window. This is accomplished by modifying
ush/gaussian_sfcanl.sh
in theanalcalc
task. This file is created only whenDOIAU
isYES
.This PR will remain a draft until further tests are performed. The archive yamls are also modified so that this new file is added to the GFS archive.
Resolves #3895
Type of change
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 of the following submodules? NO
How has this been tested?
C96C48mx500_S2SW_cyc_gfs
test has been performed on WCOSS2.Checklist