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
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
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
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