Changeset 4218 for BOL


Ignore:
Timestamp:
Jul 20, 2022, 5:54:16 PM (23 months ago)
Author:
lguez
Message:

Limit the length of lines

For readability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz_new.sh

    r4217 r4218  
    1919#
    2020# The sources of the models can be found in the "modeles" directory.
    21 # In the present case, LMDZ, ORCHIDEE, and IOIPSL or XIOS (handling of input-outputs
    22 # using the NetCDF library).
     21# In the present case, LMDZ, ORCHIDEE, and IOIPSL or XIOS (handling of
     22# input-outputs using the NetCDF library).
    2323#
    2424# The script downloads various source files (including a version of NetCDF)
     
    5656        save_pub_locally=0
    5757        if [ $save_pub_locally = 1 ] ; then # saving wget files on ~/LMDZ/pub
    58             dir=~/LMDZ/pub/`dirname $1` ; mkdir -p $dir ; cp -r `basename $1` $dir
     58            dir=~/LMDZ/pub/`dirname $1` ; mkdir -p $dir
     59            cp -r `basename $1` $dir
    5960        fi
    6061    fi
     
    197198        "-compiler") compiler=$2
    198199                     case $compiler in
    199                          "gfortran"|"ifort"|"pgf90") compiler=$2 ; shift ; shift ;;
    200                          *) echo "Only gfortran , ifort or pgf90 for the compiler option" ; exit
     200                         "gfortran"|"ifort"|"pgf90") compiler=$2 ; shift
     201                                                     shift ;;
     202                         *) echo "Only gfortran , ifort or pgf90 for the " \
     203                                 "compiler option"
     204                            exit
    201205                     esac ;;
    202206        "-d") grid_resolution=$2 ; shift ; shift ;;
     
    210214        "-SCM") SCM=1 ; shift ;;
    211215        "-opt_makelmdz") OPT_MAKELMDZ="$2" ; shift ; shift ;;
    212         "-rrtm") rrtm="$2" ; if [ "$2" = "false" ] ; then rad="oldrad" ; else rad="rrtm" ; fi ; shift ; shift ;;
     216        "-rrtm") rrtm="$2"
     217                 if [ "$2" = "false" ] ; then
     218                     rad="oldrad"
     219                 else
     220                     rad="rrtm"
     221                 fi
     222                 shift ; shift ;;
    213223        "-rad") rad=$2
    214224                case $rad in
     
    218228        "-parallel") parallel=$2
    219229                     case $parallel in
    220                          "none"|"mpi"|"omp"|"mpi_omp") parallel=$2 ; shift ; shift ;;
    221                          *) echo Only none mpi omp mpi_omp for the parallel option ; exit
     230                         "none"|"mpi"|"omp"|"mpi_omp") parallel=$2 ; shift
     231                                                       shift ;;
     232                         *) echo Only none mpi omp mpi_omp for the parallel \
     233                                 option
     234                            exit
    222235                     esac ;;
    223236        "-bench") bench=$2 ; shift ; shift ;;
     
    233246done
    234247
    235 # Option de compilation du rayonnement : depend de $mysvn ><= r4185, sera donc definie plus bas
     248# Option de compilation du rayonnement : depend de $mysvn ><= r4185,
     249# sera donc definie plus bas
     250
    236251#opt_rad=""
    237252#case $rad in
     
    261276if [ "$veget" = 'NONE' ] ; then
    262277    suff_orc=''
    263     #For use with tutorial, orchidee_rev is also defined (will be written in surface_env at the end of the script)
     278    #For use with tutorial, orchidee_rev is also defined (will be
     279    #written in surface_env at the end of the script)
    264280    orchidee_rev=''
    265281else
     
    268284
    269285
    270 if [ $parallel = none ] ; then sequential=1; suff_exe='_seq' ; else sequential=0; suff_exe='_para_mem' ; fi
     286if [ $parallel = none ] ; then
     287    sequential=1; suff_exe='_seq'
     288else
     289    sequential=0; suff_exe='_para_mem'
     290fi
    271291
    272292#Chemin pour placer le modele
     
    418438BASE_LD="$OPT_GPROF"
    419439OPTPREC="$OPT_GPROF"
    420 ARFLAGS="rs" ; if [ -f /etc/issue ] ; then if [ "`grep -i ubuntu /etc/issue`" != "" ] ; then if [ "`grep -i ubuntu /etc/issue | awk ' { print $2 } ' | cut -d. -f1`" -ge 16 ] ; then ARFLAGS="rU" ; fi ; fi ; fi
     440ARFLAGS="rs"
     441if [ -f /etc/issue ] ; then
     442    if [ "`grep -i ubuntu /etc/issue`" != "" ] ; then
     443        if [ "`grep -i ubuntu /etc/issue | awk ' { print $2 } ' | cut -d. -f1`" -ge 16 ]
     444        then
     445            ARFLAGS="rU"
     446        fi
     447    fi
     448fi
    421449
    422450
     
    428456    fmod='I '
    429457    OPTPREC="$OPTPREC -cpp -ffree-line-length-0"
    430     if [ $real = r8 ] ; then OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE" ; fi
     458    if [ $real = r8 ] ; then
     459        OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE"
     460    fi
    431461    export F90FLAGS=" -ffree-form $OPTIMNC"
    432462    export FFLAGS=" $OPTIMNC"
     
    441471    BASE_LD="$BASE_LD -lblas"
    442472    fmod='I '
    443     if [ $real = r8 ] ; then OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE -fcray-pointer" ; fi
     473    if [ $real = r8 ] ; then
     474        OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE -fcray-pointer"
     475    fi
    444476    export F90FLAGS=" -ffree-form $OPTIMNC"
    445477    export FFLAGS=" $OPTIMNC"
     
    603635        chmod u=rwx install_netcdf4_hdf5.bash
    604636        if [ "$compiler" = "gfortran" ] ; then
    605             ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC gcc -FC gfortran -CXX g++ -MPI $root_mpi  > $netcdflog 2>&1
     637            ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC gcc \
     638                        -FC gfortran -CXX g++ -MPI $root_mpi  > $netcdflog 2>&1
    606639        elif [ "$compiler" = "ifort" ] ; then
    607             ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC icc -FC ifort -CXX icpc -MPI $root_mpi  > $netcdflog 2>&1
     640            ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC icc \
     641                          -FC ifort -CXX icpc -MPI $root_mpi  > $netcdflog 2>&1
    608642        elif [ "$compiler" = "pgf90" ] ; then
    609             ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC pgcc -FC pgf90 -CXX pgCC -MPI $root_mpi  > $netcdflog 2>&1
     643            ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC pgcc \
     644                          -FC pgf90 -CXX pgCC -MPI $root_mpi  > $netcdflog 2>&1
    610645        else
    611646            echo "unexpected compiler $compiler" ; exit
     
    633668then
    634669    if [ $ioipsl = 1 ] ; then
    635         #=========================================================================
     670        #=====================================================================
    636671        echo OK ioipsl=$ioipsl
    637672        echo '##########################################################'
     
    645680        cd util
    646681        cp AA_make.gdef AA_make.orig
    647         F_C="$compiler -c " ; if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] ; then F_C="$compiler -c -cpp " ; fi
     682        F_C="$compiler -c "
     683        if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ]
     684        then
     685            F_C="$compiler -c -cpp "
     686        fi
    648687        if [ "$compiler" = "pgf90" ] ; then F_C="$compiler -c -Mpreprocess" ; fi
    649688        sed -e 's/^\#.*.g95.*.\#.*.$/\#/' AA_make.gdef > tmp
    650         sed -e "s:F_L = g95:F_L = $compiler:" -e "s:F_C = g95 -c -cpp:F_C = $F_C": \
     689        sed -e "s:F_L = g95:F_L = $compiler:" \
     690            -e "s:F_C = g95 -c -cpp:F_C = $F_C": \
    651691            -e 's/g95.*.w_w.*.(F_D)/g95      w_w = '"$OPTIMGCM"'/' \
    652692            -e 's:g95.*.NCDF_INC.*.$:g95      NCDF_INC= '"$ncdfdir"'/include:' \
     
    669709        else # bash
    670710            sed -e s:/bin/ksh:/bin/bash:g ins_make > ins_make.bash
    671             if [ "`grep jeanzay AA_make.gdef`" = "" ] ; then # Bidouille pour compiler sur ada des vieux modipsl.tar
     711            if [ "`grep jeanzay AA_make.gdef`" = "" ] ; then
     712                # Bidouille pour compiler sur ada des vieux modipsl.tar
    672713                echo 'Warning jean-zay not in AA_make.gdef'
    673714                echo 'Think about updating'
     
    697738        $make clean
    698739        $make > $ioipsllog 2>&1
    699         if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] ; then # copy module files to lib
     740        if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] ; then
     741            # copy module files to lib
    700742            cp -f *.mod ../../../lib
    701743        fi
     
    752794    chmod u=rwx install_xios.bash
    753795    if [ ${hostname:0:5} = jean- ] ; then
    754         svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 XIOS
     796        svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 \
     797            XIOS
    755798        cd XIOS/arch
    756799        svn update
    757800        cd ..
    758         echo "Compiling XIOS, start" `date` "(it takes about 20 min on Jean-Zay)"
     801        echo "Compiling XIOS, start" `date` \
     802             "(it takes about 20 min on Jean-Zay)"
    759803        echo "log file: $xioslog"
    760804        ./make_xios --prod --arch $arch --job 4 > xios.log 2>&1
     
    782826        orchidee_rev=$veget
    783827        if [ $veget -lt 4465 ] ; then
    784             echo 'Stopping, ORCHIDEE version too old, script needs work on the CPP flags to pass to makelmdz'
     828            echo 'Stopping, ORCHIDEE version too old, script needs work on ' \
     829                 'the CPP flags to pass to makelmdz'
    785830            exit 1
    786831        fi
     
    789834        orcbranch=`svn log -v -q svn://forge.ipsl.jussieu.fr/orchidee/ -r $veget |grep ORCHIDEE |head -1| sed -e 's:ORCHIDEE/.*$:ORCHIDEE:' | awk '{print $2}'`
    790835        # switch to that branch
    791         echo IF YOU INSTALL ORCHIDEE THE VERY FIRST TIME, ASK for PASSWORD at orchidee-help@listes.ipsl.fr
    792         svn switch -r $veget --accept theirs-full svn://forge.ipsl.jussieu.fr/orchidee/$orcbranch
     836        echo IF YOU INSTALL ORCHIDEE THE VERY FIRST TIME, ASK for PASSWORD at \
     837             orchidee-help@listes.ipsl.fr
     838        svn switch -r $veget --accept theirs-full \
     839            svn://forge.ipsl.jussieu.fr/orchidee/$orcbranch
    793840        svn log -r $veget | grep  $veget
    794841        if [  $? -gt 0 ] ; then
    795             echo 'Cannot update ORCHIDEE as not on the right branch for ORCHIDEE'
     842            echo 'Cannot update ORCHIDEE as not on the right branch for ' \
     843                 'ORCHIDEE'
    796844            exit
    797845        fi
     
    800848    fi
    801849    # Correctif suite debug Jean-Zay
    802     sed -i -e 's/9010  FORMAT(A52,F17.14)/9010  FORMAT(A52,F20.14)/' src_stomate/stomate.f90
     850    sed -i -e 's/9010  FORMAT(A52,F17.14)/9010  FORMAT(A52,F20.14)/' \
     851        src_stomate/stomate.f90
    803852    opt_orc="-prod" ; if [ "$optim" = "-debug" ] ; then opt_orc="-debug" ; fi
    804853
     
    821870
    822871        # Correctif suite debug Jean-Zay
    823         if [ -f src_global/time.f90 ] ; then sed -i -e 's/CALL tlen2itau/\!CALL tlen2itau/' src_global/time.f90 ; fi
     872        if [ -f src_global/time.f90 ] ; then
     873            sed -i -e 's/CALL tlen2itau/\!CALL tlen2itau/' src_global/time.f90
     874        fi
    824875        ###################################################################
    825         if [ "$veget_version" == "false" ] ; then veget_version=orchidee2.0 ; fi
     876        if [ "$veget_version" == "false" ] ; then
     877            veget_version=orchidee2.0
     878        fi
    826879        cd arch
    827880        sed -e s:"%COMPILER        .*.$":"%COMPILER            $compiler":1 \
     
    835888            -e s:"%ARFLAGS         .*.$":"%ARFLAGS             $ARFLAGS":1 \
    836889            arch-gfortran.fcm > arch-local.fcm
    837         echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" > arch-local.path
     890        echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" \
     891             > arch-local.path
    838892        echo "NETCDF_INCDIR=${ncdfdir}/include" >> arch-local.path
    839893        echo "IOIPSL_INCDIR=$ORCHPATH/../../lib" >> arch-local.path
     
    843897        cd ../
    844898
    845         echo ./makeorchidee_fcm -j $xios_orchid $opt_orc -parallel none -arch $arch
    846         ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel none -arch $arch > $orchideelog 2>&1
     899        echo ./makeorchidee_fcm -j $xios_orchid $opt_orc -parallel none \
     900             -arch $arch
     901        ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel none \
     902                           -arch $arch > $orchideelog 2>&1
    847903        pwd
    848904    else # of "if [ -d tools ]"
    849905        if [ -d src_parallel ] ; then
    850906            liste_src="parallel parameters global stomate sechiba driver"
    851             if [ "$veget_version" == "false" ] ; then veget_version=orchidee2.0 ; fi
    852         fi
    853         for d in $liste_src ; do src_d=src_$d
    854                                  echo src_d $src_d
    855                                  echo ls ; ls
    856                                  if [ ! -d $src_d ] ; then echo Problem orchidee : no $src_d ; exit ; fi
    857                                  cd $src_d ; \rm -f *.mod make ; $make clean
    858                                  $make > $orchideelog 2>&1 ; if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] ; then cp -f *.mod ../../../lib ; fi
    859                                  cd ..
     907            if [ "$veget_version" == "false" ] ; then
     908                veget_version=orchidee2.0
     909            fi
     910        fi
     911        for d in $liste_src ; do
     912            src_d=src_$d
     913            echo src_d $src_d
     914            echo ls ; ls
     915            if [ ! -d $src_d ] ; then
     916                echo Problem orchidee : no $src_d ; exit
     917            fi
     918            cd $src_d ; \rm -f *.mod make ; $make clean
     919            $make > $orchideelog 2>&1
     920            if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] ; then
     921                cp -f *.mod ../../../lib
     922            fi
     923            cd ..
    860924        done
    861925    fi # of "if [ -d tools ]"
     
    887951    cd arch
    888952    # arch-local.path file
    889     echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" > arch-local.path
     953    echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" \
     954         > arch-local.path
    890955    echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path
    891956    echo 'NETCDF95_INCDIR=$LMDGCM/../../include' >> arch-local.path
     
    9381003    set +e ; svn info | grep -q 'http:'
    9391004    if [ $? = 0 ] ; then
    940         svn switch --relocate http://svn.lmd.jussieu.fr/LMDZ https://svn.lmd.jussieu.fr/LMDZ
     1005        svn switch --relocate http://svn.lmd.jussieu.fr/LMDZ \
     1006            https://svn.lmd.jussieu.fr/LMDZ
    9411007    fi
    9421008    svn update $svnopt
     
    9451011
    9461012##################################################################
    947 # Retrieve the final svn release number, and adjust compilation options accordingly
     1013# Retrieve the final svn release number, and adjust compilation
     1014# options accordingly
    9481015mysvn=`svnversion . | egrep -o "[0-9]+"`
    9491016
     
    9531020case $rad in
    9541021    oldrad) iflag_rrtm=0 ; NSW=2 ; opt_rad="" ;;
    955     rrtm)   iflag_rrtm=1 ; NSW=6 ; if [ $mysvn -le 4185 ] ; then opt_rad="-rrtm true" ; else opt_rad="-rad rrtm" ; fi ;;
     1022    rrtm)   iflag_rrtm=1 ; NSW=6
     1023            if [ $mysvn -le 4185 ] ; then
     1024                opt_rad="-rrtm true"
     1025            else
     1026                opt_rad="-rad rrtm"
     1027            fi ;;
    9561028    ecrad)  iflag_rrtm=2 ; NSW=6 ; opt_rad="-rad ecrad" ;;
    9571029    *) echo Only oldrad rrtm ecrad for rad option ; exit
    9581030esac
    9591031
    960 if [ $mysvn -le 4185 -a $rad = "ecrad" ] ; then echo "ecrad only available for LMDZ rev starting with 4186 " ; exit ; fi
     1032if [ $mysvn -le 4185 -a $rad = "ecrad" ] ; then
     1033    echo "ecrad only available for LMDZ rev starting with 4186 " ; exit
     1034fi
    9611035
    9621036##################################################################
     
    9841058echo '##################################################################'
    9851059
    986 if [ "$env_file" != "" ] ; then mv arch/arch-${arch}.env arch/arch-${arch}.orig ; \cp -f $env_file arch/arch-${arch}.env ; fi
    987 
    988 if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm $optim -arch $arch -j 8 " ; else makelmdz="makelmdz $optim -arch $arch" ; fi
     1060if [ "$env_file" != "" ] ; then
     1061    mv arch/arch-${arch}.env arch/arch-${arch}.orig
     1062    \cp -f $env_file arch/arch-${arch}.env
     1063fi
     1064
     1065if [ $compile_with_fcm = 1 ] ; then
     1066    makelmdz="makelmdz_fcm $optim -arch $arch -j 8 "
     1067else
     1068    makelmdz="makelmdz $optim -arch $arch"
     1069fi
    9891070
    9901071# sequential compilation
    9911072if [ "$sequential" = 1 ] ; then
    9921073    echo Sequential compilation command, saved in compile.sh:
    993     echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp -d ${grid_resolution} -v $veget_version gcm "
    994     echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp -d ${grid_resolution} -v $veget_version gcm " > compile.sh
     1074    echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp " \
     1075         "-d ${grid_resolution} -v $veget_version gcm "
     1076    echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp " \
     1077         "-d ${grid_resolution} -v $veget_version gcm " > compile.sh
    9951078    chmod +x ./compile.sh
    9961079    if [ $bench = 1 ] ; then
     
    10311114        echo Compiling ORCHIDEE in parallel mode `date`
    10321115        echo logfile $orchideelog
    1033         echo "NOTE : to recompile it when necessary, use ./compile_orc.sh in modipsl/modeles/ORCHIDEE"
    1034         echo ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc -parallel $parallel -arch $arch > compile_orc.sh
    1035         echo ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel $parallel -arch $arch >> compile_orc.sh
    1036         echo echo Now you must also recompile LMDZ, by running ./compile.sh in modeles/LMDZ >> compile_orc.sh
     1116        echo "NOTE : to recompile it when necessary, use ./compile_orc.sh " \
     1117             "in modipsl/modeles/ORCHIDEE"
     1118        echo ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc \
     1119             -parallel $parallel -arch $arch > compile_orc.sh
     1120        echo ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc \
     1121             -parallel $parallel -arch $arch >> compile_orc.sh
     1122        echo echo Now you must also recompile LMDZ, by running ./compile.sh \
     1123             in modeles/LMDZ >> compile_orc.sh
    10371124        chmod u+x compile_orc.sh
    1038         ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc -parallel $parallel -arch $arch > $orchideelog 2>&1
    1039         ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel $parallel -arch $arch >> $orchideelog 2>&1
     1125        ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc \
     1126                           -parallel $parallel -arch $arch > $orchideelog 2>&1
     1127        ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel $parallel \
     1128                           -arch $arch >> $orchideelog 2>&1
    10401129        echo End of ORCHIDEE compilation in parallel mode `date`
    10411130    elif [ $veget != 'NONE' ] ; then
     
    10671156    if [ ${hostname:0:5} = jean- -a "$cosp" = "v2" ] ; then
    10681157
    1069         echo LMDZ compilation command in parallel mode, saved in compile.sh, is :
    1070         echo "(ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige ! )"
    1071         # ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige
    1072         echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
    1073         echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm
     1158        echo LMDZ compilation command in parallel mode, saved in compile.sh, \
     1159             is :
     1160        echo "(ATTENTION le probleme de cospv2 sur jean-zay en mode prod " \
     1161             "n est pas corrige ! )"
     1162        # ATTENTION le probleme de cospv2 sur jean-zay en mode prod n
     1163        # est pas corrige
     1164        echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp \
     1165             $opt_makelmdz_xios -d \$resol -v $veget_version -mem \
     1166             -parallel $parallel gcm >> compile.sh
     1167        echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp \
     1168             $opt_makelmdz_xios -d \$resol -v $veget_version -mem \
     1169             -parallel $parallel gcm
    10741170    else
    1075         echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
    1076         echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm
     1171        echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp \
     1172             $opt_makelmdz_xios -d \$resol -v $veget_version -mem \
     1173             -parallel $parallel gcm >> compile.sh
     1174        echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp \
     1175             $opt_makelmdz_xios -d \$resol -v $veget_version -mem \
     1176             -parallel $parallel gcm
    10771177    fi
    10781178    chmod +x ./compile.sh
    10791179
    10801180    if [ $bench = 1 ] ; then
    1081         echo Compiling LMDZ in parallel mode `date`,  LMDZ log file: $lmdzlog ; ./compile.sh > $lmdzlog 2>&1
     1181        echo Compiling LMDZ in parallel mode `date`,  LMDZ log file: $lmdzlog
     1182        ./compile.sh > $lmdzlog 2>&1
    10821183    fi
    10831184
     
    10941195gcm=""
    10951196#for exe in gcm.e bin/gcm_${grid_resolution}_phylmd_seq_orch.e bin/gcm_${grid_resolution}_phylmd_seq.e bin/gcm_${grid_resolution}_phylmd_para_mem_orch.e bin/gcm_${grid_resolution}_phylmd_para_mem.e  ; do
    1096 for exe in gcm.e bin/gcm_${grid_resolution}_phylmd${suff_exe}${suff_orc}.e ; do   if [ -f $exe ] ; then gcm=$exe ; fi
     1197for exe in gcm.e bin/gcm_${grid_resolution}_phylmd${suff_exe}${suff_orc}.e
     1198do
     1199    if [ -f $exe ] ; then gcm=$exe ; fi
    10971200done
    10981201
     
    11161219
    11171220if [ $bench = tuto ] ; then
    1118     myget Training/tutorial.tar ; tar xvf tutorial.tar ; cd TUTORIAL ; ./init.sh
     1221    myget Training/tutorial.tar ; tar xvf tutorial.tar ; cd TUTORIAL
     1222    ./init.sh
    11191223
    11201224elif [[ $bench = 1 && ! -d BENCH${grid_resolution} ]] ; then
     
    11681272        cp ../DefLists/file_def_hist*xml .
    11691273        # adapt iodef.xml to use attached mode
    1170         sed -e 's@"using_server" type="bool">true@"using_server" type="bool">false@' iodef.xml > tmp
     1274        sed -e 's@"using_server" type="bool">true@"using_server" type="bool">false@' \
     1275            iodef.xml > tmp
    11711276        \mv -f tmp iodef.xml
    11721277
     
    11761281        do
    11771282            if [ "$histfile" = "file_def_histday_lmdz.xml" ] ; then
    1178                 sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".TRUE."@' $histfile > tmp ; \mv -f tmp $histfile
    1179                 sed -e 's@output_level="_AUTO_"@output_level="5"@' $histfile > tmp ; \mv -f tmp $histfile
    1180                 sed -e 's@compression_level="2"@compression_level="0"@' $histfile > tmp ; \mv -f tmp $histfile
     1283                sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".TRUE."@' \
     1284                    $histfile > tmp
     1285                \mv -f tmp $histfile
     1286                sed -e 's@output_level="_AUTO_"@output_level="5"@' $histfile \
     1287                    > tmp
     1288                \mv -f tmp $histfile
     1289                sed -e 's@compression_level="2"@compression_level="0"@' \
     1290                    $histfile > tmp
     1291                \mv -f tmp $histfile
    11811292            else
    1182                 sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".FALSE."@' $histfile > tmp ; \mv -f tmp $histfile
     1293                sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".FALSE."@' \
     1294                    $histfile > tmp
     1295                \mv -f tmp $histfile
    11831296            fi
    11841297        done
     
    11901303        if [ "$cosp" = "v1" ] ; then
    11911304            histfile=file_def_histdayCOSP_lmdz.xml
    1192             sed -e 's@enabled=".FALSE."@enabled=".TRUE."@' $histfile > tmp ; \mv -f tmp $histfile
    1193             sed -e 's@output_level="_AUTO_"@output_level="5"@' $histfile > tmp ; \mv -f tmp $histfile
    1194             sed -e 's@compression_level="2"@compression_level="0"@' $histfile > tmp ; \mv -f tmp $histfile
     1305            sed -e 's@enabled=".FALSE."@enabled=".TRUE."@' $histfile > tmp
     1306            \mv -f tmp $histfile
     1307            sed -e 's@output_level="_AUTO_"@output_level="5"@' $histfile > tmp
     1308            \mv -f tmp $histfile
     1309            sed -e 's@compression_level="2"@compression_level="0"@' \
     1310                $histfile > tmp
     1311            \mv -f tmp $histfile
    11951312        fi
    11961313        if [ "$cosp" = "v2" ] ; then
    11971314            histfile=file_def_histdayCOSPv2_lmdz.xml
    1198             sed -e 's@compression_level="2"@compression_level="0"@' $histfile > tmp ; \mv -f tmp $histfile
     1315            sed -e 's@compression_level="2"@compression_level="0"@' \
     1316                $histfile > tmp
     1317            \mv -f tmp $histfile
    11991318            contextfile=context_lmdz.xml
    1200             sed -e 's@src="./file_def_histdayCOSP_lmdz.xml"@src="./file_def_histdayCOSPv2_lmdz.xml"@' $contextfile > tmp ; \mv -f tmp $contextfile
    1201             sed -e 's@src="./file_def_histmthCOSP_lmdz.xml"@src="./file_def_histmthCOSPv2_lmdz.xml"@' $contextfile > tmp ; \mv -f tmp $contextfile
    1202             sed -e 's@src="./file_def_histhfCOSP_lmdz.xml"@src="./file_def_histhfCOSPv2_lmdz.xml"@' $contextfile > tmp ; \mv -f tmp $contextfile
     1319            sed -e 's@src="./file_def_histdayCOSP_lmdz.xml"@src="./file_def_histdayCOSPv2_lmdz.xml"@' \
     1320                $contextfile > tmp
     1321            \mv -f tmp $contextfile
     1322            sed -e 's@src="./file_def_histmthCOSP_lmdz.xml"@src="./file_def_histmthCOSPv2_lmdz.xml"@' \
     1323                $contextfile > tmp
     1324            \mv -f tmp $contextfile
     1325            sed -e 's@src="./file_def_histhfCOSP_lmdz.xml"@src="./file_def_histhfCOSPv2_lmdz.xml"@' \
     1326                $contextfile > tmp
     1327            \mv -f tmp $contextfile
    12031328            fieldfile=field_def_lmdz.xml
    1204             sed -e 's@field_def_cosp1.xml@field_def_cospv2.xml@' $fieldfile > tmp ; \mv -f tmp $fieldfile
     1329            sed -e 's@field_def_cosp1.xml@field_def_cospv2.xml@' $fieldfile \
     1330                > tmp
     1331            \mv -f tmp $fieldfile
    12051332        fi
    12061333
     
    12181345    # Adjusting bench physiq.def to radiative code chosen
    12191346    cd BENCH${grid_resolution}
    1220     sed -e 's/iflag_rrtm=.*.$/iflag_rrtm='$iflag_rrtm'/' -e 's/NSW=.*.$/NSW='$NSW'/' physiq.def > tmpdef
     1347    sed -e 's/iflag_rrtm=.*.$/iflag_rrtm='$iflag_rrtm'/' \
     1348        -e 's/NSW=.*.$/NSW='$NSW'/' physiq.def > tmpdef
    12211349    \mv tmpdef physiq.def
    12221350    cd ..
     
    12531381        if [ ${hostname:0:5} = jean- ] ; then
    12541382            . ../arch/arch-${arch}.env
    1255             echo "srun -n 2 -A $idris_acct@cpu gcm.e > listing  2>&1" >> bench.sh
     1383            echo "srun -n 2 -A $idris_acct@cpu gcm.e > listing  2>&1" \
     1384                 >> bench.sh
    12561385        else
    12571386            echo "$mpirun -np 2 gcm.e > listing  2>&1" >> bench.sh
     
    12591388        # Add rebuild, using reb.sh if it is there
    12601389        echo 'if [ -f reb.sh ] ; then' >> bench.sh
    1261         echo '  ./reb.sh histday ; ./reb.sh histmth ; ./reb.sh histhf ; ./reb.sh histins ; ./reb.sh stomate_history ; ./reb.sh sechiba_history ; ./reb.sh sechiba_out_2 ' >> bench.sh
     1390        echo '  ./reb.sh histday ; ./reb.sh histmth ; ./reb.sh histhf ; ' \
     1391             './reb.sh histins ; ./reb.sh stomate_history ; ' \
     1392             './reb.sh sechiba_history ; ./reb.sh sechiba_out_2 ' >> bench.sh
    12621393        echo 'fi' >> bench.sh
    12631394    else
     
    12761407        if [ "$with_xios" = "y" ] ; then
    12771408            cp ../../ORCHIDEE/src_xml/context_orchidee.xml .
    1278             echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp
     1409            echo '<context id="orchidee" src="./context_orchidee.xml"/>' \
     1410                 > add.tmp
    12791411            cp ../../ORCHIDEE/src_xml/field_def_orchidee.xml .
    12801412            cp ../../ORCHIDEE/src_xml/file_def_orchidee.xml .
     
    12821414            if [ -f ../../ORCHIDEE/src_xml/context_input_orchidee.xml ] ; then
    12831415                cp ../../ORCHIDEE/src_xml/context_input_orchidee.xml .
    1284                 echo '<context id="orchidee" src="./context_input_orchidee.xml"/>' >> add.tmp
     1416                echo '<context id="orchidee" ' \
     1417                     'src="./context_input_orchidee.xml"/>' >> add.tmp
    12851418            fi
    12861419            sed -e '/id="LMDZ"/r add.tmp' iodef.xml > tmp
    12871420            mv tmp iodef.xml
    1288             sed -e'{/sechiba1/ s/enabled="_AUTO_"/type="one_file" enabled=".TRUE."/}' file_def_orchidee.xml > tmp ; \mv -f tmp file_def_orchidee.xml
    1289             sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".FALSE."@' file_def_orchidee.xml > tmp ; \mv -f tmp file_def_orchidee.xml
    1290             sed -e 's@output_level="_AUTO_"@output_level="1"@' file_def_orchidee.xml > tmp ; \mv -f tmp file_def_orchidee.xml
    1291             sed -e 's@output_freq="_AUTO_"@output_freq="1d"@' file_def_orchidee.xml > tmp ; \mv -f tmp file_def_orchidee.xml
    1292             sed -e 's@compression_level="4"@compression_level="0"@' file_def_orchidee.xml > tmp ; \mv -f tmp file_def_orchidee.xml
    1293             sed -e 's@XIOS_ORCHIDEE_OK = n@XIOS_ORCHIDEE_OK = y@' orchidee.def > tmp ; \mv -f tmp orchidee.def
     1421            sed -e'{/sechiba1/ s/enabled="_AUTO_"/type="one_file" enabled=".TRUE."/}' \
     1422                file_def_orchidee.xml > tmp
     1423            \mv -f tmp file_def_orchidee.xml
     1424            sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".FALSE."@' \
     1425                file_def_orchidee.xml > tmp
     1426            \mv -f tmp file_def_orchidee.xml
     1427            sed -e 's@output_level="_AUTO_"@output_level="1"@' \
     1428                file_def_orchidee.xml > tmp
     1429            \mv -f tmp file_def_orchidee.xml
     1430            sed -e 's@output_freq="_AUTO_"@output_freq="1d"@' \
     1431                file_def_orchidee.xml > tmp
     1432            \mv -f tmp file_def_orchidee.xml
     1433            sed -e 's@compression_level="4"@compression_level="0"@' \
     1434                file_def_orchidee.xml > tmp
     1435            \mv -f tmp file_def_orchidee.xml
     1436            sed -e 's@XIOS_ORCHIDEE_OK = n@XIOS_ORCHIDEE_OK = y@' \
     1437                orchidee.def > tmp
     1438            \mv -f tmp orchidee.def
    12941439        fi
    12951440    fi
Note: See TracChangeset for help on using the changeset viewer.