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 10115 for NEMO/branches/2018/dev_r5003_MERCATOR6_CRS/NEMOGCM/TOOLS/COMPILE/Fdel_keys.sh – NEMO

Ignore:
Timestamp:
2018-09-12T15:59:13+02:00 (6 years ago)
Author:
cbricaud
Message:

phase 3.6 coarsening branch with nemo_3.6_rev9192

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r5003_MERCATOR6_CRS/NEMOGCM/TOOLS/COMPILE/Fdel_keys.sh

    r4990 r10115  
    6060# 
    6161#- 
    62  echo "Removing keys in : ${NEW_CONF}" 
    63  for i in ${list_del_key} ; do 
    64         if [ "$(echo ${i} | grep -c key_nproc )" -ne 0 ] ; then 
    65            sed -e "s/key_nproc[ij]=.* //"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
    66                 mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
    67                 echo " " 
    68         elif [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ] ; then 
    69          sed -e "s/${i}//"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
    70          mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
    71          echo "deleted key $i in ${NEW_CONF}" 
    72         fi 
    73  done 
    7462 
    75  unset -v list_del_key 
     63echo "Removing keys in : ${NEW_CONF}" 
     64 
     65for i in ${list_del_key} ; do 
     66 
     67     if [ "$(echo ${i} | grep -c key_nproc )" -ne 0 ]                                     ; then 
     68        sed -e "s/key_nproc[ij]=.* //" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm \ 
     69       >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
     70        mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
     71        echo " " 
     72     elif [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ]; then 
     73         sed -e "s/\b${i}\b//" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm \ 
     74        >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
     75         mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
     76         echo "deleted key $i in ${NEW_CONF}" 
     77     fi 
     78 
     79done 
     80 
     81unset -v list_del_key 
Note: See TracChangeset for help on using the changeset viewer.