Changeset 4427 for BOL


Ignore:
Timestamp:
Feb 9, 2023, 6:23:43 PM (22 months ago)
Author:
Laurent Fairhead
Message:

Adataption of script to r4426 and modified arch.path files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r4422 r4427  
    955955############################################################
    956956
     957
     958
     959cd $MODEL/modipsl/modeles/LMDZ*
     960lmdzlog=`pwd`/lmdz.log
     961
     962##################################################################
     963# Possibly update LMDZ if a specific svn release is requested
     964##################################################################
     965
     966set +e ; svn upgrade ; set -e
     967
     968if [ "$svn" = "last" ] ; then svnopt="" ; else svnopt="-r $svn" ; fi
     969if [ "$svn" != "" ] ; then
     970    set +e ; svn info | grep -q 'http:'
     971    if [ $? = 0 ] ; then
     972        svn switch --relocate http://svn.lmd.jussieu.fr/LMDZ \
     973            https://svn.lmd.jussieu.fr/LMDZ
     974    fi
     975    svn update $svnopt
     976    set -e
     977fi
     978
     979#---------------------------------------------------------------------
     980# Retrieve the final svn release number, and adjust compilation
     981# options accordingly
     982# If svn not available, will use the svn writen in $MODEL/Readm*md
     983# For old version it assumes that it is before 4185 (the version
     984# for which the test was introduced
     985#---------------------------------------------------------------------
     986
     987set +e ; mysvn=`svnversion . | egrep -o "[0-9]+" 2>/dev/null` ; set -e
     988if [ "$mysvn" = "" ] ; then mysvn=`grep 'Revision: [0-9]' $MODEL/Read*.md | awk ' { print $2 } ' 2>/dev/null` ; fi
     989if [ "$mysvn" = "" ] ; then mysvn=4190 ; fi
     990
    957991if [[ "$pclinux" = "1" && ! -f arch/arch-local.path ]] ; then
    958992
     
    960994    cd arch
    961995    # arch-local.path file
    962     echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" \
     996    # test for version as arch.pth file changed format with rev 4426
     997    if [ "$mysvn" -gt 4425 ] ; then
     998      echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib \"" > arch-local.path
     999      echo "NETCDF_LIB=\"-lnetcdff -lnetcdf\"" >> arch-local.path
     1000      echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path
     1001      echo 'NETCDF95_INCDIR=-I$LMDGCM/../../include' >> arch-local.path
     1002      echo 'NETCDF95_LIBDIR=-L$LMDGCM/../../lib' >> arch-local.path
     1003      echo 'NETCDF95_LIB=-lnetcdf95' >> arch-local.path
     1004      echo 'IOIPSL_INCDIR=-I$LMDGCM/../../lib' >> arch-local.path
     1005      echo 'IOIPSL_LIBDIR=-L$LMDGCM/../../lib' >> arch-local.path
     1006      echo 'IOIPSL_LIB=-lioipsl' >> arch-local.path
     1007      echo 'XIOS_INCDIR=-I$LMDGCM/../XIOS/inc' >> arch-local.path
     1008      echo 'XIOS_LIBDIR=-L$LMDGCM/../XIOS/lib' >> arch-local.path
     1009      echo "XIOS_LIB=\"-lxios -lstdc++\"" >> arch-local.path
     1010      echo 'ORCH_INCDIR=-I$LMDGCM/../../lib' >> arch-local.path
     1011      echo 'ORCH_LIBDIR=-L$LMDGCM/../../lib' >> arch-local.path
     1012    else
     1013      echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" \
    9631014         > arch-local.path
    964     echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path
    965     echo 'NETCDF95_INCDIR=$LMDGCM/../../include' >> arch-local.path
    966     echo 'NETCDF95_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
    967     echo 'IOIPSL_INCDIR=$LMDGCM/../../lib' >> arch-local.path
    968     echo 'IOIPSL_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
    969     echo 'XIOS_INCDIR=$LMDGCM/../XIOS/inc' >> arch-local.path
    970     echo 'XIOS_LIBDIR=$LMDGCM/../XIOS/lib' >> arch-local.path
    971     echo 'ORCH_INCDIR=$LMDGCM/../../lib' >> arch-local.path
    972     echo 'ORCH_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
     1015      echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path
     1016      echo 'NETCDF95_INCDIR=$LMDGCM/../../include' >> arch-local.path
     1017      echo 'NETCDF95_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
     1018      echo 'IOIPSL_INCDIR=$LMDGCM/../../lib' >> arch-local.path
     1019      echo 'IOIPSL_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
     1020      echo 'XIOS_INCDIR=$LMDGCM/../XIOS/inc' >> arch-local.path
     1021      echo 'XIOS_LIBDIR=$LMDGCM/../XIOS/lib' >> arch-local.path
     1022      echo 'ORCH_INCDIR=$LMDGCM/../../lib' >> arch-local.path
     1023      echo 'ORCH_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
     1024    fi
    9731025
    9741026    if [ $pcmac == 1 ] ; then
     
    9971049
    9981050fi # of if [ "$pclinux" = 1 ]
    999 
    1000 
    1001 cd $MODEL/modipsl/modeles/LMDZ*
    1002 lmdzlog=`pwd`/lmdz.log
    1003 
    1004 ##################################################################
    1005 # Possibly update LMDZ if a specific svn release is requested
    1006 ##################################################################
    1007 
    1008 set +e ; svn upgrade ; set -e
    1009 
    1010 if [ "$svn" = "last" ] ; then svnopt="" ; else svnopt="-r $svn" ; fi
    1011 if [ "$svn" != "" ] ; then
    1012     set +e ; svn info | grep -q 'http:'
    1013     if [ $? = 0 ] ; then
    1014         svn switch --relocate http://svn.lmd.jussieu.fr/LMDZ \
    1015             https://svn.lmd.jussieu.fr/LMDZ
    1016     fi
    1017     svn update $svnopt
    1018     set -e
    1019 fi
    1020 
    1021 #---------------------------------------------------------------------
    1022 # Retrieve the final svn release number, and adjust compilation
    1023 # options accordingly
    1024 # If svn not available, will use the svn writen in $MODEL/Readm*md
    1025 # For old version it assumes that it is before 4185 (the version
    1026 # for which the test was introduced
    1027 #---------------------------------------------------------------------
    1028 
    1029 set +e ; mysvn=`svnversion . | egrep -o "[0-9]+" 2>/dev/null` ; set -e
    1030 if [ "$mysvn" = "" ] ; then mysvn=`grep 'Revision: [0-9]' $MODEL/Read*.md | awk ' { print $2 } ' 2>/dev/null` ; fi
    1031 if [ "$mysvn" = "" ] ; then mysvn=4190 ; fi
    1032 
    10331051#---------------------------------------------------------------------
    10341052# Option de compilation du rayonnement : depend de $mysvn ><= r4185
Note: See TracChangeset for help on using the changeset viewer.