Ignore:
Timestamp:
Feb 20, 2012 1:09:00 PM (10 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/spectra.ncl

    r769 r827  
    220220   t_all = f[:]->time
    221221   nt    = dimsizes(t_all)
    222    delta_t=t_all(nt-1)/nt
     222
     223   if (nt .EQ. 1)then
     224      delta_t=t_all(nt-1)/nt
     225   else
     226      delta_t_array = new(nt-1,double)
     227
     228      do i=0,nt-2
     229         delta_t_array(i) = t_all(i+1)-t_all(i)
     230      end do
     231
     232      delta_t = min(delta_t_array)
     233      delete(delta_t_array)
     234   end if
    223235   
    224236   k_x=f_att->k_x
Note: See TracChangeset for help on using the changeset viewer.