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 5934 for branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc – NEMO

Ignore:
Timestamp:
2015-11-26T21:22:57+01:00 (8 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS18_TRUST Last commits before merging to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting_func.sh

    r5929 r5934  
    7878    local soft_rel str 
    7979 
     80    ## Sourcing environment 
    8081    if [ -n "${TRUS_ENVI}" ]; then 
    81         ## Sourcing environment modulefile (.env) only if module function is set 
    8282   if [[  -e ${TRUS_ENVI}.env && $( declare -F | grep ' module' ) ]]; then 
     83            ## .env file if module function is available 
    8384       . ${TRUS_ENVI}.env 
    8485   else 
     86            ## .path file if existing, if not the given file 
    8587       [ -e ${TRUS_ENVI}.path ] && . ${TRUS_ENVI}.path || . ${TRUS_ENVI} 
    8688   fi 
    8789    fi 
    8890 
    89     ## Problem with `prepend-path` of modulefile that use ':' instead of ' ' as delimiter on LDFLAGS variables 
     91    ## Problem with `prepend-path` of modulefile that use ':' instead of ' ' as delimiter 
    9092    [ $TRUS_HPCC == 'X64_ADA' ] && WRAPPER_LDFLAGS='-L/smplocal/pub/IdrMemMPI/1.4/lib -lidrmem '${WRAPPER_LDFLAGS} 
    9193 
     
    195197diff_restart() { 
    196198    local base_name comp dif file list_comp list_tmsp nb_dom time_step tmsp 
    197     local files_list='' dift=0 
     199    local files_list='' dif_sum=0 
    198200 
    199201    ## Stop if no benchmark files (ie time.step) 
     
    204206    if [ $( find -regex ".*_restart.*[0-9]\.nc" -print -quit ) ]; then 
    205207   base_name=$( find -regex ".*_restart.*[0-9]\.nc"                       \ 
    206                 | sed "s#^\./\(.*\)_[0-9]*_restart.*#\1#"       | sort -u  ) 
     208                | sed "s#^\./\(.*\)_[0-9]*_restart.*#\1#"       | sort -u   ) 
    207209   list_comp=$( find -regex ".*_restart.*[0-9]\.nc"                       \ 
    208                 | sed "s#^.*\(restart[a-z_]*\)_[0-9].*\.nc#\1#" | sort -u  ) 
     210                | sed "s#^.*\(restart[a-z_]*\)_[0-9].*\.nc#\1#" | sort -u   ) 
    209211   list_tmsp=$( find -regex ".*_restart.*[0-9]\.nc"                       \ 
    210                 | sed "s#^.*\([0-9]\{8\}\)_restart.*#\1#"       | sort -u  ) 
     212                | sed "s#^.*\([0-9]\{8\}\)_restart.*#\1#"       | sort -u   ) 
    211213 
    212214   ## Loop on each time step 
     
    220222          ${TRUS_NGCM}/TOOLS/REBUILD_NEMO/rebuild_nemo -t ${TRUS_NPRO} $file ${nb_dom} \ 
    221223         > /dev/null 
     224 
     225           ## Possibility of remaining decomposed restarts (even after rebuild) 
     226          [ $? -eq 0 ] && rm -f ${file}_[0-9]*.nc \ 
     227                        > /dev/null 
     228 
    222229      elif [ ${nb_dom} -eq 0 ]; then 
    223230          TRUS_RSLT='FAILED' && get_out 8 
     
    253260   done 
    254261 
    255         ## List different files for web comment with sum of different parameters 
     262        ## List different files for web comment with sum of different records 
    256263   if [ ${dif_sum} -ne 0 ]; then 
    257264       echo 'Restarts: '${files_list}${dif_sum}' record(s) differ<br>' \ 
Note: See TracChangeset for help on using the changeset viewer.