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

PYTHON. Very simple modifications to allow for slices with LES files. Performance is not optimized and turbulence computations are not implemented. More to come in time.

File:
1 edited

Legend:

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

    r427 r428  
    9292    numplot = zelen*nslices
    9393    print "********** FILES, SLICES, VARS, TOTAL PLOTS: ", len(namefiles), nslices, len(var), numplot
    94     print "********** MAPMODE: ", mapmode
    9594    if ope is not None:
    9695        if fileref is not None:       zelen = zelen + 2
     
    116115      ### ... TYPEFILE
    117116      typefile = whatkindfile(nc)                                 
     117      if typefile in ['les']:
     118          mapmode=0
     119          winds=False
     120      if firstfile: print "********** MAPMODE: ", mapmode
    118121      if firstfile:                 typefile0 = typefile
    119122      elif typefile != typefile0:   errormess("Not the same kind of files !", [typefile0, typefile])
     
    130133      [lon2d,lat2d] = getcoorddef(nc)
    131134      ### ... PROJECTION
    132       if proj == None:   proj = getproj(nc)                 
     135      if ((proj == None) and (typefile not in ['les'])):   proj = getproj(nc)                 
    133136
    134137##########################################################
     
    139142          else:                           errormess("no time axis found.")
    140143          vert = nc.variables["altitude"][:]
    141       elif typefile in ['meso','mesoapi','geo']:
     144      elif typefile in ['meso','mesoapi','geo','les']:
    142145          if vlon is not None or vlat is not None:   indices = bidimfind(lon2d,lat2d,vlon,vlat) ; print '********** INDICES: ', indices
    143146          if slon is not None: slon[0][0] = indices[0] ; slon[0][1] = indices[0]
     
    329332                     #zelevels = np.linspace(zevmin*(1. + 1.e-7),zevmax*(1. - 1.e-7)) #,num=20)
    330333                     zelevels = np.linspace(zevmin,zevmax,num=ticks)
     334                     print np.array(x).shape
     335                     print np.array(y).shape
     336                     print np.array(what_I_plot).shape
     337
    331338                     if mapmode == 1:       m.contourf( x, y, what_I_plot, zelevels, cmap = palette)
    332339                     elif mapmode == 0:     contourf( x, y, what_I_plot, zelevels, cmap = palette)
Note: See TracChangeset for help on using the changeset viewer.