"""
Read/write tools for nonuniform electric field .grd format.
Matthew Grawe, grawe2 (at) illinois.edu
January 2017
"""

import numpy as np

def next_line(grd_file):
	"""
	next_line
	Function returns the next line in the file
	that is not a blank line, unless the line is
	'', which is a typical EOF marker.
	"""

	done   = False
	while not done:
		line = grd_file.readline()
		if line == '':
			return line, False
		elif line.strip():
			return line, True


def read_block(grd_file, n_lats):

	lats = []