class_docstr: Test case for CF Area.
class_docstr_tok: ["Test","case","for","CF","Area","."]
docstr: Test the conversion from pyresample area object to CF grid mapping.
  
  Projection is oblique mercator.
docstr_tok: ["Test","the","conversion","from","pyresample","area","object","to","CF","grid","mapping",".","Projection","is","oblique","mercator","."]
code: def test_add_grid_mapping_oblique_mercator(self, input_data_arr):
      """Test the conversion from pyresample area object to CF grid mapping.
  
      Projection is oblique mercator.
  
      """
      area = AreaDefinition(
          area_id="omerc_otf",
          description="On-the-fly omerc area",
          proj_id="omerc",
          projection={
              "alpha": "9.02638777018478",
              "ellps": "WGS84",
              "gamma": "0",
              "k": "1",
              "lat_0": "-0.256794486098476",
              "lonc": "13.7888658224205",
              "proj": "omerc",
              "units": "m",
          },
          width=2837,
          height=5940,
          area_extent=[
              -1460463.0893,
              3455291.3877,
              1538407.1158,
              9615788.8787,
          ],
      )
  
      omerc_dict = {
          "azimuth_of_central_line": 9.02638777018478,
          "false_easting": 0.0,
          "false_northing": 0.0,
          # 'gamma': 0,  # this is not CF compliant
          "grid_mapping_name": "oblique_mercator",
          "latitude_of_projection_origin": -0.256794486098476,
          "longitude_of_projection_origin": 13.7888658224205,
          # 'prime_meridian_name': "Greenwich",
          "reference_ellipsoid_name": "WGS 84",
      }
      omerc_expected = xr.DataArray(data=0, attrs=omerc_dict)
  
      input_data_arr.attrs["area"] = area
      new_ds, grid_mapping = _add_grid_mapping(input_data_arr)
  
      assert new_ds.attrs["grid_mapping"] == "omerc_otf"
      _gm_matches(grid_mapping, omerc_expected)
  
file_path: satpy/satpy/tests/cf_tests/test_area.py
imports: import dask.array
  import numpy
  import pytest
  import xarray
  from pyresample import AreaDefinition, SwathDefinition
  from satpy.cf.area import _add_grid_mapping, area2cf
label_desc: Use image node_id 7 for calling the TestCFArea obj's underlying member method code with example usage: obj.test_add_grid_mapping_oblique_mercator(input_data_arr) without return types