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

Boundary condition fixes #27

Merged
merged 1 commit into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
24 changes: 23 additions & 1 deletion scripts/exrap_updatebc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,19 @@ set -A XX `ls ${RAPBC}/wrfbdy_d01.*00 | sort -r`
maxnum=${#XX[*]}
bdtime=`echo ${XX[0]} |awk 'BEGIN {FS="/"} {print $NF}'|cut -c12-`

targetsize=4657965304 # RAPv5 boundary file size
counter=1
if [[ ${currentime} -ge ${bdtime} ]]; then
echo "using latest ${XX[0]} as boundary condition "
while [[ $counter -lt 20 ]]; do
filesize=$(stat -c%s ${XX[0]})
if [ $filesize -eq $targetsize ]; then
break
else
sleep 3
counter=` expr $counter + 1 `
fi
done
cp ${XX[0]} wrfbdy_d01
else
nn=1
Expand All @@ -98,6 +109,16 @@ else
err_exit
else
echo " using old ${XX[$nn]} as boundary condition"

while [[ $counter -lt 20 ]]; do
filesize=$(stat -c%s ${XX[0]})
if [ $filesize -eq $targetsize ]; then
break
else
sleep 3
counter=` expr $counter + 1 `
fi
done
cp ${XX[$nn]} wrfbdy_d01
fi
fi
Expand All @@ -124,7 +145,8 @@ cp ${PARMrap}/rap_update_bc_parame.in parame.in
ln -s wrfinput_d01 wrfinputd1
ln -s wrfvar_output wrfvar_out
cp ${EXECrap}/rap_update_bc .
runline="aprun -n 1 -N 1 ./rap_update_bc"
#runline="aprun -n 1 -N 1 ./rap_update_bc"
runline="./rap_update_bc"
$runline >> $DATA/$pgmout 2>errfile
export err=$?; err_chk

Expand Down
22 changes: 22 additions & 0 deletions scripts/exrap_updatebc_pcyc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,20 @@ set -A XX `ls ${RAPBC}/wrfbdy_d01.*00 | sort -r`
maxnum=${#XX[*]}
bdtime=`echo ${XX[0]} |awk 'BEGIN {FS="/"} {print $NF}'|cut -c12-`

targetsize=4657965304 # RAPv5 boundary file size
counter=1
if [[ ${currentime} -ge ${bdtime} ]]; then
echo "using latest ${XX[0]} as boundary condition "

while [[ $counter -lt 20 ]]; do
filesize=$(stat -c%s ${XX[0]})
if [ $filesize -eq $targetsize ]; then
break
else
sleep 3
counter=` expr $counter + 1 `
fi
done
cp ${XX[0]} wrfbdy_d01
else
nn=1
Expand All @@ -92,6 +104,16 @@ else
err_exit
else
echo " using old ${XX[$nn]} as boundary condition"

while [[ $counter -lt 20 ]]; do
filesize=$(stat -c%s ${XX[0]})
if [ $filesize -eq $targetsize ]; then
break
else
sleep 3
counter=` expr $counter + 1 `
fi
done
cp ${XX[$nn]} wrfbdy_d01
fi
fi
Expand Down
4 changes: 2 additions & 2 deletions ush/rap_real_wpsdfi_bd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ mv rsl.error.* ${rsldir}

bdyfile=${RAPBC}/wrfbdy_d01.${start_YYYYMMDDHHMM}
echo "${bdyfile}"
cp wrfbdy_d01 ${bdyfile}
cpfs wrfbdy_d01 ${bdyfile}
cp wrfbdy_d01 wrfbdy_d01.${start_YYYYMMDDHHMM}
outputfile=${RAPBC}/wrfinput_d01_${start_year}-${start_month}-${start_day}_${start_hour}_00_00
echo "${outputfile}"
cp wrfinput_d01 ${outputfile}
cpfs wrfinput_d01 ${outputfile}
cp wrfinput_d01 wrfinput_d01_${start_year}-${start_month}-${start_day}_${start_hour}_00_00

if [ ! -r "wrfinput_d01" ]; then
Expand Down