Ignore:
Timestamp:
07/20/12 11:01:47 (12 years ago)
Author:
jgipsl
Message:

Merged branche modipsl/newdev into modipsl/trunk . Changes are :

  • Cleaning up in mod.def. Fewer configurations are now distributed.
  • ins_job : Added option for creating job for ensembles and updated use of new configuration v5.
  • model :
    • Added coupled configuration IPSLCM5CHS and IPSLCM5CHT.
    • Added option DEFAULT : This option has for purpose to ask the user if he wants to change a component will extracting a configuration. This option is activated by adding DEFAULT in front of component name in mod.def. This option is not used for the moment.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modipsl/trunk/util/model

    r1616 r1828  
    1616#- 
    1717m_n=""; m_a="checkout"; m_v='silencious'; no_tag='false'; 
    18 while getopts :hevH V 
     18# Option -d to take default set up without asking 
     19changeok='yes' 
     20while getopts :hevdH V 
    1921  do 
    2022    case $V in 
     
    2224      (e)  m_a='checkout';; 
    2325      (v)  m_v='verbose';; 
     26      (d)  changeok='no';; 
    2427      (H)  no_tag='true';; 
    2528      (:)  echo ${b_n}" : option $OPTARG : missing value" 1>&2; 
     
    178181  echo ' '; 
    179182  if [ -z "${m_n}" ]; then 
    180     echo ${b_n} 'extracts the components of a model'; 
     183    echo ${b_n} ': This script is used to extract one configuration'; 
    181184    echo ' '; 
    182185    echo 'Usage    :'; 
    183     echo ${b_n} '[-h]'; 
    184     echo ${b_n} '[-h] model_name'; 
    185     echo ${b_n} '[-e] [-H] [-v] model_name'; 
    186     echo 'h            : this help'; 
    187     echo 'h model-name : help on model'; 
    188     echo 'e            : extract model'; 
    189     echo 'H            : suppress the tags and take the HEAD version'; 
    190     echo 'v            : verbose mode'; 
    191     echo 'Defaults     : -e'; 
     186    echo './'${b_n} '[-h]'; 
     187    echo './'${b_n} '[-h] ConfName'; 
     188    echo './'${b_n} '[-v] ConfName'; 
     189    echo '' 
     190    echo 'Arguments :' 
     191    echo 'ConfName       : name of configuration to be extracted'; 
     192    echo '-h             : this help'; 
     193    echo '-h ConfName    : description of configuration ConfName'; 
     194# Meaningless option    echo '-e                : extract model'; 
     195# Does not work    echo 'H                : suppress the tags and take the HEAD version'; 
     196    echo '-v             : verbose mode'; 
     197#    echo 'd                : extract default components without option to change'; 
    192198    echo ' '; 
    193     echo 'model_name in :'; 
     199    echo 'Possible configurations are :'; 
    194200    qi=0; while (( ${qi} < ${#m_x[@]} )); 
    195201      do ((qi=qi+1)); echo ${m_x[${qi}]}; done 
     
    266272    zp=${m_p[${qi}]}; zs=${m_s[${qi}]}; 
    267273    zd=${m_d[${qi}]}; zl=${m_l[${qi}]}; 
     274 
     275# Maybe change some information marked with DEFAULT.  
     276# Check if key word DEFAULT is used in component name 
     277    defcomp=$(echo ${zc} | awk -FDEFAULT: '{print $2}') 
     278    if [ X$defcomp != X ] ; then 
     279        if [ $changeok == 'yes' ] ; then 
     280            echo "=> Default component $defcomp can be changed." 
     281            echo "   Do you want to change this path ? Type new path or return for the above default." 
     282            read newcomp 
     283            echo "   Type revision number for chosen component version or return for $zt default value" 
     284            read newrev 
     285            if [ X$newcomp == X ] ; then 
     286                zc=$defcomp 
     287            else 
     288                zc=$newcomp 
     289            fi 
     290 
     291            if [ X$newrev != X ] ; then 
     292                zt=$newrev 
     293            fi 
     294        else 
     295            # changeok=no : Take default value# 
     296            zc=$defcomp 
     297        fi 
     298    fi 
    268299    [[ ${m_v} = 'verbose' ]] && \ 
    269300     { echo '---'; 
     
    394425  ( IPSLCM5B ) 
    395426  ../modeles/UTIL/fait_config IPSLCM5B ;; 
    396   ( IPSLCM5_v4 ) 
    397   ../modeles/UTIL/fait_config IPSLCM5_v4 ;; 
     427  ( IPSLCM5_v5 ) 
     428  ../modeles/UTIL/fait_config IPSLCM5_v5 ;; 
     429  ( IPSLCM5CHS_v5 ) 
     430  ../modeles/UTIL/fait_config IPSLCM5CHS_v5 ;; 
     431  ( IPSLCM5CHT_v5 ) 
     432  ../modeles/UTIL/fait_config IPSLCM5CHT_v5 ;; 
    398433  (IPSLCM5* ) 
    399434  ../modeles/UTIL/fait_config IPSLCM5 ;; 
     
    401436  ../modeles/UTIL/fait_config IPSL_ESM_v2 ;; 
    402437esac 
     438 
     439#--- Create Makefiles using the script ins_make 
     440#    ins_make will detect target machine among predefined targets in AA_make.gdef and  
     441#    create Makefiles to the corresponding target. 
     442#    ins_make can be re-run afterwards using another target or after editing the  
     443#    AA_make.gdef. ins_make will then overwrite Makefiles already created. 
     444# 
     445./ins_make 
     446 
    403447#--- 
    404448#- That's all folks 
Note: See TracChangeset for help on using the changeset viewer.