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/cross_sections.ncl

    r770 r827  
    419419   ; *********************************************
    420420
    421    t_all = f[:]->time
    422    nt = dimsizes(t_all)
    423    delta_t = t_all(nt-1)/nt
     421   t_all         = f[:]->time
     422   nt            = dimsizes(t_all)
     423
     424   if (nt .EQ. 1)then
     425      delta_t=t_all(nt-1)/nt
     426   else
     427      delta_t_array = new(nt-1,double)
     428
     429      do i=0,nt-2
     430         delta_t_array(i) = t_all(i+1)-t_all(i)
     431      end do
     432
     433      delta_t = min(delta_t_array)
     434      delete(delta_t_array)
     435   end if
     436
    424437
    425438   ; ****************************************************       
Note: See TracChangeset for help on using the changeset viewer.