#!/bin/bash # Before downloading; the ic's should be well prepared at ECMWF's CCA. # nohup ./download_ic.sh atmos T255L62 b0ga >& download.log & # nohup ./download_ic.sh ocean ORCA1 fa9p >& download.log & # set -xuve date typ=$1 grd=$2 ver=$3 src=ec:/c3m/ic/$typ/$grd/$ver dst=/esnas/releases/ic/$typ/$grd/$ver mkdir -p $dst list=${typ}-${grd}-${ver} if [[ ! -a $list ]]; then ecaccess-file-dir $src > $list fi for l in $(cat $list); do ecaccess-file-get $src/$l $dst/$l if [[ $? -ne 0 ]]; then exit 1 fi cat $list | sed -e '1d' > ${list}.tmp mv ${list}.tmp $list done cat $list; rm $list date