Warning, /verification/global_with_exf/input/prepare_run is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit deacece5 on 2021-11-09 17:35:09 UTC
f4722fe53f Mart*0001 #! /usr/bin/env bash
0002
0003 #- in order to save disc space, take *.bin files
0004 #- from this dir:
0005 fromDir="../../tutorial_global_oce_latlon/input"
0006
0007 fileList=`( cd $fromDir ; echo *.bin )`
0008
0009 #echo 'fileList=' $fileList
0010
deacece587 Oliv*0011 #- and do a symbolic link in the current directory
f4722fe53f Mart*0012 # (if the file does not already exist)
0013 if test -d $fromDir ; then
0014 lnkList='files:'
0015 for xx in $fileList
0016 do
deacece587 Oliv*0017 if test -r ${fromDir}/$xx ; then
0018 if test ! -r $xx ; then
f4722fe53f Mart*0019 lnkList=${lnkList}" "$xx
0020 ln -sf ${fromDir}/$xx .
0021 fi
0022 fi
0023 done
0024 echo ' link' $lnkList "from dir:" $fromDir
deacece587 Oliv*0025 #- SST file: copy last month (=Dec) and append to the beginning
0026 xx='lev_sst' ; inpFile=${fromDir}/${xx}.bin ; tmpFile=${xx}_startdec.tmp
0027 if test -f $inpFile -a $tmpFile -ot $inpFile ; then
0028 dd if=$inpFile bs=14400 count=1 skip=11 of=${xx}_dec.tmp 2> /dev/null
0029 cat ${xx}_dec.tmp $inpFile > $tmpFile
0030 #rm -rf ${xx}_dec.tmp
0031 echo ' + add 1 record to' $inpFile '-->' $tmpFile
0032 fi
f4722fe53f Mart*0033 else
0034 echo " Error:" $fromDir "not a directory"
0035 fi
0036