- Timestamp:
- 2015-07-02T10:52:12+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh
r5527 r5528 44 44 echo 'Last time step of standard run: '${LAST_TIME_STEP} 45 45 46 if [ $( find -name "*${LAST_TIME_STEP}_restart*.nc" -print -quit ) ]; then 47 base_name=$( find -name "*${LAST_TIME_STEP}_restart*.nc" -print -quit | awk -F/ '{print $NF}' \ 48 | sed "s/^\(.*\)$LAST_TIME_STEP\_restart.*/\1$LAST_TIME_STEP\_/" ) 46 # if [ $( find -name "*${LAST_TIME_STEP}_restart*.nc" -print -quit ) ]; then 47 if [ $( find -regex ".*_0+${LAST_TIME_STEP}_restart.*\.nc" -print -quit ) ]; then 48 # base_name=$( find -name "*${LAST_TIME_STEP}_restart*.nc" -print -quit | awk -F/ '{print $NF}' \ 49 # | sed "s/^\(.*\)$LAST_TIME_STEP\_restart.*/\1$LAST_TIME_STEP\_/" ) 50 base_name=$( find -regex ".*_0+${LAST_TIME_STEP}_restart.*\.nc" -print -quit | awk -F/ '{print $NF}' \ 51 | sed "s/^\(.*\)$LAST_TIME_STEP\_restart.*/\1$LAST_TIME_STEP\_/" ) 49 52 50 53 for comp in restart restart_ice restart_trc; do … … 53 56 nb_dom=$( find -name "${file}_[0-9]*.nc" | wc -l | awk '{print $1}' ) 54 57 if [ ${nb_dom} -gt 1 ]; then 55 ${NEMO_TRBD}/rebuild_nemo -t $NPROC $file ${nb_dom} 56 [ $? -eq 0 ] && rm -f ${base_name} _${comp}_[0-9]*.nc > /dev/null58 ${NEMO_TRBD}/rebuild_nemo -t $NPROC $file ${nb_dom} > /dev/null 59 [ $? -eq 0 ] && rm -f ${base_name}${comp}_[0-9]*.nc > /dev/null 57 60 elif [ ${nb_dom} -eq 0 ]; then 58 61 export ST='FAILED' && get_out 10 … … 61 64 if [ -e ${REFE_DIR}/$file.nc ]; then 62 65 # UNIX `cmp` not suitable (filename & timestamp in .nc file) 63 nc_diff=$( $CDO diffn $file.nc ${REFE_DIR}/$file.nc 2> /dev/null | tail -1 ) 64 65 if [ ! -z "${nc_diff}" ]; then 66 nc_diff=$( $CDO diffn $file.nc ${REFE_DIR}/$file.nc 2> /dev/null \ 67 | awk '/records/ {print $1}' ) 68 69 if [ ${nc_diff} -ne 0 ]; then 66 70 export ST='FAILED' 67 71 printf "$CDO ${nc_diff}\n"
Note: See TracChangeset
for help on using the changeset viewer.