Changeset 2120 in lmdz_wrf for trunk


Ignore:
Timestamp:
Aug 31, 2018, 3:11:29 PM (7 years ago)
Author:
lfita
Message:

Adding 'runmean' in `draw_lines_time'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing.py

    r2118 r2120  
    24332433        [pointfreq]: frequency of point plotting (every given number of values),
    24342434          'all' to plot all values using all time steps
     2435          'runmean',[Nsteps]: computing a running mean of [Nsteps] along all values
    24352436        [period]: which period of the data to plot:
    24362437          '-1': all period of data
     
    27212722                print '    period in file:',np.min(reftvals), np.max(reftvals)
    27222723
    2723             varvalues.append(vvobj[ibeg:iend])
     2724            if pointfreq0[0:7] == 'runmean':
     2725                Nstps = int(pointfreq0.split(',')[1])
     2726                varvalues.append(gen.runmean(vvobj[ibeg:iend], Nstps))
     2727            else:
     2728                varvalues.append(vvobj[ibeg:iend])
    27242729            dimvalues.append(reftvals[ibeg:iend])
    27252730            mindvals = np.min(reftvals[ibeg:iend])
     
    27742779        legvals = None
    27752780
    2776     if pointfreq0 == 'all':
     2781    if pointfreq0 == 'all' or pointfreq0[0:7] == 'runmean':
    27772782        pointfreq = None
    27782783    else:
Note: See TracChangeset for help on using the changeset viewer.