Ignore:
Timestamp:
03/29/12 13:59:09 (12 years ago)
Author:
sdipsl
Message:
  • Use ${date_begin_pack}_${date_end_pack} instead of ${number_pack} in text files name
  • Bugfix in AA_pack_debug. Only occurs when JobName?=Job
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_pack_output

    r616 r617  
    287287          # echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack} 
    288288          if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 
    289             echo ${file} >> liste_pack_${myType}_${number_pack}.txt 
    290             ncdump -h ${file} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> liste_variables_${myType}_${number_pack}.txt 
     289            echo ${file} >> liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt 
     290            ncdump -h ${file} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> liste_variables_${myType}_${date_begin_pack}_${date_end_pack}.txt 
    291291            (( nbfile = nbfile + 1 )) 
    292292          fi 
    293293        done 
    294294        # Select list of variables to work with 
    295         list_var=$( cat liste_variables_${myType}_${number_pack}.txt | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 != nbfile) {print $2}}' | paste -s -d ',' ) 
    296         liste_file_tmp=$( for i in $( cat liste_pack_${myType}_${number_pack}.txt ) ; do basename $i ; done ) 
     295        list_var=$( cat liste_variables_${myType}_${date_begin_pack}_${date_end_pack}.txt | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 != nbfile) {print $2}}' | paste -s -d ',' ) 
     296        liste_file_tmp=$( for i in $( cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt ) ; do basename $i ; done ) 
    297297        # Create packed files 
    298298        IGCM_debug_Print 1 "Ncrcat ongoing for ${dir} and ${myType}" 
    299299        output=${JobName}_${date_begin_pack}_${date_end_pack}_${myType} 
    300         #cat liste_pack_${myType}_${number_pack}.txt | xargs ncrcat -v ${list_var} -o ${output} 
     300        #cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt | xargs ncrcat -v ${list_var} -o ${output} 
    301301        if [ X${list_var} = X ] ; then 
    302302          IGCM_sys_ncrcat -p ${dir} ${liste_file_tmp} --output ${output} 
     
    317317        IGCM_sys_Rm ${output} 
    318318        # Clean files used by ncrcat 
    319         cat liste_pack_${myType}_${number_pack}.txt | xargs rm 
     319        cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt | xargs rm 
    320320        # Save the list of files that has been pack (ncrcat) 
    321321        mv liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt ${STORE_DEBUG} 
Note: See TracChangeset for help on using the changeset viewer.