diff --git a/esmvalcore/cmor/tables/custom/CMOR_ch4s.dat b/esmvalcore/cmor/tables/custom/CMOR_ch4s.dat new file mode 100644 index 0000000000..cdc164a3bb --- /dev/null +++ b/esmvalcore/cmor/tables/custom/CMOR_ch4s.dat @@ -0,0 +1,22 @@ +SOURCE: CMIP5 +!============ +variable_entry: ch4s +!============ +modeling_realm: atmos +!---------------------------------- +! Variable attributes: +!---------------------------------- +standard_name: mole_fraction_of_methane_in_air +units: 1e-09 +cell_methods: area: time: mean +cell_measures: area: areacella +long_name: Atmosphere CH4 surface +comment: As ch4, but only at the surface +!---------------------------------- +! Additional variable information: +!---------------------------------- +dimensions: longitude latitude time +out_name: ch4s +type: real +!---------------------------------- +! diff --git a/tests/integration/cmor/test_table.py b/tests/integration/cmor/test_table.py index f3845633ae..7b25b8d719 100644 --- a/tests/integration/cmor/test_table.py +++ b/tests/integration/cmor/test_table.py @@ -476,3 +476,12 @@ def test_get_variable_tasaga(self): self.assertEqual(var.long_name, 'Global-mean Near-Surface Air Temperature Anomaly') self.assertEqual(var.units, 'K') + + def test_get_variable_ch4s(self): + """Get tas variable.""" + CustomInfo() + var = self.variables_info.get_variable('Amon', 'ch4s') + self.assertEqual(var.short_name, 'ch4s') + self.assertEqual(var.long_name, + 'Atmosphere CH4 surface') + self.assertEqual(var.units, '1e-09')