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 5086 for branches/2014/dev_r4650_UKMO3_masked_damping/NEMOGCM/CONFIG/makenemo – NEMO

Ignore:
Timestamp:
2015-02-17T10:06:39+01:00 (9 years ago)
Author:
timgraham
Message:

Merged head of trunk into branch in preparation for putting code back onto the trunk
In working copy ran the command:
svn merge svn+sshtimgraham@…/ipsl/forge/projets/nemo/svn/trunk

Also recompiled NEMO_book.pdf with merged input files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO3_masked_damping/NEMOGCM/CONFIG/makenemo

    r4148 r5086  
    3838# 
    3939# - NEW_CONF    : configuration to be created 
    40 # - REF_CONF    : reference configuration to build the new one 
     40# - REF_CONF    : reference configuration to build the new one from 
    4141# - CMP_NAM     : compiler name 
    4242# - NBR_PRC     : number of processes used to compile 
     43# - USP_CONF    : unsupported (external) configuration to build the new one from 
    4344# - NEM_SUBDIR  : NEMO subdirectory used (specified) 
    4445# 
     
    5152# - TOOLS_DIR   :   "    "    " 
    5253# - NEMO_DIR    :   "    "    " 
     54# - REMOTE_CTL  : URL link to a remote resource list for an external configuration  
     55#                 which is not part of the reference suite 
     56# - LOCAL_REF   : Nearest reference configuration to an external configuration  
     57#                 which is not part of the reference suite 
     58#                 (used to populate work directories if remote access is not available) 
    5359# 
    5460# EXAMPLES 
     
    8389x_n=""; 
    8490x_r=""; 
     91x_u=""; 
    8592x_m=""; 
    8693x_t=""; 
     
    106113export AGRIFUSE=10 
    107114declare -a TAB 
     115declare -a REMOTE_CTL 
     116declare -a LOCAL_REF 
    108117list_key=0 
    109118chk_key=1 
     
    114123#- 
    115124#- Choice of the options --- 
    116 while getopts :hd:n:r:m:j:e:s:v:t:k: V 
     125while getopts :hd:n:r:u:m:j:e:s:v:t:k: V 
    117126do 
    118127    case $V in 
    119128   (h) x_h=${OPTARG}; 
    120129        echo "Usage   : "${b_n} \ 
    121        " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-s Path] [-e Path] [-j No] [-v No] [-k 0/1]"; 
     130       " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-u conf] [-s Path] [-e Path] [-j No] [-v No] [-k 0/1]"; 
    122131   echo " -h           : help"; 
    123132   echo " -h institute : specific help for consortium members"; 
     
    126135   echo " -d dir       : choose NEMO sub-directories"; 
    127136   echo " -r conf      : choose reference configuration"; 
     137   echo " -u conf      : choose an unsupported (external) configuration"; 
    128138        echo " -s Path      : choose alternative location for NEMO main directory"; 
    129139        echo " -e Path      : choose alternative location for MY_SRC directory"; 
     
    139149   echo "Available configurations :"; cat ${CONFIG_DIR}/cfg.txt; 
    140150   echo ""; 
     151        echo "Available unsupported (external) configurations :"; cat ${CONFIG_DIR}/uspcfg.txt; 
     152   echo ""; 
    141153   echo "Example to remove bad configuration "; 
    142154   echo "./makenemo -n MY_CONFIG clean_config"; 
     
    161173   (n)  x_n=${OPTARG};; 
    162174   (r)  x_r=${OPTARG};; 
     175   (u)  x_u=${OPTARG};; 
    163176   (m)  x_m=${OPTARG};; 
    164177   (j)  x_j=${OPTARG};; 
     
    187200       ;; 
    188201   add_key) 
    189        list_add_key=$2 
    190        export ${list_add_key} 
     202       test $?2 || ( list_add_key=$2 && export ${list_add_key} ) 
    191203       shift 
    192204       ;; 
    193205   del_key) 
    194        list_del_key=$2 
    195        export ${list_del_key} 
     206       test $?2 || ( list_del_key=$2 && export ${list_del_key} ) 
    196207       shift 
    197208       ;; 
     
    220231NEM_SUBDIR=${x_d} 
    221232REF_CONF=${x_r} 
     233USP_CONF=${x_u} 
    222234NEMO_TDIR=${x_t:-$NEMO_TDIR} 
    223235export NEMO_TDIR=${NEMO_TDIR:-$CONFIG_DIR} 
     
    228240    echo "Available configurations :" 
    229241    cat ${CONFIG_DIR}/cfg.txt 
     242    echo 
     243    echo "Available unsupported (external) configurations :"  
     244    cat ${CONFIG_DIR}/uspcfg.txt 
    230245    exit 
    231246fi 
     
    238253 
    239254if [ ${#NEW_CONF} -eq 0 ] ; then 
    240     if [ ${#NEM_SUBDIR} -eq 0 -a ${#REF_CONF} -eq 0 ]; then 
    241    echo "You are  installing a new configuration" 
     255    if [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then 
     256   echo "You are installing a new default (ORCA2_LIM) configuration" 
    242257   ind=0 
    243258   . ${COMPIL_DIR}/Fread_dir.sh OPA_SRC    YES 
     
    248263   . ${COMPIL_DIR}/Fread_dir.sh OFF_SRC    NO 
    249264   REF_CONF=ORCA2_LIM 
    250     elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ]; then 
    251    echo "You are  installing a new configuration" 
     265    elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then 
     266   echo "You are  installing a new configuration based on ORCA2_LIM" 
    252267   TAB=( ${NEM_SUBDIR} ) 
    253268   REF_CONF=ORCA2_LIM 
     
    255270   echo "You are  installing a new configuration based on ${REF_CONF}" 
    256271   . ${COMPIL_DIR}/Fcopy_dir.sh ${REF_CONF} 
     272    elif [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#USP_CONF} -gt 0 ]; then 
     273   echo "You are  installing a new configuration based on the unsupported (external) ${USP_CONF}" 
     274   . ${COMPIL_DIR}/Fcopy_extdir.sh ${USP_CONF}   
     275        #echo "TTT " ${TAB} 
     276        #echo "RRR " ${REMOTE_CTL} 
     277        #echo "LLL " ${LOCAL_REF} 
    257278    fi 
    258279    NEW_CONF=${x_n} 
    259     . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF} 
     280 
     281    if [ ${#USP_CONF} -gt 0 ]; then 
     282      . ${COMPIL_DIR}/Fmake_extconfig.sh ${NEW_CONF} ${LOCAL_REF} 
     283      . ${COMPIL_DIR}/Ffetch_extdir.sh ${NEW_CONF} ${REMOTE_CTL}   
     284    else 
     285      . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF} 
     286    fi 
    260287else 
    261288    sed -e "/${NEW_CONF} /d"  ${CONFIG_DIR}/cfg.txt >  ${COMPIL_DIR}/cfg.tmp 
Note: See TracChangeset for help on using the changeset viewer.