def is_2d_regular_grid(nc, variable):
<EOL>dims = nc.variables[variable].dimensions<EOL>cmatrix = coordinate_dimension_matrix(nc)<EOL>for req in ('<STR_LIT:x>', '<STR_LIT:y>', '<STR_LIT:t>'):<EOL><INDENT>if req not in cmatrix:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>x = get_lon_variable(nc)<EOL>y = get_lat_variable(nc)<EOL>t = get_time_variable(nc)<EOL>if cmatrix['<STR_LIT:x>'] != (x,):<EOL><INDENT>return False<EOL><DEDENT>if cmatrix['<STR_LIT:y>'] != (y,):<EOL><INDENT>return False<EOL><DEDENT>if cmatrix['<STR_LIT:t>'] != (t,):<EOL><INDENT>return False<EOL><DEDENT>if len(dims) == <NUM_LIT:3> and x in dims and y in dims and t in dims:<EOL><INDENT>return True<EOL><DEDENT>return False<EOL>
Returns True if the variable is a 2D Regular grid.

:param netCDF4.Dataset nc: An open netCDF dataset
:param str variable: name of the variable to check