|
Last change
on this file since 3175 was
3175,
checked in by emillour, 23 months ago
|
|
Pluto PCM:
Add the old Pluto LMDZ for reference (required prior step to making
an LMDZ.PLUTO using the same framework as the other physics packages).
TB+EM
|
-
Property svn:executable set to
*
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | nqmx=$1 |
|---|
| 4 | shift |
|---|
| 5 | for i in $* ; do |
|---|
| 6 | list=$list.$i |
|---|
| 7 | done |
|---|
| 8 | |
|---|
| 9 | fichdim=dimensions${list}.t${nqmx} |
|---|
| 10 | |
|---|
| 11 | echo $fichdim |
|---|
| 12 | |
|---|
| 13 | if [ ! -f $fichdim ] ; then |
|---|
| 14 | # si le fichier de dimensions n'existe pas, on le cree |
|---|
| 15 | |
|---|
| 16 | if [ $# -ge 3 ] ; then |
|---|
| 17 | im=$1 |
|---|
| 18 | jm=$2 |
|---|
| 19 | lm=$3 |
|---|
| 20 | n2=$1 |
|---|
| 21 | ndm=1 |
|---|
| 22 | |
|---|
| 23 | # while [ "$n2" -gt 2 ]; do |
|---|
| 24 | # n2=`expr $n2 / 2` |
|---|
| 25 | # ndm=`expr $ndm + 1` |
|---|
| 26 | # done |
|---|
| 27 | # if [ "$n2" != 2 ] ; then |
|---|
| 28 | # echo le nombre de longitude doit etre une puissance de 2 |
|---|
| 29 | # exit |
|---|
| 30 | # fi |
|---|
| 31 | |
|---|
| 32 | else if [ $# -ge 2 ] ; then |
|---|
| 33 | im=1 |
|---|
| 34 | jm=$1 |
|---|
| 35 | lm=$2 |
|---|
| 36 | ndm=1 |
|---|
| 37 | else if [ $# -ge 1 ] ; then |
|---|
| 38 | im=1 |
|---|
| 39 | jm=1 |
|---|
| 40 | lm=$1 |
|---|
| 41 | ndm=1 |
|---|
| 42 | else |
|---|
| 43 | echo "you need at least one dimension!" |
|---|
| 44 | exit |
|---|
| 45 | fi |
|---|
| 46 | fi |
|---|
| 47 | fi |
|---|
| 48 | |
|---|
| 49 | cat << EOF > $fichdim |
|---|
| 50 | !----------------------------------------------------------------------- |
|---|
| 51 | ! INCLUDE 'dimensions.h' |
|---|
| 52 | ! |
|---|
| 53 | ! dimensions.h contient les dimensions du modele |
|---|
| 54 | ! ndm est tel que iim=2**ndm |
|---|
| 55 | ! nqmx est la dimension de la variable traceur q |
|---|
| 56 | !----------------------------------------------------------------------- |
|---|
| 57 | |
|---|
| 58 | INTEGER, parameter :: iim= $im |
|---|
| 59 | INTEGER, parameter :: jjm=$jm |
|---|
| 60 | INTEGER, parameter :: llm=$lm |
|---|
| 61 | INTEGER, parameter :: ndm=$ndm |
|---|
| 62 | |
|---|
| 63 | integer, parameter :: nqmx=$nqmx |
|---|
| 64 | |
|---|
| 65 | !----------------------------------------------------------------------- |
|---|
| 66 | EOF |
|---|
| 67 | |
|---|
| 68 | else |
|---|
| 69 | echo "dimensions file already exists!" |
|---|
| 70 | fi |
|---|
| 71 | |
|---|
| 72 | \rm ../dimensions.h |
|---|
| 73 | tar cf - $fichdim | ( cd .. ; tar xf - ; mv $fichdim dimensions.h ) |
|---|
Note: See
TracBrowser
for help on using the repository browser.