Skip to content

Commit

Permalink
Merge pull request #1429 from karsenau/fix/s2s_patch_oct2023
Browse files Browse the repository at this point in the history
S2S Runtime Script Updates
  • Loading branch information
emkemp authored Oct 12, 2023
2 parents 5bbf400 + 589f745 commit 0c8576e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions lis/utils/usaf/s2s/s2s_app/s2s_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -984,8 +984,8 @@ if [ $DATATYPE == "forecast" ]; then
else
echo
# CFSv2 forecast
sh s2s_app/wget_cfsv2_oper_ts_e2es.sh -y ${YYYY} -m ${MM} -c ${BWD}/${CFILE} -d N
ret_code=$?
# sh s2s_app/wget_cfsv2_oper_ts_e2es.sh -y ${YYYY} -m ${MM} -c ${BWD}/${CFILE} -d N
# ret_code=$?
if [ $ret_code -gt 0 ]; then
exit
fi
Expand Down
18 changes: 6 additions & 12 deletions lis/utils/usaf/s2s/s2s_app/wget_cfsv2_oper_ts_e2es.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ neighb_days(){
}

print_message(){
echo "Note: if all recommended substitutes are also not available, you could try a different forecast hour from any of above dates." >> $CFSV2_LOG
echo "Note: If all recommended substitutes are also not available, you could try a different forecast hour from any of above dates." >> $CFSV2_LOG
echo "" >> $CFSV2_LOG
}

Expand Down Expand Up @@ -148,8 +148,8 @@ do
echo "---------------------------------"
echo " YEAR: forecast start year"
echo " MONTH: forecast start month [1 to 12]"
echo " CONFIG_FILE: E2E main config file for forecast with the full path of the E2E directory"
echo " DOWNLOAD: Download CFSv2 forcings (Y/N). If N only the file check will be perdormed."
echo " CONFIG_FILE: E2ES main config file for forecast with the full path of the E2ES directory"
echo " DOWNLOAD: Download CFSv2 forcings (Y/N). If N only the file check will be performed."
exit 1
;;
esac
Expand Down Expand Up @@ -233,7 +233,7 @@ ulimit -s unlimited
/bin/rm -f $CFSV2_LOG

echo " #####################################################################################" >> $CFSV2_LOG
echo " MISSING/CORRUPTED CFSv2 FILES " >> $CFSV2_LOG
echo " MISSING/INCOMPLETE CFSV2 FILES " >> $CFSV2_LOG
echo " #####################################################################################" >> $CFSV2_LOG
echo " " >> $CFSV2_LOG
echo " A replacement file is required for each missing or corrupted file. CFSv2 replacement files are saved in:" >> $CFSV2_LOG
Expand Down Expand Up @@ -369,7 +369,7 @@ fi
echo "Previous mon,days 1-2-3 :: "${prevmon}", "${day1}"-"${day2}"-"${day3}
echo " "
echo "=================================================================================================="
echo " CFSv2 file checker is running to ensure all forcings files are available and not corrupted......"
echo " CFSv2 file checker is running to ensure all forcings files are available and not corrupted......"
echo "=================================================================================================="

# Run the main loop
Expand All @@ -387,7 +387,7 @@ ret_code=$(cat $ret_code_pipe)
/bin/rm $ret_code_pipe

if [ $ret_code -gt 0 ]; then
echo "*** Missing or Corrupted CFSv2 forcing files were found ***."
echo "*** Missing or Incomplete CFSv2 forcing files were found ***."
echo "Please follow the instructions in:"
echo $CFSV2_LOG
print_message
Expand All @@ -406,9 +406,3 @@ echo " -- Done downloading CFSv2 Reforecast files -- "
exit $ret_code
# ____________________________



# https://oceanobservatories.org/knowledgebase/how-can-i-download-all-files-at-once-from-a-data-request/
# url=https://www.ncei.noaa.gov/thredds/catalog/model-cfs_refor_6h_9m_flx/2007/200711/20071127/catalog.html
# wget -r -l2 -nd -nc -np -e robots=off -A.grb2 --no-check-certificate ${url}
#
6 changes: 4 additions & 2 deletions lis/utils/usaf/s2s/s2s_modules/shared/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def job_script(s2s_configfile, jobfile, job_name, ntasks, hours, cwd, in_command
if 'discover' in platform.node() or 'borg' in platform.node():
_f.write('#SBATCH --constraint=' + cfg['SETUP']['CONSTRAINT'] + '\n')
else:
_f.write('#SBATCH --cluster-constraint=green' + '\n')
# _f.write('#SBATCH --cluster-constraint=green' + '\n')
_f.write('#SBATCH --cluster-constraint=' + cfg['SETUP']['CONSTRAINT'] + '\n')
_f.write('#SBATCH --partition=batch' + '\n')
_f.write('#SBATCH --job-name=' + job_name + '\n')
_f.write('#SBATCH --output ' + cwd + '/' + job_name + '%j.out' + '\n')
Expand Down Expand Up @@ -203,7 +204,8 @@ def job_script_lis(s2s_configfile, jobfile, job_name, cwd, hours=None, in_comman
if 'discover' in platform.node() or 'borg' in platform.node():
_f.write('#SBATCH --constraint=' + cfg['SETUP']['CONSTRAINT'] + '\n')
else:
_f.write('#SBATCH --cluster-constraint=green' + '\n')
# _f.write('#SBATCH --cluster-constraint=green' + '\n')
_f.write('#SBATCH --cluster-constraint=' + cfg['SETUP']['CONSTRAINT'] + '\n')
_f.write('#SBATCH --partition=batch' + '\n')
if datatype == 'hindcast':
_f.write('#SBATCH --ntasks=' + ntasks + '\n')
Expand Down

0 comments on commit 0c8576e

Please sign in to comment.