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

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

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


Revision 1.2 - (show annotations) (download) (as text)
Mon May 7 12:09:18 2012 UTC (13 years, 2 months ago) by mlosch
Branch: MAIN
Changes since 1.1: +10 -2 lines
File MIME type: application/x-sh
some shell script code to easily modify the size of the problem

1 #!/bin/bash
2 #
3
4 # $Header: /u/gcmpack/MITgcm_contrib/mlosch/optim_m1qn3/testbed/runscript.sh,v 1.1 2012/05/02 12:27:42 mlosch Exp $
5 # $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 sed /'parameter (n ='/c"\ parameter (n = $m)" driver.F_bak >| driver.F
12 sed /'parameter (n ='/c"\ parameter (n = $m)" offline_driver.F_bak >| offline_driver.F
13 sed /'parameter (nn='/c"\ parameter (nn=$m)" model.F_bak >| model.F
14
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