|
Last change
on this file since 2113 was
135,
checked in by aslmd, 15 years ago
|
|
CHANGEMENT ARBORESCENCE ETAPE 2 -- NON COMPLET
|
-
Property svn:executable set to
*
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | nqmx=$1 |
|---|
| 2 | shift |
|---|
| 3 | for i in $* ; do |
|---|
| 4 | list=$list.$i |
|---|
| 5 | done |
|---|
| 6 | fichdim=dimensions${list}.t${nqmx} |
|---|
| 7 | |
|---|
| 8 | if [ ! -f $fichdim ] ; then |
|---|
| 9 | # si le fichier de dimensions n'existe pas, on le cree |
|---|
| 10 | |
|---|
| 11 | if [ $# -ge 3 ] ; then |
|---|
| 12 | im=$1 |
|---|
| 13 | jm=$2 |
|---|
| 14 | lm=$3 |
|---|
| 15 | n2=$1 |
|---|
| 16 | ndm=1 |
|---|
| 17 | while [ "$n2" -gt 2 ]; do |
|---|
| 18 | n2=`expr $n2 / 2` |
|---|
| 19 | ndm=`expr $ndm + 1` |
|---|
| 20 | done |
|---|
| 21 | if [ "$n2" != 2 ] ; then |
|---|
| 22 | echo le nombre de longitude doit etre une puissance de 2 |
|---|
| 23 | exit |
|---|
| 24 | fi |
|---|
| 25 | else if [ $# -ge 2 ] ; then |
|---|
| 26 | im=1 |
|---|
| 27 | jm=$1 |
|---|
| 28 | lm=$2 |
|---|
| 29 | ndm=1 |
|---|
| 30 | else if [ $# -ge 1 ] ; then |
|---|
| 31 | im=1 |
|---|
| 32 | jm=1 |
|---|
| 33 | lm=$1 |
|---|
| 34 | ndm=1 |
|---|
| 35 | else |
|---|
| 36 | echo il faut au moins une dimension |
|---|
| 37 | exit |
|---|
| 38 | fi |
|---|
| 39 | fi |
|---|
| 40 | fi |
|---|
| 41 | |
|---|
| 42 | cat << EOF > $fichdim |
|---|
| 43 | c----------------------------------------------------------------------- |
|---|
| 44 | c INCLUDE 'dimensions.h' |
|---|
| 45 | c |
|---|
| 46 | c dimensions.h continet les dimensions du modele |
|---|
| 47 | c ndm est tel que iim=2**ndm |
|---|
| 48 | c nqmx est la dimension de la variable traceur q |
|---|
| 49 | c----------------------------------------------------------------------- |
|---|
| 50 | |
|---|
| 51 | INTEGER iim,jjm,llm,ndm |
|---|
| 52 | |
|---|
| 53 | PARAMETER (iim= $im,jjm=$jm,llm=$lm,ndm=$ndm) |
|---|
| 54 | |
|---|
| 55 | integer nqmx |
|---|
| 56 | parameter (nqmx=$nqmx) |
|---|
| 57 | |
|---|
| 58 | c----------------------------------------------------------------------- |
|---|
| 59 | EOF |
|---|
| 60 | fi |
|---|
| 61 | |
|---|
| 62 | \rm ../dimensions.h |
|---|
| 63 | tar cf - $fichdim | ( cd .. ; tar xf - ; mv $fichdim dimensions.h ) |
|---|
Note: See
TracBrowser
for help on using the repository browser.