source: LMDZ5/trunk/libf/grid/dimension/makdim @ 1604

Last change on this file since 1604 was 1604, checked in by lguez, 12 years ago

Removed two "fi" with no corresponding "if" in "makdim".

In procedure "coefkz", when calculating cloud fraction "zfr", "zq" can
be zero at high altitude. Avoid division by zero, set "zfr" to 0 when
"zq" is 0.

In "physiq", allocatable arrays "tabijgcm", "longcm", "latgcm",
"igcm", "jgcm" cannot be arguments of "phys_output_open" if they have
not been allocated. Allocate them with zero size when
'npCFMIP_param.data' cannot be opened.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1for i in $*
2  do
3  list=$list.$i
4done
5fichdim=dimensions${list}
6
7if [ ! -f $fichdim ]
8    then
9# si le fichier de dimensions n'existe pas, on le cree
10
11    if [ $# -ge 3 ]
12        then
13        im=$1
14        jm=$2
15        lm=$3
16        n2=$1
17        ndm=1
18
19# Le test suivant est commente car il est inutile avec le nouveau
20# filtre filtrez. Attention avec le "vieux" filtre (F. Forget,11/1994)
21#
22#     while [ "$n2" -gt 2 ]; do
23#       n2=`expr $n2 / 2`
24#       ndm=`expr $ndm + 1`
25#       echo $n2
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
33    else if [ $# -ge 2 ]
34        then
35        im=1
36        jm=$1
37        lm=$2
38        ndm=1
39    else if [ $# -ge 1 ]
40        then
41        im=1
42        jm=1
43        lm=$1
44        ndm=1
45    else
46        echo il faut au moins une dimension
47        exit
48    fi
49fi
50
51cat << EOF > $fichdim
52!-----------------------------------------------------------------------
53!   INCLUDE 'dimensions.h'
54!
55!   dimensions.h contient les dimensions du modele
56!   ndm est tel que iim=2**ndm
57!-----------------------------------------------------------------------
58
59      INTEGER iim,jjm,llm,ndm
60
61      PARAMETER (iim= $im,jjm=$jm,llm=$lm,ndm=$ndm)
62
63!-----------------------------------------------------------------------
64EOF
65
66\rm ../dimensions.h
67tar cf - $fichdim | ( cd .. ; tar xf - ; mv $fichdim dimensions.h )
Note: See TracBrowser for help on using the repository browser.