Back to home page

MITgcm

 
 

    


Warning, /verification/global_with_exf/input.yearly/prepare_run is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 0c90ef58 on 2024-05-15 16:50:06 UTC
23f0d70669 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 
0c90ef582a Jean*0007 fileList=`( cd $fromDir ; echo bathymetry.bin lev_?.bin )`
23f0d70669 Mart*0008 
                0009 #echo 'fileList=' $fileList
                0010 
0c90ef582a Jean*0011 #- and do a symbolic link in the current directory
23f0d70669 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
0c90ef582a Jean*0017     if test -r ${fromDir}/$xx ; then
                0018       if test ! -r $xx ; then
23f0d70669 Mart*0019         lnkList=${lnkList}" "$xx
                0020         ln -sf ${fromDir}/$xx .
                0021       fi
                0022     fi
                0023   done
                0024   echo ' link' $lnkList "from dir:" $fromDir
                0025 else
                0026   echo " Error:" $fromDir "not a directory"
                0027 fi
                0028 
                0029 # now link forcing files to yearly names, this is really faking it, since
                0030 # we use the same files for 1991 and 1992, but it is just a test after all
                0031 fileList="lev_sss.bin lev_sst.bin ncep_emp.bin ncep_qnet.bin trenberth_taux.bin trenberth_tauy.bin"
                0032 if test -d $fromDir ; then
                0033   lnkList='files:'
                0034   for xx in $fileList
                0035   do
0c90ef582a Jean*0036     if test -r ${fromDir}/$xx ; then
                0037       if test ! -r ${xx}_1991 ; then
23f0d70669 Mart*0038         lnkList=${lnkList}" "${xx}_1991
                0039         ln -sf ${fromDir}/$xx ./${xx}_1991
                0040       fi
0c90ef582a Jean*0041       if test ! -r ${xx}_1992 ; then
23f0d70669 Mart*0042         lnkList=${lnkList}" "${xx}_1992
                0043         ln -sf ${fromDir}/${xx} ./${xx}_1992
                0044       fi
                0045     fi
                0046   done
                0047   echo ' link' $lnkList "from dir:" $fromDir
                0048 else
                0049   echo " Error:" $fromDir "not a directory"
                0050 fi