New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 3294 for trunk/NEMOGCM/TOOLS – NEMO

Changeset 3294 for trunk/NEMOGCM/TOOLS


Ignore:
Timestamp:
2012-01-28T17:44:18+01:00 (12 years ago)
Author:
rblod
Message:

Merge of 3.4beta into the trunk

Location:
trunk/NEMOGCM/TOOLS
Files:
1 deleted
8 edited
6 copied

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh

    r2520 r3294  
    6969   fi 
    7070else 
    71    ln -sf ${MAIN_DIR}/ARCH/arch-${2}.fcm ${COMPIL_DIR}/$1 
     71   myfile=$( find ${MAIN_DIR}/ARCH -name arch-${2}.fcm -print ) 
     72   if [ ${#myfile} -gt 0 ]; then 
     73      ln -sf  ${myfile} ${COMPIL_DIR}/$1 
     74   else 
     75      echo "Warning !!!" 
     76      echo "Compiler not existing" 
     77      echo "Try makenemo -h for help" 
     78      echo "EXITING..." 
     79      exit 1        
     80   fi    
    7281fi 
  • trunk/NEMOGCM/TOOLS/COMPILE/Fcheck_config.sh

    r2520 r3294  
    3939# - Nothing set, use the previous in use  
    4040# 
    41 # We use TOOLS/COMPILE/cfg.txt to check if the onfiguration exists. 
     41# We use TOOLS/CONFIG_DIR/cfg.txt to check if the onfiguration exists. 
    4242# 
    4343# EXAMPLES 
     
    6868declare -a ZTAB 
    6969if [ ${#2} -eq 0 ]; then 
    70    tail -1  ${COMPIL_DIR}/$1  > ${COMPIL_DIR}/cfg.tmp 
    71    read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 
     70   tail -1  ${CONFIG_DIR}/$1  > ${CONFIG_DIR}/cfg.tmp 
     71   read -a ZTAB < ${CONFIG_DIR}/cfg.tmp 
    7272   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 
    73    \rm ${COMPIL_DIR}/cfg.tmp 
     73   \rm ${CONFIG_DIR}/cfg.tmp 
    7474   echo "Warning !!!" 
    7575   echo "No configuration specified" 
     
    7979fi 
    8080if [ "$1" == cfg.txt ]; then 
    81    cat ${COMPIL_DIR}/$1 | grep "${NEW_CONF} " > ${COMPIL_DIR}/cfg.tmp 
    82    read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 
     81   cat ${CONFIG_DIR}/$1 | grep "${NEW_CONF} " > ${CONFIG_DIR}/cfg.tmp 
     82   read -a ZTAB < ${CONFIG_DIR}/cfg.tmp 
    8383   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} ) 
    84    \rm ${COMPIL_DIR}/cfg.tmp 
     84   \rm ${CONFIG_DIR}/cfg.tmp 
    8585fi 
    8686 
  • trunk/NEMOGCM/TOOLS/COMPILE/Fclean_config.sh

    r2520 r3294  
    6464#- 
    6565 NEW_CONF=${x_n} 
    66  echo "Are you sure that you want to remove this directory ? [y/n] " 
    67  read answer 
    68  answer=`echo $answer | sed 's/^[y].*$/y/'` 
    69  if [  -z "$answer" -o "x$answer" = "xy" ]; then 
    70    # testing if configuration exists 
    71    if [ "$(cat ${COMPIL_DIR}/cfg.txt | grep "${NEW_CONF} ")"  == "" ] ; then 
    72       echo "The configuration ${NEW_CONF} does not exist in file cfg.txt"      
    73       echo "No removing configuration" 
    74       echo " " 
     66 if [ ${#NEW_CONF} -eq 0 ] ; then 
     67      echo " " 
     68      echo "No configuration specified, please use makenemo -n CONFIG clean_config " 
     69 else 
     70    echo "Are you sure that you want to remove this directory $NEW_CONF? [y/n] " 
     71    read answer 
     72    answer=`echo $answer | sed 's/^[y].*$/y/'` 
     73    if [  -z "$answer" -o "x$answer" = "xy" ]; then 
     74      # testing if configuration exists 
     75      if [ "$(cat ${CONFIG_DIR}/cfg.txt | grep "${NEW_CONF} ")"  == "" ] ; then 
     76        echo "The configuration ${NEW_CONF} does not exist in file cfg.txt"      
     77        echo "No removing configuration" 
     78        echo " " 
    7579        else 
    76       rm -rf ${CONFIG_DIR}/${NEW_CONF} 
    77       sed -e "/${NEW_CONF} /d"  ${COMPIL_DIR}/cfg.txt >  ${COMPIL_DIR}/cfg.tmp 
    78       mv  ${COMPIL_DIR}/cfg.tmp  ${COMPIL_DIR}/cfg.txt 
    79       echo "${NEW_CONF} configuration REMOVED"  
     80        rm -rf ${CONFIG_DIR}/${NEW_CONF} 
     81        sed -e "/${NEW_CONF} /d"  ${CONFIG_DIR}/cfg.txt >  ${CONFIG_DIR}/cfg.tmp 
     82        mv  ${CONFIG_DIR}/cfg.tmp  ${CONFIG_DIR}/cfg.txt 
     83        echo "${NEW_CONF} configuration REMOVED"  
    8084        fi 
    81  else 
    82    echo " " 
    83    echo "nothing to remove" 
    84  fi 
    85  
     85    else 
     86      echo " " 
     87      echo "nothing to remove" 
     88    fi 
     89 fi  
    8690 unset -v answer 
  • trunk/NEMOGCM/TOOLS/COMPILE/Fcopy_dir.sh

    r2520 r3294  
    5555 
    5656declare -a ZTAB 
    57 grep "$1 " ${COMPIL_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp 
    58 read -a ZTAB < ${COMPIL_DIR}/cfg.tmp 
     57grep "$1 " ${CONFIG_DIR}/cfg.txt > ${CONFIG_DIR}/cfg.tmp 
     58read -a ZTAB < ${CONFIG_DIR}/cfg.tmp 
    5959TAB=( ${ZTAB[@]:1} ) 
    60 \rm ${COMPIL_DIR}/cfg.tmp 
     60\rm ${CONFIG_DIR}/cfg.tmp 
    6161 
    6262unset -v ZTAB 
  • trunk/NEMOGCM/TOOLS/COMPILE/Flist_archfile.sh

    r2520 r3294  
    1919# :: 
    2020# 
    21 #  $ Flist_archfile.sh 
     21#  $ Flist_archfile.sh Institute 
    2222# 
    2323# 
     
    3737#  $ ./Flist_archfile.sh  
    3838# 
     39#  $ ./Flist_archfile.sh CNRS 
    3940# 
    4041# TODO 
     
    5455# 
    5556#- 
     57 
     58if [ -n "$2" ]; then 
     59shift 
     60fi 
     61 
    5662echo "Available compilers for -m option :" 
    57 for file in `ls ${MAIN_DIR}/ARCH` 
     63for file in  $(ls ${MAIN_DIR}/ARCH | grep fcm ) 
    5864do 
    5965zvar1=${file#arch-} 
     
    6268printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 
    6369done 
     70 
     71 
     72if [ "$1" == "all" ]; then 
     73   for dir  in  $(ls ${MAIN_DIR}/ARCH | grep -v fcm ) 
     74   do  
     75      echo "Available compilers at ${dir} :" 
     76      for file in  $(ls ${MAIN_DIR}/ARCH/${dir} | grep  fcm ) 
     77      do 
     78      zvar1=${file#arch-} 
     79      zvar2=$(head -1 ${MAIN_DIR}/ARCH/${dir}/$file) 
     80      #echo "${zvar1%.fcm} : ${zvar2#\#}" 
     81      printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 
     82      done 
     83   done 
     84elif [ -d ${MAIN_DIR}/ARCH/${1} ]; then 
     85      echo "Available compilers at $1 :" 
     86      for file in  $(ls ${MAIN_DIR}/ARCH/$1 | grep fcm ) 
     87      do 
     88      zvar1=${file#arch-} 
     89      zvar2=$(head -1 ${MAIN_DIR}/ARCH/${1}/$file) 
     90      #echo "${zvar1%.fcm} : ${zvar2#\#}" 
     91      printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}" 
     92      done 
     93else 
     94      echo "Available consortium member sub-directories :" 
     95      for dir  in  $(ls ${MAIN_DIR}/ARCH | grep -v fcm ) 
     96      do 
     97         echo ${dir} 
     98      done 
     99      echo "use \"makenemo -h all\" or \"makenemo -m help\" to see compilers available in member's sub-directories" 
     100fi 
  • trunk/NEMOGCM/TOOLS/COMPILE/Fmake_WORK.sh

    r2520 r3294  
    6464# 
    6565#- 
    66 declare ZCONF=$1 ; shift  
     66declare ZSRC=$1 ; shift  
     67declare ZCONF=$1 ; shift 
    6768ZTAB=( $@ ) 
    6869declare i=0 ; declare NDIR=${#ZTAB[@]} 
    6970 
    7071echo "Creating ${ZCONF}/WORK = ${ZTAB[*]} for ${ZCONF}" 
    71 echo "" 
    7272 
    7373[ ! -d ${ZCONF}/MY_SRC ] && \mkdir ${ZCONF}/MY_SRC 
    7474[   -d ${ZCONF}/WORK   ] || \mkdir ${ZCONF}/WORK 
     75 
     76if [ "${ZSRC}" != "none" ] ; then  
     77  if [ -d ${ZSRC} ] ; then  
     78     ln -sf ${ZSRC}/*.[Ffh]90 ${ZCONF}/MY_SRC/.  
     79     echo "MY_SRC content is linked to ${ZSRC}"  
     80  else 
     81     echo "External directory for MY_SRC does not exist. Using default." 
     82  fi 
     83else  
     84echo "MY_SRC directory is : ${ZCONF}/MY_SRC" 
     85fi 
    7586 
    7687\rm -f ../${1}/WORK/* 
  • trunk/NEMOGCM/TOOLS/SECTIONS_DIADCT/src/compute_sections.f90

    r2951 r3294  
    370370        DO WHILE ( (  sec%listPoint(jseg)%I .NE.  endingPoint%I    & 
    371371                 .OR. sec%listPoint(jseg)%J .NE. endingPoint%J   ) & 
    372                  .AND. jseg .LT. 500 .AND. sec%listPoint(jseg)%I .GT. 0  )          
     372                 .AND. jseg .LT. nb_inmesh + 1 .AND. sec%listPoint(jseg)%I .GT. 0  )          
    373373    
    374374           ! a. find the 4 adjacent points (North, South, East, West) 
  • trunk/NEMOGCM/TOOLS/maketools

    r2331 r3294  
    8484#- 
    8585#- Choice of the options --- 
     86x_h=""; 
    8687x_n=""; 
    8788x_m=""; 
     
    9293  do 
    9394    case $V in 
    94       (h)  echo "Usage   : "${b_n} \ 
     95      (h)  x_h=${OPTARG}; 
     96                          echo "Usage   : "${b_n} \ 
    9597                " [-h] [-n name] [-m arch] [-j No] [-t tmpdir]"; 
    9698           echo " -h  : help"; 
     99                          echo " -h institute : specific help for consortium members"; 
    97100           echo " -n name : tool name, [-n help] to list existing tools"; 
    98101           echo " -m arch : choose compiler, [-m help] to list exiting compilers"; 
     
    105108                          printf "%s\n" "Available tools :" `ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools`; 
    106109           echo ""; 
    107                           . ${COMPIL_DIR}/Flist_archfile.sh  ; 
     110                          . ${COMPIL_DIR}/Flist_archfile.sh  ${x_h}; 
    108111           echo ""; 
    109112           echo "Default : previous tool and compiler"; 
     
    140143#- Check if the tool or the compiler exist or list it 
    141144[ "${NEW_CONF}" == help ] && printf "%s\n"  "Available tools :" `ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools` && exit 
    142 [ "${CMP_NAM}" ==  help ] && . ${COMPIL_DIR}/Flist_archfile.sh && exit 
     145[ "${CMP_NAM}" ==  help ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 
    143146 
    144147#- When used for the first time, choose a compiler --- 
Note: See TracChangeset for help on using the changeset viewer.