Last change
on this file since 2239 was
2239,
checked in by Ehouarn Millour, 10 years ago
|
Reorganizing physics/dynamics interface:
- what is related to dynamics-physics interface is now in a seperate directory: dynlmdz_phy* for physics in phy*
- 1d model and related dependencies (including a couple from "dynamics", set up as symbolic links) is now in subdirectory "dyn1d" of phy*.
- "bibio" directory is now "misc" and should only contain autonomous utilities.
- "cosp" is now a subdirectory of phylmd.
EM
|
-
Property copyright set to
Name of program: LMDZ Creation date: 1984 Version: LMDZ5 License: CeCILL version 2 Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539 See the license file in the root directory
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.7 KB
|
Rev | Line | |
---|
[1605] | 1 | #!/bin/bash |
---|
| 2 | #set -xv |
---|
| 3 | |
---|
| 4 | # sanity check: do we have the required argument ? |
---|
| 5 | if (( $# < 1 )) || (( $# > 3 )) |
---|
| 6 | then |
---|
[2202] | 7 | echo "Wrong number of parameters in $0 !!!" |
---|
| 8 | echo " Usage:" |
---|
| 9 | echo " $0 [im] [jm] lm" |
---|
| 10 | echo " where im, jm and lm are the dimensions" |
---|
| 11 | exit 1 |
---|
[1605] | 12 | fi |
---|
| 13 | |
---|
[2239] | 14 | if (($1 % 8 != 0)) && (( $# == 3 )) |
---|
[2202] | 15 | then |
---|
| 16 | echo "The number of longitudes must be a multiple of 8." |
---|
| 17 | echo "See the files dyn3d/groupe.F and dyn3dmem/groupe_loc.F." |
---|
| 18 | exit 1 |
---|
| 19 | fi |
---|
| 20 | |
---|
[1605] | 21 | # build "fichnom", the relevant 'dimensions.im.jm.lm' file name |
---|
[1604] | 22 | for i in $* |
---|
[2202] | 23 | do |
---|
| 24 | list=$list.$i |
---|
[524] | 25 | done |
---|
[1146] | 26 | fichdim=dimensions${list} |
---|
[524] | 27 | |
---|
[1604] | 28 | if [ ! -f $fichdim ] |
---|
[2202] | 29 | then |
---|
[1605] | 30 | # echo "$fichdim does not exist" |
---|
[524] | 31 | |
---|
[1605] | 32 | # assign values of im, jm and lm |
---|
[1604] | 33 | if [ $# -ge 3 ] |
---|
[2202] | 34 | then |
---|
[1605] | 35 | im=$1 |
---|
| 36 | jm=$2 |
---|
| 37 | lm=$3 |
---|
| 38 | ndm=1 |
---|
| 39 | elif [ $# -ge 2 ] |
---|
[2202] | 40 | then |
---|
[1605] | 41 | im=1 |
---|
| 42 | jm=$1 |
---|
| 43 | lm=$2 |
---|
| 44 | ndm=1 |
---|
| 45 | elif [ $# -ge 1 ] |
---|
[2202] | 46 | then |
---|
[1605] | 47 | im=1 |
---|
| 48 | jm=1 |
---|
| 49 | lm=$1 |
---|
| 50 | ndm=1 |
---|
[1604] | 51 | fi |
---|
[524] | 52 | |
---|
[1605] | 53 | # since the file doesn't exist, we create it |
---|
[2202] | 54 | cat << EOF > $fichdim |
---|
[764] | 55 | !----------------------------------------------------------------------- |
---|
[794] | 56 | ! INCLUDE 'dimensions.h' |
---|
[764] | 57 | ! |
---|
[794] | 58 | ! dimensions.h contient les dimensions du modele |
---|
[764] | 59 | ! ndm est tel que iim=2**ndm |
---|
| 60 | !----------------------------------------------------------------------- |
---|
| 61 | |
---|
| 62 | INTEGER iim,jjm,llm,ndm |
---|
| 63 | |
---|
| 64 | PARAMETER (iim= $im,jjm=$jm,llm=$lm,ndm=$ndm) |
---|
| 65 | |
---|
| 66 | !----------------------------------------------------------------------- |
---|
| 67 | EOF |
---|
[794] | 68 | |
---|
[1605] | 69 | fi |
---|
| 70 | |
---|
| 71 | # remove 'old' dimensions.h file (if any) and replace it with new one |
---|
| 72 | if [ -f ../dimensions.h ] ; then |
---|
[2202] | 73 | \rm ../dimensions.h |
---|
[1605] | 74 | fi |
---|
[524] | 75 | tar cf - $fichdim | ( cd .. ; tar xf - ; mv $fichdim dimensions.h ) |
---|
[1605] | 76 | # line above is a trick to preserve time of creation of dimensions.h files |
---|
Note: See
TracBrowser
for help on using the repository browser.