Changeset 3386 for BOL


Ignore:
Timestamp:
Sep 4, 2018, 4:07:26 PM (6 years ago)
Author:
fhourdin
Message:

Add possibility to install with cosp(v2) and some "svn upgrade" commands to enforce being up-to-date with local svn version.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r3375 r3386  
    7373ioipsl=1
    7474veget=1
    75 orchidee_rev=""  # ORCHIDEE revision (empty means use the provided version)
     75orchidee_rev=""  # default revision of ORCHIDEE
    7676bench=1
    7777pclinux=1
     
    9999## compile_with_fcm=1 : use makelmdz_fcm (1) or makelmdz (0)
    100100compile_with_fcm=1
    101 cosp=0 ; opt_cosp=""
     101cosp=0 ; opt_cosp1=""
     102cosp=0 ; opt_cosp2=""
     103opt_cosp=""
    102104
    103105# Check if on a Mac
     
    148150
    149151    -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)
    151153               (only valid for orchidee2.0 and later)
    152154
    153     -cosp      to compile with cosp
     155    -cosp      to compile with cosp(v1)
     156 
     157    -cosp2      to compile with cosp(v2)
    154158
    155159    -nofcm     to compile without fcm
     
    169173     "-d") grid_resolution=$2 ; shift ; shift ;;
    170174     "-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 ;;
    172177     "-orchidee_rev") orchidee_rev=$2 ; shift ; shift ;;
    173178     "-nofcm") compile_with_fcm=0 ; shift ;;
     
    313318  exit
    314319fi
     320
     321## We can't compile with -cosp and -cosp2
     322if [ "$cosp" = 1 -a "$cosp2" = 1 ] ; then
     323   echo "Error, you can't run with cosp1 and cosp2"
     324   exit
     325fi
     326if [ "$cosp" = 1 ] ; then
     327   opt_cosp="$opt_cosp1"
     328fi
     329if [ "$cosp2" = 1 ] ; then
     330   opt_cosp="$opt_cosp2"
     331fi
     332
     333## if also compiling XIOS, cosp must be activate to define axis in *.xml
     334if [ "$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
     338fi
     339if [ "$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
     343fi
     344
    315345if [ "$with_xios" = "y" ] ; then
    316346  opt_makelmdz_xios="-io xios"
     
    687717  export ORCHPATH=`pwd`
    688718  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###################################################################
    692727     veget_version=orchidee2.0
    693728      cd arch
     
    803838##################################################################
    804839
     840set +e ; svn upgrade ; set -e
    805841if [ "$svn" = "last" ] ; then svnopt="" ; else svnopt="-r $svn" ; fi
    806 if [ "$svn" != "" ] ; then set +e ; svn upgrade ; set -e ; svn update $svnopt ; fi
     842if [ "$svn" != "" ] ; then svn update $svnopt ; fi
    807843
    808844echo '##################################################################'
     
    845881  #
    846882  cd $ORCHPATH
    847   if [ -d src_parallel ] ; then
     883  if [ -d src_parallel -a $veget = 1 ] ; then
    848884     cd arch
    849885     sed  \
     
    864900     echo ./makeorchidee_fcm -j 8 -clean -noxios -prod -parallel $parallel -arch $arch
    865901     echo ./makeorchidee_fcm -j 8 -noxios -prod -parallel $parallel -arch $arch
    866   else
     902  elif [ $veget = 1 ] ; then
    867903    echo '##########################################################'
    868904    echo ' Orchidee version too old                                 '
     
    946982tar xvf $bench.tar.gz
    947983
     984if [ "$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 ..
     993fi
     994
    948995if [ "$with_xios" = "y" ] ; then
    949996  cd BENCH${grid_resolution}
     
    9551002  sed -e 's@"using_server" type="bool">true@"using_server" type="bool">false@' iodef.xml > tmp
    9561003  \mv -f tmp iodef.xml
     1004
    9571005  # and convert all the enabled="_AUTO_" (for libIGCM) to enabled=.FALSE.
    9581006  # except for histday
Note: See TracChangeset for help on using the changeset viewer.