Changeset 2127 for BOL


Ignore:
Timestamp:
Oct 16, 2014, 3:17:58 PM (10 years ago)
Author:
Laurent Fairhead
Message:

Modifications nécessaires pour les nouvelles révisions d'ORCHIDEE


Modifications needed for new revisions of ORCHIDEE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install.sh

    r2031 r2127  
    7373## compile_with_fcm=1 : use makelmdz_fcm, possible a of version 20111103.trunk (LMDZ5/trunk rev 1578)
    7474## compile_with_fcm=0 : use makelmdz
    75 compile_with_fcm=0
     75compile_with_fcm=1
     76arch=local
     77
     78sequential=1
    7679
    7780
     
    416419  echo '########################################################'
    417420  cd $MODEL/modipsl/modeles/ORCHIDEE
     421  export ORCHPATH=`pwd`
     422  orchidee_rev=`svn info | grep '^Revision' | awk '{print $2}'`
     423  echo '########################################################'
     424  echo 'Orchidee revision: ', $orchidee_rev
     425  echo '########################################################'
    418426  echo OKpwd ; pwd
    419   if [ -d src_parallel ] ; then
    420      liste_src="parallel parameters global stomate sechiba driver"
     427  if [ $orchidee_rev -ge 2247 ] ; then
    421428     veget_version=orchidee2.0
     429       cd arch
     430      sed -e s:"%COMPILER        .*.$":"%COMPILER            $compilo":1 \
     431     -e s:"%LINK            .*.$":"%LINK                $compilo":1 \
     432     -e s:"%PROD_FFLAGS     .*.$":"%PROD_FFLAGS         $OPTIM":1 \
     433     -e s:"%DEV_FFLAGS      .*.$":"%DEV_FFLAGS          $OPTDEV":1 \
     434     -e s:"%DEBUG_FFLAGS    .*.$":"%DEBUG_FFLAGS        $OPTDEB":1 \
     435     -e s:"%BASE_FFLAGS     .*.$":"%BASE_FFLAGS         $OPTPREC":1 \
     436     arch-gfortran.fcm > arch-local.fcm
     437     echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdf\"" > arch-local.path
     438     echo "NETCDF_INCDIR=${ncdfdir}/include" >> arch-local.path
     439     echo "IOIPSL_INCDIR=$ORCHPATH/../../lib" >> arch-local.path
     440     echo "IOIPSL_LIBDIR=$ORCHPATH/../../lib" >> arch-local.path
     441     cd ../
     442# compiling ORCHIDEE sequential mode
     443     ./makeorchidee_fcm -noxios -prod -parallel none -arch local
    422444  else
    423      # Obsolete, for ORCHIDEE_beton only
    424      liste_src="parameters stomate sechiba "
    425      # A trick to compile ORCHIDEE depending on if we are using real*4 or real*8
    426      cd src_parameters ; \cp reqdprec.$real reqdprec.f90 ; cd ..
    427      veget_version=orchidee1.9
     445     if [ -d src_parallel ] ; then
     446       liste_src="parallel parameters global stomate sechiba driver"
     447       veget_version=orchidee2.0
     448     else
     449       # Obsolete, for ORCHIDEE_beton only
     450       liste_src="parameters stomate sechiba "
     451       # A trick to compile ORCHIDEE depending on if we are using real*4 or real*8
     452       cd src_parameters ; \cp reqdprec.$real reqdprec.f90 ; cd ..
     453       veget_version=orchidee1.9
     454     fi
     455     for d in $liste_src ; do src_d=src_$d
     456        echo src_d $src_d
     457        echo ls ; ls
     458        if [ ! -d $src_d ] ; then echo Problem orchidee : no $src_d ; exit ; fi
     459        cd $src_d ; \rm -f *.mod make ; make clean
     460        make ; if [ "$compilo" = "$gfortran" -o "$compilo" = "mpif90" ] ; then cp -f *.mod ../../../lib ; fi
     461        cd ..
     462     done
    428463  fi
    429   echo liste_strc $liste_src
    430 
    431   for d in $liste_src ; do src_d=src_$d
    432       echo src_d $src_d
    433       echo ls ; ls
    434       if [ ! -d $src_d ] ; then echo Problem orchidee : no $src_d ; exit ; fi
    435       cd $src_d ; \rm -f *.mod make ; make clean
    436       make ; if [ "$compilo" = "$gfortran" -o "$compilo" = "mpif90" ] ; then cp -f *.mod ../../../lib ; fi
    437       cd ..
    438   done
    439464  echo install.sh orchidee_OK `date`
    440465fi # of if [ "$veget" = 1 ]
     
    495520##################################################################
    496521echo install.sh avant_compilation `date`
    497 if [ $compile_with_fcm = 1 ] ; then makelmdz=makelmdz_fcm ; else makelmdz=makelmdz ; fi
    498 
     522if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm -arch $arch" ; else makelmdz=makelmdz ; fi
     523
     524if [ "$sequential" = 1 ] ; then
    499525./$makelmdz -d ${grid_resolution} -v $veget_version gcm
    500526echo install.sh apres_compilation `date`
     
    558584echo '##########################################################'
    559585
     586fi # fin sequential
     587
    560588if [ "$gfortran" = "gfortran44" ] ; then
    561589    echo Your gfortran compiler was too old so that the model was automatically
Note: See TracChangeset for help on using the changeset viewer.