From f873ac102c1c5e3ff06e041f4ef757a80dea584f Mon Sep 17 00:00:00 2001 From: Manuel Schlund Date: Mon, 8 Jun 2020 12:28:16 +0200 Subject: [PATCH 1/2] Fixed #448 --- esmvalcore/cmor/table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esmvalcore/cmor/table.py b/esmvalcore/cmor/table.py index ca2037a2eb..fe8c3e7097 100644 --- a/esmvalcore/cmor/table.py +++ b/esmvalcore/cmor/table.py @@ -733,7 +733,7 @@ def get_variable(self, table, short_name, derived=False): if var_info: mip_info = self.get_table(table) - var_info.copy() + var_info = var_info.copy() if mip_info: var_info.frequency = mip_info.frequency return var_info From a3e499444d8a31548e678512d85d3fad072c9692 Mon Sep 17 00:00:00 2001 From: Javier Vegas-Regidor Date: Mon, 8 Jun 2020 16:09:25 +0200 Subject: [PATCH 2/2] Fix bug when reading custom variables --- esmvalcore/cmor/table.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esmvalcore/cmor/table.py b/esmvalcore/cmor/table.py index fe8c3e7097..07a1ed86bf 100644 --- a/esmvalcore/cmor/table.py +++ b/esmvalcore/cmor/table.py @@ -773,8 +773,8 @@ def _read_coordinate(self, value): def _read_variable(self, short_name, frequency): var = super()._read_variable(short_name, frequency) - var.modeling_realm = None var.frequency = None + var.modeling_realm = None return var @@ -872,7 +872,7 @@ def _read_table_file(self, table_file, table=None): self.coords[value] = self._read_coordinate(value) continue elif key == 'variable_entry': - table[value] = self._read_variable(value, None) + table[value] = self._read_variable(value, '') continue if not self._read_line(): return