Ignore:
Timestamp:
08/29/14 11:15:39 (10 years ago)
Author:
sdipsl
Message:

Fix rebuild_station in the case empty files has been produced. see #212

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh

    r1032 r1046  
    17841784    (( i = i + 1)) 
    17851785    [ ${i} = 1 ] && file_out=${file_in} && continue 
    1786     prefix_invert=$( basename ${file_in} .nc ) 
    1787     IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs ${file_in} ${prefix_invert}_xt.nc 
    1788     list_invert[${#list_invert[*]}]=${prefix_invert}_xt.nc 
     1786    # detect time counter and do the job only if present 
     1787    var_unlim=$(ncdump -h ${file_in} | grep UNLIMITED | cut -d ' ' -f 1) 
     1788    if [ X${var_unlim} = Xtime_counter ] ; then 
     1789      prefix_invert=$( basename ${file_in} .nc ) 
     1790      IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs ${file_in} ${prefix_invert}_xt.nc 
     1791      list_invert[${#list_invert[*]}]=${prefix_invert}_xt.nc 
     1792    fi 
    17891793  done 
    17901794 
Note: See TracChangeset for help on using the changeset viewer.