From 75915ab7827d7c6f2cc1926790f8ebe31ad5792a Mon Sep 17 00:00:00 2001 From: Dethinne Thomas <tdethinne@uliege.be> Date: Tue, 11 Feb 2025 14:15:18 +0000 Subject: [PATCH] Update MAR_n5 --- couplage/MAR_n5 | 57 ++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/couplage/MAR_n5 b/couplage/MAR_n5 index ea75567..710feb6 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 -- GitLab