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 7633 – NEMO

Changeset 7633


Ignore:
Timestamp:
2017-02-03T13:06:21+01:00 (8 years ago)
Author:
acc
Message:

Branch 2016/dev_merge_2016. Changes to makenemo to support configurations in subdirectories of CONFIG. See #1839; added new -a option to makenemo which takes the name of a subdirectory of CONFIG as its argument. Subdirectories will be created later and some configurations moved to use this facility and tidy CONFIG in the process

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_merge_2016/NEMOGCM/CONFIG/makenemo

    r7421 r7633  
    9090x_r=""; 
    9191x_u=""; 
     92x_a=""; 
    9293x_m=""; 
    9394x_t=""; 
     
    123124#- 
    124125#- Choice of the options --- 
    125 while getopts :hd:n:r:u:m:j:e:s:v:t:k: V 
     126while getopts :hd:n:r:u:a:m:j:e:s:v:t:k: V 
    126127do 
    127128    case $V in 
     
    142143        echo " -k 0/1       : used cpp keys check (default = 1 -> check activated)"; 
    143144   echo " -t dir       : temporary directory for compilation" 
     145   echo " -a dir       : alternative sub-directory for configurations (below CONFIG)" 
    144146   echo ""; 
    145147   echo "Example to install a new configuration MY_CONFIG"; 
     
    149151   echo "Available configurations :"; cat ${CONFIG_DIR}/cfg.txt; 
    150152   echo ""; 
    151         echo "Available unsupported (external) configurations :"; cat ${CONFIG_DIR}/uspcfg.txt; 
     153        echo "Available unsupported (external) configurations :";  
     154              if [ -f ${CONFIG_DIR}/uspcfg.txt ] ; then cat ${CONFIG_DIR}/uspcfg.txt; fi; 
    152155   echo ""; 
    153156   echo "Example to install an unsupoorted configuration MY_USP"; 
     
    177180   (r)  x_r=${OPTARG};; 
    178181   (u)  x_u=${OPTARG};; 
     182   (a)  x_a=${OPTARG};; 
    179183   (m)  x_m=${OPTARG};; 
    180184   (j)  x_j=${OPTARG};; 
     
    226230 
    227231#- 
    228 #- Go to NEMOGCM/config directory --- 
     232#- Go to NEMOGCM/CONFIG directory --- 
    229233cd ${CONFIG_DIR} 
    230234 
    231235#- 
    232236#- Initialisation from input --- 
     237export ALT_DIR=${x_a} 
     238if [ ! -z $ALT_DIR ]; then 
     239 if [ -d ${CONFIG_DIR}/${ALT_DIR} ]; then 
     240   export CONFIG_DIR=${CONFIG_DIR}/${ALT_DIR} 
     241#- 
     242#- Go to named subdirectory of the NEMOGCM/CONFIG directory --- 
     243   cd ${CONFIG_DIR} 
     244 fi 
     245fi 
    233246export NEW_CONF=${x_n} 
    234247NBR_PRC=${x_j} 
     
    247260    echo 
    248261    echo "Available unsupported (external) configurations :"  
    249     cat ${CONFIG_DIR}/uspcfg.txt 
     262    if [ -f ${CONFIG_DIR}/uspcfg.txt ] ; then cat ${CONFIG_DIR}/uspcfg.txt; fi; 
    250263    exit 
    251264fi 
Note: See TracChangeset for help on using the changeset viewer.