diff --git a/couplage/MAR_n5 b/couplage/MAR_n5 index ea75567dc486fc9c0e1e21d8e267891954ae5bc0..710feb6e15146ad26d438c75704eb54a825bd8ff 100644 --- a/couplage/MAR_n5 +++ b/couplage/MAR_n5 @@ -1565,6 +1565,34 @@ BCH "fi" echo "job command file < backup: MARsim.DAT" + +# +# Backup: MAR output files +#--------------------------------------- + +BCH +BCH "#" +BCH "# CARAIB backup" +BCH "# ------------------------" + +echo "Back up the caraib files" + +#Back up of the results in .nc +BCH " for fil in \`ls *CAR*.nc\` ; do" +BCH " smput \"\${WRKdir}\" \"\$fil\" \"$STKcar\"" +BCH " done" +BCH +#Back up of the results in .res +BCH "for fil in CARAIB_couplage/results/Belgium/*${yr}*; do" +BCH " filename=\$(basename \"\$fil\")" +BCH " smput \"\${WRKdir}/CARAIB_couplage/results/Belgium/\" \"\$filename\" \"$STKcar\"" +BCH "done" +BCH +BCH " mv -f MARglf.nc CARAIB_couplage/ " +BCH +BCH " tar -czf CARAIB_couplage.tar.gz CARAIB_couplage " +BCH " smput \"\${WRKdir}/\" \"CARAIB_couplage.tar.gz\" \"$CARfil\"" + # # Launch of the next period #--------------------------------------- @@ -1611,33 +1639,6 @@ fi echo "job command file < launch of the next period" -# -# Backup: MAR output files -#--------------------------------------- - -BCH -BCH "#" -BCH "# CARAIB backup" -BCH "# ------------------------" - -echo "Back up the caraib files" - -#Back up of the results in .nc -BCH " for fil in \`ls *CAR*.nc\` ; do" -BCH " smput \"\${WRKdir}\" \"\$fil\" \"$STKcar\"" -BCH " done" -BCH -#Back up of the results in .res -BCH "for fil in CARAIB_couplage/results/Belgium/*${yr}*; do" -BCH " filename=\$(basename \"\$fil\")" -BCH " smput \"\${WRKdir}/CARAIB_couplage/results/Belgium/\" \"\$filename\" \"$STKcar\"" -BCH "done" -BCH -BCH " mv -f MARglf.nc CARAIB_couplage/ " -BCH -BCH " tar -czf CARAIB_couplage.tar.gz CARAIB_couplage " -BCH " smput \"\${WRKdir}/\" \"CARAIB_couplage.tar.gz\" \"$CARfil\"" - BCHt "Backup: MAR output files" @@ -1659,6 +1660,8 @@ type_list="MAR ICE ONE ICS" [ ${ICE_out} == "y" ] && [ ${ONE_out} == "y" ] && [ ${MAR_out} == "n" ] && type_list="ICE ONE" && BCH "rm -f \${WRKdir}/MAR.*.nc" [ ${ICE_out} == "y" ] && [ ${ONE_out} == "n" ] && [ ${MAR_out} == "n" ] && type_list="ICE" && BCH "rm -f \${WRKdir}/MAR.*.nc" && BCH "rm -f \${WRKdir}/ONE.*.nc" [ ${ICE_out} == "y" ] && [ ${ICS_out} == "y" ] && type_list="ICE ICS" +BCH "rm -f \${WRKdir}/CAR.*.nc" + for type in $type_list ; do MARout=${type}.$runnam.$yr.$tmo.${td1}-$td2${version}.nc