Ignore:
Timestamp:
Feb 20, 2012 1:09:00 PM (12 years ago)
Author:
heinze
Message:

allow plotting of data with very small time increments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/NCL/timeseries.ncl

    r769 r827  
    193193   t_all   = f[:]->time
    194194   nt      = dimsizes(t_all)
    195    delta_t = t_all(nt-1)/nt
     195
     196   if (nt .EQ. 1)then
     197      delta_t=t_all(nt-1)/nt
     198   else
     199      delta_t_array = new(nt-1,double)
     200
     201      do i=0,nt-2
     202         delta_t_array(i) = t_all(i+1)-t_all(i)
     203      end do
     204
     205      delta_t = min(delta_t_array)
     206      delete(delta_t_array)
     207   end if
    196208
    197209   if (nt .LE. 1) then
Note: See TracChangeset for help on using the changeset viewer.