- Timestamp:
- Sep 4, 2018, 4:07:26 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install/install_lmdz.sh
r3375 r3386 73 73 ioipsl=1 74 74 veget=1 75 orchidee_rev="" # ORCHIDEE revision (empty means use the provided version)75 orchidee_rev="" # default revision of ORCHIDEE 76 76 bench=1 77 77 pclinux=1 … … 99 99 ## compile_with_fcm=1 : use makelmdz_fcm (1) or makelmdz (0) 100 100 compile_with_fcm=1 101 cosp=0 ; opt_cosp="" 101 cosp=0 ; opt_cosp1="" 102 cosp=0 ; opt_cosp2="" 103 opt_cosp="" 102 104 103 105 # Check if on a Mac … … 148 150 149 151 -orchidee_rev "svn_release" : upgrade included ORCHIDEE model to 150 given svn release number ( ORCHIDEE svn password required!)152 given svn release number (default: $orchidee_rev) 151 153 (only valid for orchidee2.0 and later) 152 154 153 -cosp to compile with cosp 155 -cosp to compile with cosp(v1) 156 157 -cosp2 to compile with cosp(v2) 154 158 155 159 -nofcm to compile without fcm … … 169 173 "-d") grid_resolution=$2 ; shift ; shift ;; 170 174 "-gprof") OPT_GPROF="-pg" ; shift ;; 171 "-cosp") cosp=1 ; opt_cosp="-cosp true" ; shift ;; 175 "-cosp") cosp=1 ; opt_cosp1="-cosp true" ; shift ;; 176 "-cosp2") cosp2=1 ; opt_cosp2="-cosp2 true" ; shift ;; 172 177 "-orchidee_rev") orchidee_rev=$2 ; shift ; shift ;; 173 178 "-nofcm") compile_with_fcm=0 ; shift ;; … … 313 318 exit 314 319 fi 320 321 ## We can't compile with -cosp and -cosp2 322 if [ "$cosp" = 1 -a "$cosp2" = 1 ] ; then 323 echo "Error, you can't run with cosp1 and cosp2" 324 exit 325 fi 326 if [ "$cosp" = 1 ] ; then 327 opt_cosp="$opt_cosp1" 328 fi 329 if [ "$cosp2" = 1 ] ; then 330 opt_cosp="$opt_cosp2" 331 fi 332 333 ## if also compiling XIOS, cosp must be activate to define axis in *.xml 334 if [ "$with_xios" = "y" -a "$cosp" != "1" ] ; then 335 echo "Error, you must use -cosp option when compiling with -xios" 336 echo "You need to call Cosp in physical first step to define axis variables" 337 exit 338 fi 339 if [ "$with_xios" = "y" -a "$cosp2" != "1" ] ; then 340 echo "Error, you must use -cosp2 option when compiling with -xios" 341 echo "You need to call Cosp in physical first step to define axis variables" 342 exit 343 fi 344 315 345 if [ "$with_xios" = "y" ] ; then 316 346 opt_makelmdz_xios="-io xios" … … 687 717 export ORCHPATH=`pwd` 688 718 if [ -d tools ] ; then 689 if [ "$orchidee_rev" != "" ] ; then 690 set +e ; svn upgrade ; svn update -r $orchidee_rev ; set -e 691 fi 719 ################################################################### 720 # Pour les experts qui voudraient changer de version d'orchidee. 721 # Attention : necessite d'avoir le password pour orchidee 722 set +e ; svn upgrade ; set -e 723 if [ "$orchidee_rev" != "" ] ; then 724 set +e ; svn update -r $orchidee_rev ; set -e 725 fi 726 ################################################################### 692 727 veget_version=orchidee2.0 693 728 cd arch … … 803 838 ################################################################## 804 839 840 set +e ; svn upgrade ; set -e 805 841 if [ "$svn" = "last" ] ; then svnopt="" ; else svnopt="-r $svn" ; fi 806 if [ "$svn" != "" ] ; then s et +e ; svn upgrade ; set -e ; svn update $svnopt ; fi842 if [ "$svn" != "" ] ; then svn update $svnopt ; fi 807 843 808 844 echo '##################################################################' … … 845 881 # 846 882 cd $ORCHPATH 847 if [ -d src_parallel ] ; then883 if [ -d src_parallel -a $veget = 1 ] ; then 848 884 cd arch 849 885 sed \ … … 864 900 echo ./makeorchidee_fcm -j 8 -clean -noxios -prod -parallel $parallel -arch $arch 865 901 echo ./makeorchidee_fcm -j 8 -noxios -prod -parallel $parallel -arch $arch 866 el se902 elif [ $veget = 1 ] ; then 867 903 echo '##########################################################' 868 904 echo ' Orchidee version too old ' … … 946 982 tar xvf $bench.tar.gz 947 983 984 if [ "$cosp" = 1 -o "$cosp2" = 1 ] ; then 985 cd BENCH${grid_resolution} 986 # copier les fichiers namelist input et output our COSP 987 cp ../DefLists/cosp_input_nl.txt . 988 cp ../DefLists/cosp_output_nl.txt . 989 # Activer la cles ok_cosp pour tourner avec COSP 990 sed -e 's@ok_cosp=n@ok_cosp=y@' config.def > tmp 991 \mv -f tmp config.def 992 cd .. 993 fi 994 948 995 if [ "$with_xios" = "y" ] ; then 949 996 cd BENCH${grid_resolution} … … 955 1002 sed -e 's@"using_server" type="bool">true@"using_server" type="bool">false@' iodef.xml > tmp 956 1003 \mv -f tmp iodef.xml 1004 957 1005 # and convert all the enabled="_AUTO_" (for libIGCM) to enabled=.FALSE. 958 1006 # except for histday
Note: See TracChangeset
for help on using the changeset viewer.