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

Remove existing directory if it exists when getic runs #1165

Merged
merged 4 commits into from
Dec 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion jobs/rocoto/getic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,15 @@ else # Pull chgres cube inputs for cold start IC generation
fi

# Move extracted data to ROTDIR
if [ ! -d ${ROTDIR}/${CDUMP}.${yy}${mm}${dd}/${hh}/${COMPONENT} ]; then mkdir -p ${ROTDIR}/${CDUMP}.${yy}${mm}${dd}/${hh}/${COMPONENT} ; fi
if [ ! -d ${ROTDIR}/${CDUMP}.${yy}${mm}${dd}/${hh}/${COMPONENT} ]; then
mkdir -p ${ROTDIR}/${CDUMP}.${yy}${mm}${dd}/${hh}/${COMPONENT}
else
# Exception handling on case if ICS already exist
echo "The ICS target directory is not empty. Please backup or remove ${ROTDIR}/${CDUMP}.${yy}${mm}${dd}/${hh}/${COMPONENT}"
echo "This job will now set to fail"
exit 7
fi

if [ $gfs_ver = v16 -a $RETRO = "YES" ]; then
mv ${EXTRACT_DIR}/${CDUMP}.${yy}${mm}${dd}/${hh}/* ${ROTDIR}/${CDUMP}.${yy}${mm}${dd}/${hh}/${COMPONENT}
else
Expand Down