docs: def check_longitude(self, ds):
          '''
          Check variable(s) that define longitude and are defined correctly according to CF.
  
          CF §4.2 Variables representing longitude must always explicitly include
          the units attribute; there is no default value.  The recommended unit
          of longitude is degrees_east. Also acceptable are degree_east,
          degree_E, degrees_E, degreeE, and degreesE.
  
          Optionally, the longitude type may be indicated additionally by
          providing the standard_name attribute with the value longitude, and/or
          the axis attribute with the value X.
  
          - Four checks per longitude variable
          - (H) longitude has units attribute
          - (M) longitude has an allowed units attribute
          - (L) longitude uses degrees_east (if not in rotated pole)
          - (M) longitude defines either standard_name or axis
  
          :param netCDF4.Dataset ds: An open netCDF dataset
          :rtype: list
          :return: List of results
          '''
  
          # TODO we already have a check_latitude... I'm sure we can make DRYer
  
          ret_val = []
          allowed_lon_units = [
              'degrees_east',
              'degree_east',
              'degree_e',
              'degrees_e',
              'degreee',
              'degreese'
          ]
  
          # Determine the grid mappings in this dataset
          grid_mapping = []
          grid_mapping_variables = cfutil.get_grid_mapping_variables(ds)
          for name in grid_mapping_variables:
              variable = ds.variables[name]
              grid_mapping_name = getattr(variable, 'grid_mapping_name', None)
              if grid_mapping_name:
                  grid_mapping.append(grid_mapping_name)
  
          longitude_variables = cfutil.get_longitude_variables(ds)
          for longitude in longitude_variables:
              variable = ds.variables[longitude]
              units = getattr(variable, 'units', None)
              units_is_string = isinstance(units, basestring)
              standard_name = getattr(variable, 'standard_name', None)
              axis = getattr(variable, 'axis', None)
  
              # NOTE see docstring--should below be 4.1 or 4.2?
              # Check that longitude defines units
              valid_longitude = TestCtx(BaseCheck.HIGH, self.section_titles['4.1'])
              valid_longitude.assert_true(units is not None,
                                          "longitude variable '{}' must define units".format(longitude))
              ret_val.append(valid_longitude.to_result())
  
              # Check that longitude uses allowed units
              allowed_units = TestCtx(BaseCheck.MEDIUM, self.section_titles['4.1'])
              if standard_name == 'grid_longitude':
                  e_n_units = cfutil.VALID_LAT_UNITS | cfutil.VALID_LON_UNITS
                  # check that the units aren't in east and north degrees units,
                  # but are convertible to angular units
                  allowed_units.assert_true(units not in e_n_units and
                                            Unit(units) == Unit('degree'),
                                            "Grid longitude variable '{}' should use degree equivalent units without east or north components. "
                                            "Current units are {}".format(longitude, units))
              else:
                  allowed_units.assert_true(units_is_string and units.lower() in allowed_lon_units,
                                            "longitude variable '{}' should define valid units for longitude"
                                            "".format(longitude))
              ret_val.append(allowed_units.to_result())
  
              # Check that longitude uses degrees_east
              if standard_name == 'longitude' and units != 'degrees_east':
                  # This is only a recommendation and we won't penalize but we
                  # will include a recommended action.
                  msg = ("CF recommends longitude variable '{}' to use units degrees_east"
                         "".format(longitude))
                  recommended_units = Result(BaseCheck.LOW,
                                             (1, 1),
                                             self.section_titles['4.1'], [msg])
                  ret_val.append(recommended_units)
  
              x_variables = ds.get_variables_by_attributes(axis='X')
              # Check that longitude defines either standard_name or axis
              definition = TestCtx(BaseCheck.MEDIUM, self.section_titles['4.1'])
              definition.assert_true(standard_name == 'longitude' or axis == 'Y' or x_variables != [],
                                     "longitude variable '{}' should define standard_name='longitude' or axis='X'"
                                     "".format(longitude))
              ret_val.append(definition.to_result())
  
          return ret_val