Changeset 4546 for BOL


Ignore:
Timestamp:
May 27, 2023, 12:02:36 PM (12 months ago)
Author:
fhourdin
Message:

Modif options netcdf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r4542 r4546  
    242242        "-debug") optim=-debug ; shift ;;
    243243        "-name") MODEL=$2 ; shift ; shift ;;
    244         "-netcdf") case $2 in
    245                        0|1) netcdf=$2 ;;
    246                        *) netcdf=`ls -d $2` ; if [ $? != 0 ] ; then echo No directory $2 ; exit 1 ; fi
    247                    esac
    248                    shift ; shift ;;
     244        "-netcdf") netcdf=$2 ; shift ; shift ;;
    249245        "-physiq") physiq=$2 ; shift ; shift ;;
    250246        "-xios") with_xios="y" ; shift ;;
    251247        "-env_file") env_file=$2 ; shift ; shift ;;
    252248        "-veget") veget=$2 ; shift ; shift ;;
    253         *) ./install_lmdz.sh -h ; exit
     249        *)  bash install_lmdz.sh -h ; exit
    254250    esac
    255251done
     
    604600
    605601###########################################################################
    606 if [ $netcdf = 1 ] ; then
     602echo Installing Netcdf
    607603###########################################################################
     604
     605if [ $netcdf = 0 ] ; then
     606    ncdfdir=/usr
     607
     608else
    608609    cd $MODEL
    609     netcdflog=`pwd`/netcdf.log
    610     echo '----------------------------------------------------------'
    611     echo Compiling the Netcdf library
    612     echo '----------------------------------------------------------'
    613     echo log file : $netcdflog
    614610
    615611    case $compiler in
     
    622618    case $with_xios in
    623619        n) script_install_netcdf=install_netcdf4_hdf5_seq.bash
    624            ncdfdir=$MODEL/netcdf4_hdf5_seq
     620           ncdfdir=netcdf4_hdf5_seq
    625621           opt_=$opt1 ;;
    626622        y) script_install_netcdf=install_netcdf4_hdf5.bash
    627            ncdfdir=$MODEL/netcdf4_hdf5
     623           ncdfdir=netcdf4_hdf5
    628624           opt_="$opt2 -MPI $root_mpi" ;;
    629625        *) echo with_xios=$with_xios, should be n or y ; exit 1
    630626    esac
     627    if [ $netcdf = 1 ] ; then
     628       ncdfdir=$MODEL/$ncdfdir
     629    else
     630       mkdir -p $netcdf ; ncdfdir=$netcdf/$ncdfdir
     631    fi
    631632         
    632     if [[ ! -d $ncdfdir ]] ; then
     633    echo Repertoire netcdf $ncdfdir
     634    if [ ! -d $ncdfdir ] ; then
     635        netcdflog=`pwd`/netcdf.log
     636        echo '----------------------------------------------------------'
     637        echo Compiling the Netcdf library
     638        echo '----------------------------------------------------------'
     639        echo log file : $netcdflog
    633640        myget script_install/$script_install_netcdf >> $netcdflog 2>&1
    634641        chmod u=rwx $script_install_netcdf
     
    645652    echo install_lmdz.sh netcdf_OK `date`
    646653
    647 elif [ $netcdf = 0 ] ; then
    648     ncdfdir=/usr
    649 else
    650     ncdfdir=$netcdf
    651654fi
    652655
Note: See TracChangeset for help on using the changeset viewer.