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 7002 for branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/COMPILE/Fadd_keys.sh – NEMO

Ignore:
Timestamp:
2016-10-06T14:26:19+02:00 (8 years ago)
Author:
flavoni
Message:

update for SETTE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/COMPILE/Fadd_keys.sh

    r4990 r7002  
    4444# :: 
    4545# 
    46 #  $ ./Fadd_keys.sh ORCA2_LIM add_key "key_mpp_mpi key_nproci=1 key_nprocj=10" 
     46#  $ ./Fadd_keys.sh ORCA2_LIM add_key "key_mpp_rep" 
    4747# 
    4848# 
     
    6565 echo "Adding keys in : ${NEW_CONF}"  
    6666 for i in ${list_add_key} ; do 
    67    if [ "$(echo ${i} | grep -c key_nproc )" -ne 0 ] ; then 
    68       sed -e "s/key_nproc[ij]=.[0-9]* //"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
    69             mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
    70       echo " " 
    71       sed -e "s/$/ ${i}/"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
    72             mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
    73    elif [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ] ; then 
    74    echo "key $i already present in cpp_${NEW_CONF}.fcm"  
     67   if [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ] ; then 
     68      echo "key $i already present in cpp_${NEW_CONF}.fcm"  
    7569   else 
    76    sed -e "s/$/ ${i}/"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
    77    mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
    78    echo "added key $i in ${NEW_CONF}"  
     70      sed -e "s/$/ ${i}/"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
     71      mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
     72      echo "added key $i in ${NEW_CONF}"  
    7973   fi 
    8074 done 
Note: See TracChangeset for help on using the changeset viewer.