handle node value
@@ -21,6 +21,7 @@ zone_key_to_type = {
"ET": str,
"DATAPACKING": str,
"ZONETYPE": str,
+ "NV": int,
"VARLOCATION": str,
}
@@ -214,8 +215,8 @@ def _read_zone(line, variables):
is_end = False
if i >= len(line) - 1:
- zone[key] = value
- key, value, read_key = "", "", True
+ if key in zone_key_to_type.keys():
+ zone[key] = zone_key_to_type[key](value)
break
else:
i += 1
@@ -254,7 +255,11 @@ def _read_zone(line, variables):
# Variable locations
is_cell_centered = numpy.zeros(len(variables), dtype=int)
- if zone_format == "FEBLOCK" and "VARLOCATION" in zone.keys():
+ if zone_format == "FEBLOCK":
+ if "NV" in zone.keys():
+ node_value = zone.pop("NV")
+ is_cell_centered[node_value:] = 1
+ elif "VARLOCATION" in zone.keys():
varlocation = zone.pop("VARLOCATION")[1:-1].split(",")
for location in varlocation:
varrange, varloc = location.split("=")
