Skip to content

Commit

Permalink
add_lake_20200810: Run lake-maker code in parallel using
Browse files Browse the repository at this point in the history
cfp (on WCOSS-Cray).

References ufs-community#111.
  • Loading branch information
GeorgeGayno-NOAA committed Aug 18, 2020
1 parent e877ec4 commit 411ca13
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions ush/fv3gfs_make_lake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,35 @@ fi

# create lake data for FV3 grid and save it to the orography files

tile=$tile_beg
while [ $tile -le $tile_end ]; do
outfile=oro.C${res}.tile${tile}.nc
$APRUN $exe_add_lake ${tile} ${res} ${indir} ${lake_cutoff}
if [ $machine = WCOSS_C ]; then
touch ./lake.txt
tile=$tile_beg
while [ $tile -le $tile_end ]; do
echo "$exe_add_lake ${tile} ${res} ${indir} ${lake_cutoff}" >> ./lake.txt
tile=$(( $tile + 1 ))
done
aprun -j 1 -n 6 -N 6 -d 1 -cc depth cfp ./lake.txt
err=$?
if [ $err != 0 ]; then
set +x
echo ERROR CREATING LAKE FRACTION FOR TILE $tile
echo ERROR CREATING LAKE FRACTION
exit $err
fi
echo "lake fraction is added to $outfile"
tile=$(( $tile + 1 ))
done
rm ./lake.txt
else
tile=$tile_beg
while [ $tile -le $tile_end ]; do
outfile=oro.C${res}.tile${tile}.nc
$APRUN $exe_add_lake ${tile} ${res} ${indir} ${lake_cutoff}
err=$?
if [ $err != 0 ]; then
set +x
echo ERROR CREATING LAKE FRACTION FOR TILE $tile
exit $err
fi
echo "lake fraction is added to $outfile"
tile=$(( $tile + 1 ))
done
fi

exit 0

0 comments on commit 411ca13

Please sign in to comment.