New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
archiveFolder.sh in NEMO/branches/UKMO/AMM15_v3_6_STABLE_new_ersem/NEMOGCM/CONFIG/ORCA2_LIM_FABM_ERSEM/EXP01 – NEMO

source: NEMO/branches/UKMO/AMM15_v3_6_STABLE_new_ersem/NEMOGCM/CONFIG/ORCA2_LIM_FABM_ERSEM/EXP01/archiveFolder.sh

Last change on this file was 15480, checked in by jcastill, 3 years ago

Changes as in the git branch NEMO-FABMv1-ERSEM

  • Property svn:executable set to *
File size: 1022 bytes
Line 
1set -u
2
3folder=$1
4ARCHIVEDIR=/pmldata/euryale1/momm/ORCA2
5MERGETOOL=$HOME/local/bin/nocscombine4
6TMPDIR=/work/momm/tmp
7
8if [ -d $folder ]
9then
10  cd $folder
11  echo "Archiving $folder:"
12  mkdir -p $TMPDIR/$folder
13  rm -rf $TMPDIR/$folder/*
14  $MERGETOOL -f restart_0000.nc && nccopy -k 4 -d 9 restart.nc $TMPDIR/$folder/restart.nc && echo "   restart.nc" || echo '   restart.nc failed!!!'
15  $MERGETOOL -f restart_trc_0000.nc && nccopy -k 4 -d 9 restart_trc.nc $TMPDIR/$folder/restart_trc.nc && echo "   restart_trc.nc" || echo '   restart_trc.nc failed!!!' 
16  for file in ORCA2_1*.nc
17  do
18     nccopy -k 4 -d 9 $file $TMPDIR/$folder/$file && rm $file && echo "   " $file || echo "   " $file 'failed!!!'
19  done
20  rsync -a ocean.output.bz2 $TMPDIR/$folder
21  chmod g+rX $TMPDIR/$folder/*
22fi
23echo "Syncing to $ARCHIVEDIR"
24ssh ceto7 "mkdir -p $ARCHIVEDIR/"
25# sync with -a without preserving group and ownser:
26ssh ceto7 "rsync -rlptD --exclude=*.tmp --exclude=*.nc.* $TMPDIR/* $ARCHIVEDIR/" && rm -rf $TMPDIR/$folder
27echo "Done."
28
Note: See TracBrowser for help on using the repository browser.