polaris.e3sm.init.partitions.read_graph_cell_count

polaris.e3sm.init.partitions.read_graph_cell_count(graph_filename)[source]

The number of cells a METIS graph file describes.

Read from the header rather than by counting lines, which overcounts by the header itself.

Parameters:

graph_filename (str) – The path to the graph file.

Returns:

int – The number of cells (vertices) in the graph.