From b2b28306ab175473c1475617f9e5288d0ae2e22a Mon Sep 17 00:00:00 2001 From: Romain Beucher Date: Wed, 8 Jul 2026 11:01:25 +1000 Subject: [PATCH 1/3] Use areacello resource for ocean areas --- .../mappings/ACCESS-ESM1-6_mappings.json | 108 +++++++++++++----- 1 file changed, 78 insertions(+), 30 deletions(-) diff --git a/src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json b/src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json index 21cd8296..a1feabec 100644 --- a/src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json +++ b/src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json @@ -4308,8 +4308,7 @@ "positive": null, "model_variables": [ "temp", - "rho_dzt", - "area_t" + "rho_dzt" ], "calculation": { "type": "formula", @@ -4322,14 +4321,23 @@ ] }, "rho_dzt", - "area_t" + { + "operation": "load_ressource_data", + "args": [ + { + "literal": "fx.areacello_ACCESS-ESM.nc" + }, + { + "literal": "areacello" + } + ] + } ] }, "CF standard Name": "sea_water_conservative_temperature", "model_variable_units": { "temp": "K", - "rho_dzt": "kg m-2", - "area_t": "m2" + "rho_dzt": "kg m-2" } }, "deptho": { @@ -5195,8 +5203,7 @@ "positive": null, "model_variables": [ "salt", - "rho_dzt", - "area_t" + "rho_dzt" ], "calculation": { "type": "formula", @@ -5204,14 +5211,23 @@ "args": [ "salt", "rho_dzt", - "area_t" + { + "operation": "load_ressource_data", + "args": [ + { + "literal": "fx.areacello_ACCESS-ESM.nc" + }, + { + "literal": "areacello" + } + ] + } ] }, "CF standard Name": "sea_water_salinity", "model_variable_units": { "salt": "psu", - "rho_dzt": "kg m-2", - "area_t": "m2" + "rho_dzt": "kg m-2" } }, "somint": { @@ -5281,8 +5297,7 @@ "positive": null, "model_variables": [ "surface_salt", - "rho_dzt", - "area_t" + "rho_dzt" ], "calculation": { "type": "formula", @@ -5290,14 +5305,23 @@ "args": [ "surface_salt", "rho_dzt", - "area_t" + { + "operation": "load_ressource_data", + "args": [ + { + "literal": "fx.areacello_ACCESS-ESM.nc" + }, + { + "literal": "areacello" + } + ] + } ] }, "CF standard Name": "sea_surface_salinity", "model_variable_units": { "surface_salt": "psu", - "rho_dzt": "kg m-2", - "area_t": "m2" + "rho_dzt": "kg m-2" } }, "sftof": { @@ -5404,8 +5428,7 @@ "positive": null, "model_variables": [ "pot_temp", - "rho_dzt", - "area_t" + "rho_dzt" ], "calculation": { "type": "formula", @@ -5418,14 +5441,23 @@ ] }, "rho_dzt", - "area_t" + { + "operation": "load_ressource_data", + "args": [ + { + "literal": "fx.areacello_ACCESS-ESM.nc" + }, + { + "literal": "areacello" + } + ] + } ] }, "CF standard Name": "sea_water_potential_temperature", "model_variable_units": { "pot_temp": "K", - "rho_dzt": "kg m-2", - "area_t": "m2" + "rho_dzt": "kg m-2" } }, "thkcello": { @@ -5510,8 +5542,7 @@ "positive": null, "model_variables": [ "surface_temp", - "rho_dzt", - "area_t" + "rho_dzt" ], "calculation": { "type": "formula", @@ -5524,14 +5555,23 @@ ] }, "rho_dzt", - "area_t" + { + "operation": "load_ressource_data", + "args": [ + { + "literal": "fx.areacello_ACCESS-ESM.nc" + }, + { + "literal": "areacello" + } + ] + } ] }, "CF standard Name": "sea_surface_temperature", "model_variable_units": { "surface_temp": "K", - "rho_dzt": "kg m-2", - "area_t": "m2" + "rho_dzt": "kg m-2" } }, "tossq": { @@ -5624,21 +5664,29 @@ "units": "m3", "positive": null, "model_variables": [ - "dzt", - "area_t" + "dzt" ], "calculation": { "type": "formula", "operation": "multiply", "args": [ "dzt", - "area_t" + { + "operation": "load_ressource_data", + "args": [ + { + "literal": "fx.areacello_ACCESS-ESM.nc" + }, + { + "literal": "areacello" + } + ] + } ] }, "CF standard Name": "", "model_variable_units": { - "dzt": "m", - "area_t": "m2" + "dzt": "m" } }, "vmo": { From f942c668dc2c7b88ea1aa4572cbafacee974f29d Mon Sep 17 00:00:00 2001 From: Romain Beucher Date: Wed, 8 Jul 2026 11:12:55 +1000 Subject: [PATCH 2/3] Treat bundled areacello as resource input --- tests/integration/test_full_cmorisation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/integration/test_full_cmorisation.py b/tests/integration/test_full_cmorisation.py index 0be555cd..78c51e0a 100644 --- a/tests/integration/test_full_cmorisation.py +++ b/tests/integration/test_full_cmorisation.py @@ -252,6 +252,11 @@ def _get_input_files_for_compound( # input — returning None signals the CMORiser to use its resource file. return None + if compound_name == "Omon.areacello": + # areacello is also bundled for ocean tests, even though it is + # exposed through the Omon table in CMIP7 mappings. + return None + if table_name == "Omon": # For ocean variables, use only configured external ocean files. data_root = self._configured_data_root() From f2e7928ce913495423993bbd6964c2d5e662acea Mon Sep 17 00:00:00 2001 From: Romain Beucher Date: Wed, 8 Jul 2026 11:30:55 +1000 Subject: [PATCH 3/3] Use areacello resource for sea-ice areas --- .../mappings/ACCESS-ESM1-6_mappings.json | 60 +++++++++++++++---- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json b/src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json index a1feabec..035adc74 100644 --- a/src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json +++ b/src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json @@ -7057,15 +7057,24 @@ "units": "1e6 km2", "positive": null, "model_variables": [ - "aice", - "t_area" + "aice" ], "calculation": { "type": "formula", "operation": "calc_siarean", "args": [ "aice", - "t_area" + { + "operation": "load_ressource_data", + "args": [ + { + "literal": "fx.areacello_ACCESS-ESM.nc" + }, + { + "literal": "areacello" + } + ] + } ] }, "model_variable_units": { @@ -7082,15 +7091,24 @@ "units": "1e6 km2", "positive": null, "model_variables": [ - "aice", - "t_area" + "aice" ], "calculation": { "type": "formula", "operation": "calc_siareas", "args": [ "aice", - "t_area" + { + "operation": "load_ressource_data", + "args": [ + { + "literal": "fx.areacello_ACCESS-ESM.nc" + }, + { + "literal": "areacello" + } + ] + } ] }, "model_variable_units": { @@ -7415,15 +7433,24 @@ "units": "1e6 km2", "positive": null, "model_variables": [ - "aice", - "t_area" + "aice" ], "calculation": { "type": "formula", "operation": "calc_siextentn", "args": [ "aice", - "t_area" + { + "operation": "load_ressource_data", + "args": [ + { + "literal": "fx.areacello_ACCESS-ESM.nc" + }, + { + "literal": "areacello" + } + ] + } ] }, "model_variable_units": { @@ -7440,15 +7467,24 @@ "units": "1e6 km2", "positive": null, "model_variables": [ - "aice", - "t_area" + "aice" ], "calculation": { "type": "formula", "operation": "calc_siextents", "args": [ "aice", - "t_area" + { + "operation": "load_ressource_data", + "args": [ + { + "literal": "fx.areacello_ACCESS-ESM.nc" + }, + { + "literal": "areacello" + } + ] + } ] }, "model_variable_units": {