I just want to point out to folks in this thread that we don't have a convenient way to determine if a variable refers to latitude or longitude. 

CF Standard relies on checking the name, standard name and units for well-known values. I don't have time to implement it fully that way but I think this will cover most cases.