/[MITgcm]/MITgcm_contrib/mlosch/optim_m1qn3/testbed/runscript.sh
ViewVC logotype

Annotation of /MITgcm_contrib/mlosch/optim_m1qn3/testbed/runscript.sh

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


Revision 1.3 - (hide annotations) (download) (as text)
Wed Jun 6 14:08:58 2012 UTC (13 years, 1 month ago) by mlosch
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +4 -4 lines
File MIME type: application/x-sh
sed is not sed: use a more robust formulation for replacing n=7 that also
works on BSD unix

1 mlosch 1.1 #!/bin/bash
2     #
3    
4 mlosch 1.3 # $Header: /u/gcmpack/MITgcm_contrib/mlosch/optim_m1qn3/testbed/runscript.sh,v 1.2 2012/05/07 12:09:18 mlosch Exp $
5 mlosch 1.2 # $Name: $
6    
7     m=7
8     cp driver.F driver.F_bak
9     cp offline_driver.F offline_driver.F_bak
10     cp model.F model.F_bak
11 mlosch 1.3 sed 's/parameter (n = [0-9]*/parameter (n = '$m'/' driver.F_bak >| driver.F
12     sed 's/parameter (n = [0-9]*/parameter (n = '$m'/' offline_driver.F_bak >| offline_driver.F
13     sed 's/parameter (nn=[0-9]*/parameter (nn='$m'/' model.F_bak >| model.F
14 mlosch 1.1
15     make scratch
16     make all
17    
18     ./driver
19    
20     COUNTER=0
21     while [ $COUNTER -lt 1000 ]; do
22     echo $COUNTER >| count.txt
23     echo The counter is $COUNTER
24     ./offline_driver >| output.txt
25     cat output.txt
26     stopper=`grep stoptheloop output.txt`
27     if [ "${#stopper}" -gt 0 ]; then
28     echo $stopper
29     break
30     fi
31     ./model
32     let COUNTER=COUNTER+1
33     done
34    

  ViewVC Help
Powered by ViewVC 1.1.22