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 transverse mercator.
docstr_tok: ["Test","the","conversion","from","pyresample","area","object","to","CF","grid","mapping",".","Projection","is","transverse","mercator","."]
code: def test_add_grid_mapping_transverse_mercator(self, input_data_arr):
      """Test the conversion from pyresample area object to CF grid mapping.
  
      Projection is transverse mercator.
  
      """
      lat_0 = 36.5
      lon_0 = 15.0
  
      tmerc = AreaDefinition(
          area_id="tmerc",
          description="tmerc",
          proj_id="tmerc",
          projection={
              "proj": "tmerc",
              "ellps": "WGS84",
              "lat_0": 36.5,
              "lon_0": 15.0,
          },
          width=2,
          height=2,
          area_extent=[-1, -1, 1, 1],
      )
  
      tmerc_expected = xr.DataArray(
          data=0,
          attrs={
              "latitude_of_projection_origin": lat_0,
              "longitude_of_central_meridian": lon_0,
              "grid_mapping_name": "transverse_mercator",
              "reference_ellipsoid_name": "WGS 84",
              "false_easting": 0.0,
              "false_northing": 0.0,
          },
      )
  
      input_data_arr.attrs["area"] = tmerc
      new_ds, grid_mapping = _add_grid_mapping(input_data_arr)
      assert new_ds.attrs["grid_mapping"] == "tmerc"
      _gm_matches(grid_mapping, tmerc_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 5 for calling the TestCFArea obj's underlying member method code with example usage: obj.test_add_grid_mapping_transverse_mercator(input_data_arr) without return types