Changeset 583 for trunk


Ignore:
Timestamp:
Mar 14, 2012, 5:43:07 PM (13 years ago)
Author:
acolaitis
Message:

Python. check_localtime will now re-arrange localtime centered on the largest portion of the day available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/myplot.py

    r581 r583  
    4040    a=-1
    4141    for i in range(len(time)-1):
    42        if time[i] > time[i+1]: a=i
    43     if a >= 0:
     42       if (time[i] > time[i+1]): a=i
     43    if a >= 0 and a < (len(time)-1)/2.:
    4444       print "Sorry, time axis is not regular."
    4545       print "Contourf needs regular axis... recasting"
    4646       for i in range(a+1):
    4747          time[i]=time[i]-24.
     48    if a >= 0 and a >= (len(time)-1)/2.:
     49       print "Sorry, time axis is not regular."
     50       print "Contourf needs regular axis... recasting"
     51       for i in range((len(time)-1) - a):
     52          time[a+1+i]=time[a+1+i]+24.
    4853    return time
    4954
Note: See TracChangeset for help on using the changeset viewer.