/[MITgcm]/MITgcm/verification/cpl_aim+ocn/input_ocn/prepare_run
ViewVC logotype

Diff of /MITgcm/verification/cpl_aim+ocn/input_ocn/prepare_run

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by jmc, Mon Jul 17 01:27:30 2006 UTC revision 1.2 by jmc, Fri Jan 2 01:03:25 2009 UTC
# Line 1  Line 1 
1  #! /bin/sh  #! /usr/bin/env bash
2    
3  #-- Import input files from experiment global_ocean.cs32x15  #  $Header$
4  #-- Import grid-files from experiment tutorial_held_suarez_cs  #  $Name$
5  #   this reduce the disk space required when downloading this set-up  
6    #- in order to save disc space, from this dir:
7  dirOcn=`pwd`  fromDir="../../global_ocean.cs32x15/input"
8  impDir='../../global_ocean.cs32x15/input'  #  link files:
9    fileList=`(cd $fromDir ; ls *.bin)`
10  echo 'Import Input files from dir:' $impDir  
11  cd $impDir  #- and do a symbolic link in the current directory
12    #   (if the file does not already exist)
13  listF=`ls *.bin`  if test -d $fromDir ; then
14  for xx in $listF    lnkList='files:'
15  do    for xx in $fileList
16   if test -f $dirOcn/$xx    do
17   then echo 'file' $xx ' already exists'      if test -r ${fromDir}/$xx ; then
18   else echo ' cp ' $xx        if test ! -r $xx ; then
19    cp -p -i $xx $dirOcn          lnkList=${lnkList}" "$xx
20   fi          ln -sf ${fromDir}/$xx .
21  done        fi
22        fi
23      done
24      echo ' link' $lnkList "from dir:" $fromDir
25    else
26      echo " Error:" $fromDir "not a directory"
27    fi
28    
29    #- in order to save disc space, from this dir:
30    fromDir='../../tutorial_held_suarez_cs/input'
31    #  link files:
32    fileList=`(cd $fromDir ; ls *.face00?.bin)`
33    
34    #- and do a symbolic link in the current directory
35    #   (if the file does not already exist)
36    if test -d $fromDir ; then
37      lnkList='files:'
38      for xx in $fileList
39      do
40        if test -r ${fromDir}/$xx ; then
41          if test ! -r $xx ; then
42            lnkList=${lnkList}" "$xx
43            ln -sf ${fromDir}/$xx .
44          fi
45        fi
46      done
47      echo ' link' $lnkList "from dir:" $fromDir
48    else
49      echo " Error:" $fromDir "not a directory"
50    fi
51  echo ''  echo ''
   
 cd $dirOcn  
   
 impDir='../../tutorial_held_suarez_cs/input'  
   
 echo 'Import Grid-files from dir:' $impDir  
 cd $impDir  
   
 listF=`ls *.face00?.bin`  
 for xx in $listF  
 do  
  if test -f $dirOcn/$xx  
  then echo 'file' $xx ' already exists'  
  else echo ' cp ' $xx  
   cp -p -i $xx $dirOcn  
  fi  
 done  
 echo ''  
   
 cd $dirOcn  

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22