Ignore:
Timestamp:
Mar 3, 2015, 2:41:13 PM (10 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes -r2186:2216 into testing branch

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/grid/dimension/makdim

    r1910 r2220  
    55if (( $# < 1 )) || (( $# > 3 ))
    66then
    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
     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
     12fi
     13
     14if (($1 % 8 != 0)) && (( $# = 3 ))
     15then
     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
    1219fi
    1320
    1421# build "fichnom", the relevant 'dimensions.im.jm.lm' file name
    1522for i in $*
    16   do
    17   list=$list.$i
     23do
     24    list=$list.$i
    1825done
    1926fichdim=dimensions${list}
    2027
    2128if [ ! -f $fichdim ]
    22     then
     29then
    2330#    echo "$fichdim does not exist"
    2431
    2532    # assign values of im, jm and lm
    2633    if [ $# -ge 3 ]
    27         then
     34    then
    2835        im=$1
    2936        jm=$2
     
    3138        ndm=1
    3239    elif [ $# -ge 2 ]
    33         then
     40    then
    3441        im=1
    3542        jm=$1
     
    3744        ndm=1
    3845    elif [ $# -ge 1 ]
    39         then
     46    then
    4047        im=1
    4148        jm=1
     
    4552
    4653# since the file doesn't exist, we create it
    47 cat << EOF > $fichdim
     54    cat << EOF > $fichdim
    4855!-----------------------------------------------------------------------
    4956!   INCLUDE 'dimensions.h'
     
    6471# remove 'old' dimensions.h file (if any) and replace it with new one
    6572if [ -f ../dimensions.h ] ; then
    66 \rm ../dimensions.h
     73    \rm ../dimensions.h
    6774fi
    6875tar cf - $fichdim | ( cd .. ; tar xf - ; mv $fichdim dimensions.h )
Note: See TracChangeset for help on using the changeset viewer.