Changeset 653 for trunk/UTIL/PYTHON


Ignore:
Timestamp:
May 10, 2012, 12:49:00 AM (13 years ago)
Author:
aslmd
Message:

UTIL PYTHON : inimeso.py : a routine to generate input profiles for idealized mesoscale modeling.

Location:
trunk/UTIL/PYTHON/mcd
Files:
2 added
1 edited

Legend:

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

    r639 r653  
    238238      for i in range(nd): self.lat = self.xcoord[i] ; self.update() ; self.put1d(i)
    239239
    240     def profile(self,nd=20,start=0.,end=100000.):
     240    def profile(self,nd=20,start=0.,end=100000.,tabperso=None):
    241241    ### retrieve an altitude slice (profile)
    242242      self.xlabel = "Altitude (m)"
    243       self.prepare(ndx=nd) ; self.xcoord = np.linspace(start,end,nd)
     243      if tabperso is not None: nd = len(tabperso)
     244      self.prepare(ndx=nd)
     245      if tabperso is None:  self.xcoord = np.linspace(start,end,nd)
     246      else:                 self.xcoord = tabperso
    244247      for i in range(nd): self.xz = self.xcoord[i] ; self.update() ; self.put1d(i)
    245248
     
    293296
    294297    ### TODO: makeplot2d, plot2d, passer plot settings, vecteurs, plot loct pas fixe
     298
Note: See TracChangeset for help on using the changeset viewer.