args = parser.parse_args()

if True:
    in_path = "test_data/usgs.h5m"
else:
    in_path = "test_data/ncom.h5m"

mesh = iMesh.Mesh()
mesh.load(in_path)

t_tag = mesh.getTagHandle("TIME_DATA")
t_topo_tag = mesh.getTagHandle("TIMESTEP_TOPO")
# iBase.EntitySet returned from the tag must be 'reinitialized' as an iMesh.EntitySet
time_topo_set = iMesh.EntitySet(t_tag[mesh.rootSet], mesh)

utils.report_entset_contents(mesh, time_topo_set)

# Get global and variable attributes
var_atts = {}
gbl_atts = {}
tags = mesh.getAllTags(mesh.rootSet)
for t in tags:
    val = t[mesh.rootSet]
    if val.dtype == numpy.int8:
        val = val.tostring()

        #    print "%s : %s" % (t.name, val)

    if t.name.startswith("GBL_ATT_"):
        gbl_atts[t.name.replace("GBL_ATT_", "")] = val
    elif t.name.startswith("VAR_ATT_"):
else:
    in_path = 'test_data/ncom.h5m'

mesh=iMesh.Mesh()
mesh.load(in_path)

#ent_sets=mesh.getEntSets()
#for es in ent_sets:
#    report_entset_contents(es)

t_tag=mesh.getTagHandle('TIME_DATA')
# iBase.EntitySet returned from the tag must be 'reinitialized' as an iMesh.EntitySet
t_set=iMesh.EntitySet(t_tag[mesh.rootSet],mesh)

#t_set=mesh.getEntSets()[0]
utils.report_entset_contents(mesh, t_set)

# Get global and variable attributes
var_atts={}
gbl_atts={}
tags=mesh.getAllTags(mesh.rootSet)
for t in tags:
    val = t[mesh.rootSet]
    if val.dtype == numpy.int8:
        val = val.tostring()

        #    print "%s : %s" % (t.name, val)

    if t.name.startswith('GBL_ATT_'):
        gbl_atts[t.name.replace('GBL_ATT_','')]=val
    elif t.name.startswith('VAR_ATT_'):