Changeset 584


Ignore:
Timestamp:
03/19/12 10:36:39 (12 years ago)
Author:
sdipsl
Message:
  • tune ncrcat command (exclude variables that are not in all files, instead of including those that are in every file because of command line lenght issues on titane)
  • get the mesh_mask from the buffer if necessary
  • correct some typo
  • small modification due to the new .atlas_env_titane_ksh
  • pack_output works in stand-alone ==> need to revisit dependancies with asynchronous rebuild and create_ts/create_se to have it online.
Location:
trunk/libIGCM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_pack_output

    r583 r584  
    272272 
    273273  for comp in ${config_ListOfComponents[*]} ; do 
    274     dirList=$( find ${BUFR}/${comp}/ -maxdepth 1 -mindepth 1 -type d ) 
    275     for dir in ${dirlist} ; do 
     274    dirList=$( find ${R_BUFR}/${comp}/Output -maxdepth 1 -mindepth 1 -type d ) 
     275    for dir in ${dirList} ; do 
    276276      # dirID is like ATM.Output.MO 
    277277      dirID=$( echo $dir | sed "s:${R_BUFR}/::" | sed "s:/:.:g" ) 
     
    284284      for myType in ${fileType} ; do 
    285285        grep ${myType} liste_files.${dirID}.txt > liste_files.${dirID}.${myType}.txt 
     286        nbfile=0 
    286287        for file in $( gawk '{print $11}' liste_files.${dirID}.${myType}.txt ); do 
    287288          extract_date_file=$( echo ${file}  | sed -e "s/.*${JobName}_[0-9]*_//" ) 
    288289          date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 
    289           # echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack}  
     290          # echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack} 
    290291          if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then  
    291292            echo ${file} >> liste_pack_${myType}_${number_pack}.txt 
     293            ncdump -h ${file} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> liste_variables_${myType}_${number_pack}.txt 
     294            (( nbfile = nbfile + 1 )) 
    292295          fi 
    293296        done 
     297        # Select list of variables to work with 
     298        list_var=$( cat liste_variables_${myType}_${number_pack}.txt | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 != nbfile) {print $2}}' | paste -s -d ',' ) 
     299        liste_file_tmp=$( for i in $( cat liste_pack_${myType}_${number_pack}.txt ) ; do basename $i ; done ) 
    294300        # Create packed files 
    295301        IGCM_debug_Print 1 "Ncrcat ongoing for ${dir} and ${myType}" 
    296302        output=${JobName}_${date_begin_pack}_${date_end_pack}_${myType} 
    297         cat liste_pack_${myType}_${number_pack}.txt | xargs IGCM_sys_ncrcat -o ${output} 
     303        #cat liste_pack_${myType}_${number_pack}.txt | xargs ncrcat -v ${list_var} -o ${output} 
     304        if [ X${list_var} = X ] ; then 
     305          ncrcat --omp_num_threads 4 -p ${dir} ${liste_file_tmp} --output ${output} 
     306        else 
     307          ncrcat --omp_num_threads 4 -x -v ${list_var} -p ${dir} ${liste_file_tmp} --output ${output} 
     308        fi 
    298309        # ------------------------------------------------------------------ 
    299310        # Test if all was right before proceeding further 
     
    301312        IGCM_debug_Verif_Exit_Post 
    302313        # Save it 
    303         IGCM_sys_Put_Out ${output} ${R_SAVE}/${dir} 
     314        IGCM_sys_Put_Out ${output} ${R_SAVE}/$( echo $dir | sed "s:${R_BUFR}/::" )/${output} 
    304315        # ------------------------------------------------------------------ 
    305316        # Test if all was right before proceeding further 
  • trunk/libIGCM/libIGCM_post/IGCM_Patch_20091118_mask.ksh

    r373 r584  
    2020    IGCM_debug_PushStack "IGCM_Patch_mask" $@ 
    2121 
    22     [ -f ${config_UserChoices_JobName}_mesh_mask.nc ] || IGCM_sys_Get ${R_SAVE}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc . 
     22    if [ -f ${config_UserChoices_JobName}_mesh_mask.nc ] ; then 
     23      if [ -f ${R_SAVE}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc ] ; then 
     24        IGCM_sys_Get ${R_SAVE}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc . 
     25      elif [ -f ${R_BUFR}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc ] ; then 
     26        IGCM_sys_Get ${R_BUFR}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc . 
     27      fi 
     28    else 
     29      IGCM_debug_Exit "mesh_mask can not be found. Stop." 
     30      IGCM_debug_Exit "neither here ${R_SAVE}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc" 
     31      IGCM_debug_Exit "nor here ${R_BUFR}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc" 
     32      IGCM_debug_Verif_Exit_Post 
     33    fi 
    2334 
    2435    filename=${1} 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh

    r553 r584  
    9292. /home/cont003/p86ipsl/.atlas_env_titane_ksh 
    9393 
    94 module switch nco/4.0.8 nco/3.9.4_netcdf4 
     94module switch nco/3.9.4 nco/3.9.4_netcdf4 
    9595 
    9696#==================================================== 
Note: See TracChangeset for help on using the changeset viewer.