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 does not have a corresponding CF representation (e.g. COSMO).
docstr_tok: ["Test","the","conversion","from","pyresample","area","object","to","CF","grid","mapping",".","Projection","does","not","have","a","corresponding","CF","representation","(","e.g",".","COSMO",")","."]
code: def test_add_grid_mapping_no_cf_repr(self, input_data_arr):
      """Test the conversion from pyresample area object to CF grid mapping.
  
      Projection does not have a corresponding CF representation (e.g. COSMO).
  
      """
      cosmo7 = AreaDefinition(
          area_id="cosmo7",
          description="cosmo7",
          proj_id="cosmo7",
          projection={
              "proj": "ob_tran",
              "ellps": "WGS84",
              "lat_0": 46,
              "lon_0": 4.535,
              "o_proj": "stere",
              "o_lat_p": 90,
              "o_lon_p": -5.465,
          },
          width=597,
          height=510,
          area_extent=[-1812933, -1003565, 814056, 1243448],
      )
      input_data_arr.attrs["area"] = cosmo7
  
      new_ds, grid_mapping = _add_grid_mapping(input_data_arr)
      assert "crs_wkt" in grid_mapping.attrs
      wkt = grid_mapping.attrs["crs_wkt"]
      assert 'ELLIPSOID["WGS 84"' in wkt
      assert 'PARAMETER["lat_0",46' in wkt
      assert 'PARAMETER["lon_0",4.535' in wkt
      assert 'PARAMETER["o_lat_p",90' in wkt
      assert 'PARAMETER["o_lon_p",-5.465' in wkt
      assert new_ds.attrs["grid_mapping"] == "cosmo7"
  
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 4 for calling the TestCFArea obj's underlying member method code with example usage: obj.test_add_grid_mapping_no_cf_repr(input_data_arr) without return types