ece2evt-master.sh 679 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash -ue
  2. # Usage: ece2evt-master.sh <expname> <conf_file.txt>
  3. # launch ece2evt jobs
  4. # set experiment name
  5. expname=$1
  6. # configuration
  7. conf_file=$2
  8. # set path to programs (if necessary)
  9. CDO_PATH=
  10. NCO_PATH=
  11. [ -n "$CDO_PATH" ] && PATH=${CDO_PATH}:$PATH
  12. [ -n "$NCO_PATH" ] && PATH=${NCO_PATH}:$PATH
  13. if [ ! -f $conf_file ]
  14. then
  15. echo "$conf_file doesn't exist - stopping"
  16. exit -1
  17. fi
  18. . $conf_file
  19. # process ifs output
  20. (( nprocs_ifs > 0 )) && \
  21. sbatch -N 1-1 -n $nprocs_ifs -t 1:00:00 ece2evt-ifs.sh $expname $conf_file
  22. # process nemo output
  23. (( nprocs_nemo > 0 )) && \
  24. sbatch -N 1-1 -n $nprocs_nemo -t 1:00:00 ece2evt-nemo.sh $expname $conf_file
  25. exit 0