123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/usr/bin/env bash
- # local_transfer.sh: Copies the EC-Earth output from the
- # remote machine to a local folder and extract it
- LOCAL_DIR=/esarchive/exp/ecearth/%EXPID%
- set -xvue
- HPCARCH=%HPCARCH%
- CHUNK=%CHUNK%
- #
- # Copy Model output
- #
- mkdir -p $LOCAL_DIR
- cd $LOCAL_DIR
- if [ ${HPCARCH} == 'cca-intel' ]
- then
- chunk=$( printf "%03d\n" ${CHUNK} )
- for m in ifs nemo
- do
- mkdir -p ${m}/${chunk}
- for f in `ecaccess-file-dir %HPCHOST%:%HPCROOTDIR%/%SDATE%/%MEMBER%/runtime/output/${m}/$chunk`
- do
- ecaccess-file-mget -force %HPCHOST%:%HPCROOTDIR%/%SDATE%/%MEMBER%/runtime/output/${m}/$chunk/$f ${m}/$chunk/
- done
- done
- else
- rsync -avz --remove-source-files --no-group --omit-dir-times --chmod=g+rwxs,o-rwx %HPCUSER%@%HPCHOST%:%HPCROOTDIR%/%SDATE%/%MEMBER%/runtime/output/ifs/??? .
- rsync -avz --remove-source-files --no-group --omit-dir-times --chmod=g+rwxs,o-rwx %HPCUSER%@%HPCHOST%:%HPCROOTDIR%/%SDATE%/%MEMBER%/runtime/output/nemo/??? .
- fi
- #
- # Extract output
- #
- #for filename in CMOR*.tar.gz
- #do
- # tar -zxvf $filename
- # rm $filename
- #done
|