/[lmdze]/trunk/Scripts/gcm.sh
ViewVC logotype

Contents of /trunk/Scripts/gcm.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20 - (show annotations)
Wed Oct 15 16:19:57 2008 UTC (15 years, 6 months ago) by guez
File MIME type: application/x-sh
File size: 2531 byte(s)
Deleted argument "presnivs" of "physiq", "ini_histhf", "ini_histhf3d",
"ini_histday", "ini_histins", "ini_histrac", "phytrac". Access it from
"comvert" instead.

Replaced calls to NetCDF Fortran 77 interface by calls to Fortran 90
interface or to NetCDF95.

Procedure "gr_phy_write_3d" now works with a variable of arbitrary
size in the second dimension.

Annotated use statements with "only" clause.

Replaced calls to NetCDF interface version 2 by calls to Fortran 90
interface in "guide.f90" and "read_reanalyse.f".

In "write_histrac", replaced calls to "gr_fi_ecrit" by calls to
"gr_phy_write_2d" and "gr_phy_write_3d".

1 # This is a script in Bash.
2
3 # This script collects input files necessary for the program "gcm" and
4 # runs "gcm". Run this script in the directory where you want "gcm" to run.
5 # The "ln" command does not report missing targets, so we check them first.
6
7 trap 'echo -e \\a; exit 1' ERR
8
9 # Specify directories:
10
11 REL_dir=/usr/local/guez/LMDZ/LMDZE_work/Results_etat0_lim
12 ##REL_dir=$workdir/LMDZE/Results_etat0_lim
13
14 IGCM_dir=~/Documents/Utilisation_LMDZ/Input_gcm
15 ##IGCM_dir=~
16
17 executable_dir=/usr/local/guez/LMDZ/LMDZE_work/Compil_prod_g95
18 ##executable_dir=$workdir/LMDZE/Compil_prod
19
20 RGCM_dir=/usr/local/guez/LMDZ/LMDZE_work/Results_gcm
21 ##RGCM_dir=$workdir/LMDZE/Results_gcm
22 # (used only for a restart or a comparison)
23
24 set -x
25
26 test -d $REL_dir
27 test -d $IGCM_dir
28 test -d $executable_dir
29
30 set +x
31
32 read -p \
33 "Identifier for the set of parameters (\"*.def\" files and namelists)? " \
34 igcm_id
35 read -p \
36 "Run number of \"etat0_lim\", for \"limit.nc\" and \"coefoz_LMDZ.nc\"? " \
37 numb_cr
38
39 read -p \
40 "Do you want to restart from the end of a previous \"gcm\" run? (y/[n]) " \
41 restart
42 if [[ $restart = y ]]
43 then
44 echo "Previous run number of \"gcm\" for \"start.nc\" and \"startphy.nc\ ?"
45 read prev_gcm
46 fi
47
48 set -x
49
50 my_host=`hostname`
51
52 if [[ $my_host = vierne ]]
53 then
54 # This is only useful if the program was compiled with G95:
55 G95_FPU_UNDERFLOW=${G95_FPU_UNDERFLOW:+No}
56 G95_FPU_INVALID=${G95_FPU_INVALID:+No}
57 fi
58
59 test -f $REL_dir/$numb_cr/limit.nc
60 ln -f -s $REL_dir/$numb_cr/limit.nc .
61
62 if [[ -f $REL_dir/$numb_cr/coefoz_LMDZ.nc ]]
63 then
64 ln -f -s $REL_dir/$numb_cr/coefoz_LMDZ.nc .
65 fi
66
67 if [[ $restart != y ]]
68 then
69 # Start-up files come from "etat0_lim":
70 ln -f -s $REL_dir/$numb_cr/start*.nc .
71 else
72 ln -f -s $RGCM_dir/$prev_gcm/restart.nc start.nc
73 ln -f -s $RGCM_dir/$prev_gcm/restartphy.nc startphy.nc
74 fi
75
76 rm -f *.def
77 test -f $IGCM_dir/$igcm_id/run.def
78 ln -s $IGCM_dir/$igcm_id/*.def .
79 date
80
81 if [[ $my_host = brodie ]]
82 then
83 rsh brodie01 \
84 export F_PROGINF=YES\; \
85 cd $PWD\; \
86 $executable_dir/gcm <$IGCM_dir/$igcm_id/gcm_nml.txt >gcm_out.txt \
87 2>gcm_err.txt
88 elif [[ $my_host = zahir* ]]
89 then
90 hpmcount $executable_dir/gcm \
91 <$IGCM_dir/$igcm_id/gcm_nml.txt >gcm_out.txt 2>gcm_err.txt
92 else
93 time $executable_dir/gcm \
94 <$IGCM_dir/$igcm_id/gcm_nml.txt >gcm_out.txt 2>gcm_err.txt
95 fi
96
97 echo -e '\a' # beep
98 set +x
99 read -p "Previous run number for comparison [none] ? "
100 if [[ -n $REPLY ]]
101 then
102 selective_diff.sh $RGCM_dir/$REPLY .
103 fi

Properties

Name Value
svn:eol-style native
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.21