diff --git a/betacast.sh b/betacast.sh index 013c296..e51b36b 100755 --- a/betacast.sh +++ b/betacast.sh @@ -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" diff --git a/filter/lowmemfilter.ncl b/filter/lowmemfilter.ncl index a5b49dc..7415716 100644 --- a/filter/lowmemfilter.ncl +++ b/filter/lowmemfilter.ncl @@ -152,6 +152,6 @@ end do print("done") -exit() - +status_exit(9) + end