Changeset 1033 for trunk/libIGCM


Ignore:
Timestamp:
07/29/14 16:24:50 (10 years ago)
Author:
sdipsl
Message:

See #186 issue a clear warning when requesting time series ifrom card but variable has not produced. Is an error in PROD just a
WARNING in other cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_create_ts

    r1031 r1033  
    467467      for var in $( eval echo \${LISTE_VARS_${file}[*]} ) ; do 
    468468        # 
    469         liste_file[${#liste_file[*]}]=${file_path}/${TS_Dir}/${config_UserChoices_JobName}_${date}_${FlagDir}_${var}.nc 
     469        IGCM_sys_TestFileArchive ${file_path}/${TS_Dir}/${config_UserChoices_JobName}_${date}_${FlagDir}_${var}.nc 
     470        if [ $? = 0 ] ; then 
     471          liste_file[${#liste_file[*]}]=${file_path}/${TS_Dir}/${config_UserChoices_JobName}_${date}_${FlagDir}_${var}.nc 
     472        else 
     473          IGCM_debug_Print 1 "WARNING ${file_path}/${TS_Dir}/${config_UserChoices_JobName}_${date}_${FlagDir}_${var}.nc dont exist" 
     474        fi 
    470475        # 
    471476      done 
     
    473478    if [ X${file} != X${NULL_STR} ] ; then 
    474479      IGCM_sys_Get /l liste_file[*] ${RUN_DIR_PATH}/${comp} 
    475  
    476       # Even if some files are missing we tried to continue 
    477       # Either ListVar in compname.card are asked but not present in original history file 
    478       # Either a previous TS task failed 
    479       ExitFlag=false 
    480480      IGCM_debug_Verif_Exit_Post 
    481481    fi 
     
    689689      for var in $( eval echo \${LISTE_VARS_${file}[*]} ) ; do 
    690690        # 
     691        # We skip variables not in the first file of the list. 
     692        # Seems overkill to test thel all... but will do if needed 
     693        ncdump -hv ${var} ${liste_file_tmp[0]} > /dev/null 2>&1 
     694        if [ ! $? = 0 ] ; then 
     695          IGCM_debug_Print 1 "WARNING We skip ${var}, not present within ${liste_file_tmp[0]}" 
     696          continue 
     697        fi 
     698        # 
    691699        if [ "${FLAG_B}" = "TRUE" ] ; then 
    692700          # WE CONCATENATE WITH EXISTING FILES 
     
    694702          file_out=${config_UserChoices_JobName}_${DATE_BUILD_END}_${FlagDir}_${var}.nc 
    695703          IGCM_sys_ncrcat --hst -v ${liste_coord}${var} ${file1} ${liste_file_tmp[*]} ${file_out} 
     704          IGCM_debug_Verif_Exit_Post 
    696705          # 
    697706          IGCM_sys_Rm ${file1} 
     
    701710            [ ! "${file1}" = "${config_UserChoices_JobName}_${DateBegin}_${DATE_FIN_JOB_B}_${FlagDir}_${var}.nc" ] && eval MENAGE \${R_OUT_${comp}}/Analyse/${TS_Dir} ${file1} ${file_out} 
    702711          fi 
    703  
    704           ExitFlag=false 
    705712        else 
    706713          # OR NOT 
    707714          IGCM_sys_ncrcat --hst -v ${liste_coord}${var} ${liste_file_tmp[*]} ${config_UserChoices_JobName}_${DATE_BUILD}_${FlagDir}_${var}.nc 
     715          IGCM_debug_Verif_Exit_Post 
    708716        fi 
    709717 
     
    739747            # Put global history attribut 
    740748            IGCM_sys_ncatted -Oh -a history,global,o,c,"build by libIGCM/create_ts" ${file_out_YE} 
     749            IGCM_debug_Verif_Exit_Post 
    741750            # 
    742751            eval IGCM_sys_Put_Out ${file_out_YE} \${R_OUT_${comp}}/Analyse/TS_MO_YE/${file_out_YE} 
     
    746755          # 
    747756          IGCM_sys_Rm ${file_out} 
    748           ExitFlag=false 
    749757          # 
    750758        fi 
Note: See TracChangeset for help on using the changeset viewer.