Changeset 1766


Ignore:
Timestamp:
06/11/12 17:25:38 (12 years ago)
Author:
aclsce
Message:

Modified to take into account new name of listfiles.

Location:
TOOLS/PACK_IPSL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/enlarge_my_files.sh

    r1752 r1766  
    6262fi 
    6363 
    64 if [[ ! -d $PATH_SIMU/output_ncrcat || ! -d $PATH_SIMU/output_tar ]] ; then 
     64if [[ ! -d $PATH_SIMU/output_ncrcat || ! -d $PATH_SIMU/output_tar || ! -d $PATH_SIMU/restart_tar || ! -d $PATH_SIMU/store_cp || ! -d $PATH_SIMU/work_cp || ! -d $PATH_SIMU/debug_tar || ! -d $PATH_SIMU/other_tar ]] ; then 
    6565        `dirname $0`/enlarge_my_files.sh -h 
    6666        exit 
     
    129129 
    130130        #----------------------------------- 
    131         # Set output file name from first and last files from the current set 
     131        # Set output file name from list name 
     132 
     133        fileout1=$( basename $set ) 
     134        fileout=${fileout1%.list} 
     135 
    132136        filefirst=`head -n 1 $set` 
    133         fileoutpart1=`basename $filefirst | cut -d'_' -f-2` 
    134         filelast=`tail -n 1 $set` 
    135         fileoutpart2=`basename $filelast | cut -d'_' -f3-` 
    136  
    137137        diroutputfile=`dirname $filefirst | sed -e "s%$dirin%$dirout%"` 
    138 #       outputfile=$diroutputfile/ncrcat_${fileoutpart1}_${fileoutpart2} 
    139         outputfile=$diroutputfile/${fileoutpart1}_${fileoutpart2} 
     138 
     139        outputfile=$diroutputfile/${fileout} 
    140140        mkdir -p $diroutputfile 
    141141        echo "Output file to write: $outputfile" 
     
    158158        # Try 2 times before fire "FAILED" 
    159159        ncrcatcmd=ncrcat 
    160         ncrcatoptions="--md5_digest" 
    161 #       ncrcatoptions="" 
     160#       ncrcatoptions="--md5_digest" 
     161        ncrcatoptions="" 
    162162 
    163163        cat $set | $ncrcatcmd $ncrcatoptions -O -x -v $varstoexclude -o $outputfile > $logfile 2>&1 
     
    222222        #----------------------------------- 
    223223        # Set output file name from list name 
     224 
     225        fileout1=$( basename $set ) 
     226        fileout=${fileout1%.list}.tar 
     227         
    224228        filefirst=`head -n 1 $set` 
    225         dirinputfile=`dirname $filefirst` 
    226         diroutputfile=`dirname $filefirst | sed -e "s%$dirin%$dirout%"` 
     229        diroutputfile=`dirname $filefirst | sed -e "s%$dirin%$dirout%"`  
     230 
     231        outputfile=$diroutputfile/${fileout} 
    227232        mkdir -p $diroutputfile 
    228 #           echo "Output file to write: $outputfile" 
    229         fileout1=$( basename $set ) 
    230         outputfile=${fileout1%.list}.tar 
    231233        echo "Output file to write: $outputfile" 
    232234 
  • TOOLS/PACK_IPSL/launch_ipsl_enlarge.sh

    r1752 r1766  
    3737    DEM_state=$( DEM_read_state ${IGCM_DEM}/config_card.liste ${CONFIG} ) 
    3838 
    39     DEM_write_state ${IGCM_DEM}/config_card.liste ${CONFIG} PackRunning 
    40     export PATH_SIMU=$( dirname $CONFIG ) 
    41     ${EXE_DIR}/enlarge_my_files.sh ${INPUT_DMF_DATA} ${OUTPUT_STORE} ${OUTPUT_WORK} 
     39    if [[ "${DEM_state}" != "WriteListTarDone" ]] ; then 
     40 
     41        DEM_write_state ${IGCM_DEM}/config_card.liste ${CONFIG} PackRunning 
     42        export PATH_SIMU=$( dirname $CONFIG ) 
     43        ${EXE_DIR}/enlarge_my_files.sh ${INPUT_DMF_DATA} ${OUTPUT_STORE} ${OUTPUT_WORK} 
    4244     
    43     DEM_write_state ${IGCM_DEM}/config_card.liste ${CONFIG} PackDone 
     45        DEM_write_state ${IGCM_DEM}/config_card.liste ${CONFIG} PackDone 
     46 
     47    fi 
    4448 
    4549done 
Note: See TracChangeset for help on using the changeset viewer.