Changeset 423 for trunk/UTIL/PYTHON


Ignore:
Timestamp:
Nov 24, 2011, 11:31:31 PM (13 years ago)
Author:
aslmd
Message:

GRAPHICS: oops. in previous commit forgot to add if in case ope is NOne (most cases). ok now.

File:
1 edited

Legend:

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

    r422 r423  
    9696    print "********** FILES, SLICES, VARS, TOTAL PLOTS: ", len(namefiles), nslices, len(var), numplot
    9797    print "********** MAPMODE: ", mapmode
    98     if fileref is not None:       zelen = zelen + 2
    99     elif "var" in ope:            zelen = zelen + 1
     98    if ope is not None:
     99        if fileref is not None:       zelen = zelen + 2
     100        elif "var" in ope:            zelen = zelen + 1
    100101    all_var  = [[]]*zelen ; all_var2  = [[]]*zelen ; all_title = [[]]*zelen ; all_varname = [[]]*zelen ; all_namefile = [[]]*zelen ; all_time = [[]]*zelen
    101102 
     
    266267       indexvert = getsindex(svert,((nplot-1)//(nlon*nlat))%nvert,vert)
    267268
    268        if fileref is not None:      index_f = ((nplot-1)//(nlon*nlat*nvert*ntime))%(len(namefiles)+2)  ## OK only 1 var,  see test in the beginning
    269        elif "var" in ope:           index_f = ((nplot-1)//(nlon*nlat*nvert*ntime))%(len(var)+1)        ## OK only 1 file, see test in the beginning
    270        else:                        yeah = len(namefiles)*len(var) ; index_f = ((nplot-1)//(nlon*nlat*nvert*ntime))%yeah
     269       if ope is not None:
     270           if fileref is not None:      index_f = ((nplot-1)//(nlon*nlat*nvert*ntime))%(len(namefiles)+2)  ## OK only 1 var,  see test in the beginning
     271           elif "var" in ope:           index_f = ((nplot-1)//(nlon*nlat*nvert*ntime))%(len(var)+1)        ## OK only 1 file, see test in the beginning
     272       else:                            yeah = len(namefiles)*len(var) ; index_f = ((nplot-1)//(nlon*nlat*nvert*ntime))%yeah
    271273       time = all_time[index_f]
    272274
Note: See TracChangeset for help on using the changeset viewer.