- Timestamp:
- 2015-02-17T10:06:39+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO3_masked_damping/NEMOGCM/CONFIG/makenemo
r4148 r5086 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};; … … 187 200 ;; 188 201 add_key) 189 list_add_key=$2 190 export ${list_add_key} 202 test $?2 || ( list_add_key=$2 && export ${list_add_key} ) 191 203 shift 192 204 ;; 193 205 del_key) 194 list_del_key=$2 195 export ${list_del_key} 206 test $?2 || ( list_del_key=$2 && export ${list_del_key} ) 196 207 shift 197 208 ;; … … 220 231 NEM_SUBDIR=${x_d} 221 232 REF_CONF=${x_r} 233 USP_CONF=${x_u} 222 234 NEMO_TDIR=${x_t:-$NEMO_TDIR} 223 235 export NEMO_TDIR=${NEMO_TDIR:-$CONFIG_DIR} … … 228 240 echo "Available configurations :" 229 241 cat ${CONFIG_DIR}/cfg.txt 242 echo 243 echo "Available unsupported (external) configurations :" 244 cat ${CONFIG_DIR}/uspcfg.txt 230 245 exit 231 246 fi … … 238 253 239 254 if [ ${#NEW_CONF} -eq 0 ] ; then 240 if [ ${#NEM_SUBDIR} -eq 0 -a ${#REF_CONF} -eq 0 ]; then241 echo "You are installing a newconfiguration"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" 242 257 ind=0 243 258 . ${COMPIL_DIR}/Fread_dir.sh OPA_SRC YES … … 248 263 . ${COMPIL_DIR}/Fread_dir.sh OFF_SRC NO 249 264 REF_CONF=ORCA2_LIM 250 elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ] ; then251 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" 252 267 TAB=( ${NEM_SUBDIR} ) 253 268 REF_CONF=ORCA2_LIM … … 255 270 echo "You are installing a new configuration based on ${REF_CONF}" 256 271 . ${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} 257 278 fi 258 279 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 260 287 else 261 288 sed -e "/${NEW_CONF} /d" ${CONFIG_DIR}/cfg.txt > ${COMPIL_DIR}/cfg.tmp
Note: See TracChangeset
for help on using the changeset viewer.