Changeset 3646 for BOL


Ignore:
Timestamp:
Mar 11, 2020, 4:15:59 PM (5 years ago)
Author:
Laurent Fairhead
Message:

Added option to use different physics def file in the bench
Added option to use the CMIP6 orchidee version
Safeguarded the use of the orchidee_rev option: until now if one was not on the proper branch of ORCHIDEE, one did not know which version one actually got
LF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r3645 r3646  
    8181# use the old orchidee interface without the calculation of z0h
    8282no_z0h_orc=1
     83# orchidee_version: defined to use the CMIP6 version of ORCHIDEE
     84#                   (and eventually anyother)
     85#                   values=CMIP6
     86orchidee_version=""
    8387# choose the resolution for the bench runs
    8488# grid_resolution= 32x24x11 or 48x36x19 for tests (test without ORCHIDEE)
     
    8892grid_resolution=48x36x19
    8993grid_resolution=32x32x39
     94# choose the physiq version you want to test
     95#physiq=NPv6.0.14splith
     96physiq=
    9097
    9198## parallel can take the values none/mpi/omp/mpi_omp
     
    171178    -opt_makelmdz     to call makelmdz or makelmdz_fcm with additional options
    172179
     180    -physiq    to choose which physics package to use
     181
    173182    -env_file  specify an arch.env file to overwrite the existing one
     183
     184    -orc_version      to chose some tagged ORCHIDEE version (CMIP6 only for the present)
     185
    174186........fin
    175187     exit ;;
     
    198210     "-name") MODEL=$2 ; shift ; shift ;;
    199211     "-netcdf") netcdf=$2 ; shift ; shift ;;
     212     "-physiq") physiq=$2 ; shift ; shift ;;
    200213     "-xios") with_xios="y" ; shift ;;
    201214     "-env_file") env_file=$2 ; shift ; shift ;;
    202 
     215     "-orc_version") orchidee_version=$2 ; shift ; shift ;;
    203216     *) ./install_lmdz.sh -h ; exit
    204217   esac
     
    725738if [ "$veget" = 1 ] ; then
    726739  cd $MODEL/modipsl/modeles/ORCHIDEE
     740  if [ "$orchidee_version" = "CMIP6" ] ; then
     741    set +e
     742    svn upgrade
     743    svn switch -r 5661 --accept theirs-full svn://forge.ipsl.jussieu.fr/orchidee/tags/ORCHIDEE_2_0/ORCHIDEE
     744    orchidee_rev=5661
     745    veget_version=orchidee2.0
     746    no_z0h_orc=0
     747    set -e
     748  fi
    727749  # Correctif suite debug Jean-Zay
    728750  sed -i -e 's/9010  FORMAT(A52,F17.14)/9010  FORMAT(A52,F20.14)/' src_stomate/stomate.f90
     
    741763      set +e ; svn upgrade ; set -e
    742764      if [ "$orchidee_rev" != "" ] ; then
    743          set +e ; svn update -r $orchidee_rev ; set -e
     765          # test qu'on est sur la bonne branche pour faire le update
     766          set +e
     767          svn log -r $orchidee_rev | grep  $orchidee_rev
     768          if [  $? -gt 0 ] ; then
     769              echo 'Cannot update ORCHIDEE as not on the right branch for ORCHIDEE'
     770              exit
     771          fi
     772          set -e
     773          set +e ; svn update -r $orchidee_rev ; set -e
    744774      fi
    745775      # Correctif suite debug Jean-Zay
    746776      if [ -f src_global/time.f90 ] ; then sed -i -e 's/CALL tlen2itau/\!CALL tlen2itau/' src_global/time.f90 ; fi
    747777###################################################################
    748      veget_version=orchidee2.0
     778     if [ "$veget_version" == "false" ] ; then veget_version=orchidee2.0 ; fi
    749779      cd arch
    750780      sed -e s:"%COMPILER        .*.$":"%COMPILER            $compiler":1 \
     
    772802     if [ -d src_parallel ] ; then
    773803       liste_src="parallel parameters global stomate sechiba driver"
    774        veget_version=orchidee2.0
     804       if [ "$veget_version" == "false" ] ; then veget_version=orchidee2.0 ; fi
    775805     else
    776806       # Obsolete, for ORCHIDEE_beton only
     
    778808       # A trick to compile ORCHIDEE depending on if we are using real*4 or real*8
    779809       cd src_parameters ; \cp reqdprec.$real reqdprec.f90 ; cd ..
    780        veget_version=orchidee1.9
     810       if [ "$veget_version" == "false" ] ; then veget_version=orchidee1.9 ; fi
    781811     fi
    782812     for d in $liste_src ; do src_d=src_$d
     
    10181048fi
    10191049
     1050if [ -n "$physiq" ]; then
     1051  cd BENCH${grid_resolution}
     1052  if [ -f physiq.def_${physiq} ]; then
     1053    cp physiq.def_${physiq} physiq.def
     1054    echo using physiq.def_${physiq}
     1055  else
     1056    echo using standard physiq.def
     1057  fi
     1058  cd ..
     1059else
     1060  echo using standard physiq.def
     1061fi
     1062
    10201063if [ "$with_xios" = "y" ] ; then
    10211064  cd BENCH${grid_resolution}
Note: See TracChangeset for help on using the changeset viewer.