示例#1
0
文件: grid.py 项目: relaxar/mcidasv
def noUnit(field):
    """ remove the units from a grid """
    import visad
    from visad import CommonUnit
    newunit = CommonUnit.promiscuous
    rt = GridUtil.getParamType(field).getRealComponents()[0]
    newType = Util.makeRealType(rt.getName(), visad.CommonUnit.promiscuous)
    return GridUtil.setParamType(field, newType, 0)
示例#2
0
def noUnit(field):
  """ remove the units from a grid """
  import visad
  from visad import CommonUnit
  newunit = CommonUnit.promiscuous
  rt = GridUtil.getParamType(field).getRealComponents()[0]
  newType = Util.makeRealType(rt.getName(), visad.CommonUnit.promiscuous)
  return GridUtil.setParamType(field, newType,0)
示例#3
0
文件: grid.py 项目: relaxar/mcidasv
def newUnit(field, varname, unitname):
    """ set the name and unit on a grid """
    newunit = Util.parseUnit(unitname)
    newType = Util.makeRealType(varname, newunit)
    return GridUtil.setParamType(field, newType, 0)
示例#4
0
def newUnit(field, varname, unitname):
  """ set the name and unit on a grid """
  newunit = Util.parseUnit(unitname)
  newType = Util.makeRealType(varname, newunit)
  return GridUtil.setParamType(field, newType,0)