Changeset 407


Ignore:
Timestamp:
Nov 22, 2011, 11:17:24 AM (13 years ago)
Author:
acolaitis
Message:

Corrected small bug related to all_time

File:
1 edited

Legend:

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

    r406 r407  
    225225       print "********** nplot", nplot, "itime",itime,"error",error
    226226       
    227        time = all_time[index_f]
     227#       time = all_time[index_f]
    228228
    229229       ### Which local time ?
     
    250250           m = define_proj(proj,wlon,wlat,back=back,blat=blat)
    251251           x, y = m(lon2d, lat2d)
    252 
    253252####################################################################
    254253       ## get all indexes to be taken into account for this subplot and then reduce field
     
    257256       indexlat  = getsindex(slat,((nplot-1)//nlon)%nlat,lat)
    258257       indexvert = getsindex(svert,((nplot-1)//(nlon*nlat))%nvert,vert)
     258
     259       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
     260       else:                        yeah = len(namefiles)*len(var) ; index_f = ((nplot-1)//(nlon*nlat*nvert*ntime))%yeah
     261       time = all_time[index_f]
     262
    259263       if mapmode == 1 and stime is None:
    260264           indextime = itime
     
    264268           if typefile in ['mesoapi','meso'] and indextime is not None:  ltst = localtime ( interv[0]+indextime*interv[1], 0.5*(wlon[0]+wlon[1]) ) 
    265269
    266        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
    267        else:                        yeah = len(namefiles)*len(var) ; index_f = ((nplot-1)//(nlon*nlat*nvert*ntime))%yeah
    268270####################################################################
    269271
Note: See TracChangeset for help on using the changeset viewer.