コード例 #1
0
ファイル: grid.py プロジェクト: relaxar/mcidasv
def getSliceAtLevel(fieldimpl, level):
    """Extract a 2D horizontal slice from a 3D grid at "Level."
     level is a real number; must be appropriate for the grid.
     param fieldimpl is a grid which may have one or more time steps.  """
    level = float(level)
    ff = GridUtil.sliceAtLevel(fieldimpl, level)
    return ff
コード例 #2
0
def getSliceAtLevel(fieldimpl, level) :
  """Extract a 2D horizontal slice from a 3D grid at "Level."
     level is a real number; must be appropriate for the grid.
     param fieldimpl is a grid which may have one or more time steps.  """
  level = float(level)
  ff = GridUtil.sliceAtLevel(fieldimpl, level)
  return ff
コード例 #3
0
ファイル: grid.py プロジェクト: relaxar/mcidasv
def getSliceAtAltitude(fieldimpl, alt, unit="m"):
    """ Extract a 2D horizontal slice from a 3D grid at the given altitude;
      level is a real number; if unit is supplied, it must
      be compatible with meters (ft, fathoms, etc)
      param fieldimpl is a grid which may have
      one or more time steps.  """
    #import methods from
    from visad import RealType
    from visad import Real
    alt = float(alt)
    unit = Util.parseUnit(unit)
    altitude = Real(RealType.Altitude, alt, unit)
    ff = GridUtil.sliceAtLevel(fieldimpl, altitude)
    return ff
コード例 #4
0
def getSliceAtAltitude(fieldimpl, alt, unit="m") :
  """ Extract a 2D horizontal slice from a 3D grid at the given altitude;
      level is a real number; if unit is supplied, it must
      be compatible with meters (ft, fathoms, etc)
      param fieldimpl is a grid which may have
      one or more time steps.  """
  #import methods from
  from visad import RealType
  from visad import Real
  alt = float(alt)
  unit = Util.parseUnit(unit)
  altitude = Real(RealType.Altitude, alt, unit)
  ff = GridUtil.sliceAtLevel(fieldimpl, altitude)
  return ff