Changeset 653


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
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE_DEV/MANUAL/SRC/advance.tex

    r608 r653  
    104104\paragraph{Inputs/outputs} Large-Eddy Simulations need four input files \ttt{input\_coord}, \ttt{input\_sounding}, \ttt{input\_more}, \ttt{input\_therm} which define initial pressure, temperature, density, winds profiles at the location/season for which simulations are run, along with information about this location/season. Typical files are available upon request, or you might simply build your own profiles using the Mars Climate Database (see the sample \ttt{scilab} script \ttt{wrf\_sounding.sci} in \ttt{\$MMM/SIMU/RUN}). Examples for \ttt{input\_*} files are provided in \ttt{\$MMM/SRC/LES/modif\_mars/DEF} and correspond to the cases run in the study by \textit{Spiga et al.} [2010].
    105105
     106%% now python inimeso.py in UTIL/PYTHON
     107
    106108\begin{citemize}
    107109\item \ttt{input\_coord} contains longitude, latitude, $L_s$ and local time;
  • 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.