def coordinate_dimension_matrix(nc):
retval = {}<EOL>x = get_lon_variable(nc)<EOL>if x:<EOL><INDENT>retval['<STR_LIT:x>'] = nc.variables[x].dimensions<EOL><DEDENT>y = get_lat_variable(nc)<EOL>if y:<EOL><INDENT>retval['<STR_LIT:y>'] = nc.variables[y].dimensions<EOL><DEDENT>z = get_z_variable(nc)<EOL>if z:<EOL><INDENT>retval['<STR_LIT:z>'] = nc.variables[z].dimensions<EOL><DEDENT>t = get_time_variable(nc)<EOL>if t:<EOL><INDENT>retval['<STR_LIT:t>'] = nc.variables[t].dimensions<EOL><DEDENT>return retval<EOL>
Returns a dictionary of coordinates mapped to their dimensions

:param netCDF4.Dataset nc: An open netCDF dataset