Changeset 2220 for LMDZ5/branches/testing/libf/grid/dimension/makdim
- Timestamp:
- Mar 3, 2015, 2:41:13 PM (10 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2188-2195,2197-2202,2204-2210,2213-2216
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/grid/dimension/makdim
r1910 r2220 5 5 if (( $# < 1 )) || (( $# > 3 )) 6 6 then 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 12 fi 13 14 if (($1 % 8 != 0)) && (( $# = 3 )) 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 12 19 fi 13 20 14 21 # build "fichnom", the relevant 'dimensions.im.jm.lm' file name 15 22 for i in $* 16 17 list=$list.$i23 do 24 list=$list.$i 18 25 done 19 26 fichdim=dimensions${list} 20 27 21 28 if [ ! -f $fichdim ] 22 29 then 23 30 # echo "$fichdim does not exist" 24 31 25 32 # assign values of im, jm and lm 26 33 if [ $# -ge 3 ] 27 34 then 28 35 im=$1 29 36 jm=$2 … … 31 38 ndm=1 32 39 elif [ $# -ge 2 ] 33 40 then 34 41 im=1 35 42 jm=$1 … … 37 44 ndm=1 38 45 elif [ $# -ge 1 ] 39 46 then 40 47 im=1 41 48 jm=1 … … 45 52 46 53 # since the file doesn't exist, we create it 47 cat << EOF > $fichdim54 cat << EOF > $fichdim 48 55 !----------------------------------------------------------------------- 49 56 ! INCLUDE 'dimensions.h' … … 64 71 # remove 'old' dimensions.h file (if any) and replace it with new one 65 72 if [ -f ../dimensions.h ] ; then 66 \rm ../dimensions.h73 \rm ../dimensions.h 67 74 fi 68 75 tar cf - $fichdim | ( cd .. ; tar xf - ; mv $fichdim dimensions.h )
Note: See TracChangeset
for help on using the changeset viewer.