Changeset 4990 for trunk/NEMOGCM/CONFIG/makenemo
- Timestamp:
- 2014-12-15T17:42:49+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/CONFIG/makenemo
r4148 r4990 38 38 # 39 39 # - 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 41 41 # - CMP_NAM : compiler name 42 42 # - NBR_PRC : number of processes used to compile 43 # - USP_CONF : unsupported (external) configuration to build the new one from 43 44 # - NEM_SUBDIR : NEMO subdirectory used (specified) 44 45 # … … 51 52 # - TOOLS_DIR : " " " 52 53 # - 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) 53 59 # 54 60 # EXAMPLES … … 83 89 x_n=""; 84 90 x_r=""; 91 x_u=""; 85 92 x_m=""; 86 93 x_t=""; … … 106 113 export AGRIFUSE=10 107 114 declare -a TAB 115 declare -a REMOTE_CTL 116 declare -a LOCAL_REF 108 117 list_key=0 109 118 chk_key=1 … … 114 123 #- 115 124 #- Choice of the options --- 116 while getopts :hd:n:r: m:j:e:s:v:t:k: V125 while getopts :hd:n:r:u:m:j:e:s:v:t:k: V 117 126 do 118 127 case $V in 119 128 (h) x_h=${OPTARG}; 120 129 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]"; 122 131 echo " -h : help"; 123 132 echo " -h institute : specific help for consortium members"; … … 126 135 echo " -d dir : choose NEMO sub-directories"; 127 136 echo " -r conf : choose reference configuration"; 137 echo " -u conf : choose an unsupported (external) configuration"; 128 138 echo " -s Path : choose alternative location for NEMO main directory"; 129 139 echo " -e Path : choose alternative location for MY_SRC directory"; … … 139 149 echo "Available configurations :"; cat ${CONFIG_DIR}/cfg.txt; 140 150 echo ""; 151 echo "Available unsupported (external) configurations :"; cat ${CONFIG_DIR}/uspcfg.txt; 152 echo ""; 141 153 echo "Example to remove bad configuration "; 142 154 echo "./makenemo -n MY_CONFIG clean_config"; … … 161 173 (n) x_n=${OPTARG};; 162 174 (r) x_r=${OPTARG};; 175 (u) x_u=${OPTARG};; 163 176 (m) x_m=${OPTARG};; 164 177 (j) x_j=${OPTARG};; … … 220 233 NEM_SUBDIR=${x_d} 221 234 REF_CONF=${x_r} 235 USP_CONF=${x_u} 222 236 NEMO_TDIR=${x_t:-$NEMO_TDIR} 223 237 export NEMO_TDIR=${NEMO_TDIR:-$CONFIG_DIR} … … 228 242 echo "Available configurations :" 229 243 cat ${CONFIG_DIR}/cfg.txt 244 echo 245 echo "Available unsupported (external) configurations :" 246 cat ${CONFIG_DIR}/uspcfg.txt 230 247 exit 231 248 fi … … 238 255 239 256 if [ ${#NEW_CONF} -eq 0 ] ; then 240 if [ ${#NEM_SUBDIR} -eq 0 -a ${#REF_CONF} -eq 0 ]; then241 echo "You are installing a newconfiguration"257 if [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then 258 echo "You are installing a new default (ORCA2_LIM) configuration" 242 259 ind=0 243 260 . ${COMPIL_DIR}/Fread_dir.sh OPA_SRC YES … … 248 265 . ${COMPIL_DIR}/Fread_dir.sh OFF_SRC NO 249 266 REF_CONF=ORCA2_LIM 250 elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ] ; then251 echo "You are installing a new configuration "267 elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then 268 echo "You are installing a new configuration based on ORCA2_LIM" 252 269 TAB=( ${NEM_SUBDIR} ) 253 270 REF_CONF=ORCA2_LIM … … 255 272 echo "You are installing a new configuration based on ${REF_CONF}" 256 273 . ${COMPIL_DIR}/Fcopy_dir.sh ${REF_CONF} 274 elif [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#USP_CONF} -gt 0 ]; then 275 echo "You are installing a new configuration based on the unsupported (external) ${USP_CONF}" 276 . ${COMPIL_DIR}/Fcopy_extdir.sh ${USP_CONF} 277 #echo "TTT " ${TAB} 278 #echo "RRR " ${REMOTE_CTL} 279 #echo "LLL " ${LOCAL_REF} 257 280 fi 258 281 NEW_CONF=${x_n} 259 . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF} 282 283 if [ ${#USP_CONF} -gt 0 ]; then 284 . ${COMPIL_DIR}/Fmake_extconfig.sh ${NEW_CONF} ${LOCAL_REF} 285 . ${COMPIL_DIR}/Ffetch_extdir.sh ${NEW_CONF} ${REMOTE_CTL} 286 else 287 . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF} 288 fi 260 289 else 261 290 sed -e "/${NEW_CONF} /d" ${CONFIG_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp
Note: See TracChangeset
for help on using the changeset viewer.