Skip to content

Commit

Permalink
add exit_status to filter NCL code
Browse files Browse the repository at this point in the history
  • Loading branch information
zarzycki committed Jan 10, 2020
1 parent b1a8392 commit 32639bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions betacast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,14 @@ if $doFilter ; then
echo "Running filter"
cp ${sePreFilterIC} ${sePostFilterIC}
filtfile_name=${casename}.cam.h0.$yearstr-$monthstr-$daystr-$cyclestrsec.nc
ncl lowmemfilter.ncl \
(set -x; ncl lowmemfilter.ncl \
endhour=${filterHourLength} tcut=${filtTcut} \
'filtfile_name = "'${path_to_rundir}'/'${filtfile_name}'"' \
'writefile_name = "'${sePostFilterIC}'"'
'writefile_name = "'${sePostFilterIC}'"' )
if [[ $? -ne 9 ]] ; then
echo "NCL exited with non-9 error code"
exit 240
fi
fi # debug

echo "done with filter, removing filter files"
Expand Down
4 changes: 2 additions & 2 deletions filter/lowmemfilter.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ end do

print("done")

exit()
status_exit(9)

end

0 comments on commit 32639bf

Please sign in to comment.