Changeset 406


Ignore:
Timestamp:
Nov 22, 2011, 10:50:50 AM (13 years ago)
Author:
aslmd
Message:

GRAPHICS: time in the graph loop is now all_time[index_f]. convenient for multiple diagfi with different month length. also fixed something with ltst that is only useful for mesoscale, before a solution is found for GCM files.

File:
1 edited

Legend:

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

    r405 r406  
    9696    print "********** FILES, SLICES, VARS, TOTAL PLOTS: ", len(namefiles), nslices, len(var), numplot
    9797    print "********** MAPMODE: ", mapmode
    98     if fileref is not None:       all_var  = [[]]*(zelen+2) ;  all_varname = [[]]*(zelen+2)  ;  all_namefile = [[]]*(zelen+2)
    99     else:                         all_var  = [[]]*zelen     ;  all_var2  = [[]]*zelen ;  all_title = [[]]*zelen ;  all_varname = [[]]*zelen ; all_namefile = [[]]*zelen
     98    if fileref is not None:       all_var  = [[]]*(zelen+2) ;  all_varname = [[]]*(zelen+2)  ;  all_namefile = [[]]*(zelen+2) ; all_time = [[]]*(zelen+2)
     99    else:                         all_var  = [[]]*zelen     ;  all_var2  = [[]]*zelen ;  all_title = [[]]*zelen ;  all_varname = [[]]*zelen ; all_namefile = [[]]*zelen ; all_time = [[]]*zelen
    100100 
    101101    #################################################################################################
     
    175175      all_varname[k] = varname
    176176      all_namefile[k] = namefile
     177      all_time[k] = time
    177178      if var2: all_var2[k] = getfield(nc,var2)
    178179      ##### SPECIFIC
     
    224225       print "********** nplot", nplot, "itime",itime,"error",error
    225226       
     227       time = all_time[index_f]
     228
    226229       ### Which local time ?
    227230       ltst = localtime ( interv[0]+itime*interv[1], 0.5*(wlon[0]+wlon[1]) )
     
    259262       else:
    260263           indextime = getsindex(stime,((nplot-1)//(nlon*nlat*nvert))%ntime,time)
    261            if indextime is not None: ltst = localtime ( interv[0]+indextime*interv[1], 0.5*(wlon[0]+wlon[1]) ) 
     264           if typefile in ['mesoapi','meso'] and indextime is not None: ltst = localtime ( interv[0]+indextime*interv[1], 0.5*(wlon[0]+wlon[1]) ) 
    262265
    263266       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
Note: See TracChangeset for help on using the changeset viewer.