Skip to content

Commit 034a1cc

Browse files
authored
Load bundled areacello in ACCESS-ESM1-6 ocean and sea-ice mappings (#489)
* Use areacello resource for ocean areas * Treat bundled areacello as resource input * Use areacello resource for sea-ice areas
1 parent 42747c9 commit 034a1cc

2 files changed

Lines changed: 131 additions & 42 deletions

File tree

src/access_moppy/mappings/ACCESS-ESM1-6_mappings.json

Lines changed: 126 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4308,8 +4308,7 @@
43084308
"positive": null,
43094309
"model_variables": [
43104310
"temp",
4311-
"rho_dzt",
4312-
"area_t"
4311+
"rho_dzt"
43134312
],
43144313
"calculation": {
43154314
"type": "formula",
@@ -4322,14 +4321,23 @@
43224321
]
43234322
},
43244323
"rho_dzt",
4325-
"area_t"
4324+
{
4325+
"operation": "load_ressource_data",
4326+
"args": [
4327+
{
4328+
"literal": "fx.areacello_ACCESS-ESM.nc"
4329+
},
4330+
{
4331+
"literal": "areacello"
4332+
}
4333+
]
4334+
}
43264335
]
43274336
},
43284337
"CF standard Name": "sea_water_conservative_temperature",
43294338
"model_variable_units": {
43304339
"temp": "K",
4331-
"rho_dzt": "kg m-2",
4332-
"area_t": "m2"
4340+
"rho_dzt": "kg m-2"
43334341
}
43344342
},
43354343
"deptho": {
@@ -5195,23 +5203,31 @@
51955203
"positive": null,
51965204
"model_variables": [
51975205
"salt",
5198-
"rho_dzt",
5199-
"area_t"
5206+
"rho_dzt"
52005207
],
52015208
"calculation": {
52025209
"type": "formula",
52035210
"operation": "calc_global_ave_ocean",
52045211
"args": [
52055212
"salt",
52065213
"rho_dzt",
5207-
"area_t"
5214+
{
5215+
"operation": "load_ressource_data",
5216+
"args": [
5217+
{
5218+
"literal": "fx.areacello_ACCESS-ESM.nc"
5219+
},
5220+
{
5221+
"literal": "areacello"
5222+
}
5223+
]
5224+
}
52085225
]
52095226
},
52105227
"CF standard Name": "sea_water_salinity",
52115228
"model_variable_units": {
52125229
"salt": "psu",
5213-
"rho_dzt": "kg m-2",
5214-
"area_t": "m2"
5230+
"rho_dzt": "kg m-2"
52155231
}
52165232
},
52175233
"somint": {
@@ -5281,23 +5297,31 @@
52815297
"positive": null,
52825298
"model_variables": [
52835299
"surface_salt",
5284-
"rho_dzt",
5285-
"area_t"
5300+
"rho_dzt"
52865301
],
52875302
"calculation": {
52885303
"type": "formula",
52895304
"operation": "calc_global_ave_ocean",
52905305
"args": [
52915306
"surface_salt",
52925307
"rho_dzt",
5293-
"area_t"
5308+
{
5309+
"operation": "load_ressource_data",
5310+
"args": [
5311+
{
5312+
"literal": "fx.areacello_ACCESS-ESM.nc"
5313+
},
5314+
{
5315+
"literal": "areacello"
5316+
}
5317+
]
5318+
}
52945319
]
52955320
},
52965321
"CF standard Name": "sea_surface_salinity",
52975322
"model_variable_units": {
52985323
"surface_salt": "psu",
5299-
"rho_dzt": "kg m-2",
5300-
"area_t": "m2"
5324+
"rho_dzt": "kg m-2"
53015325
}
53025326
},
53035327
"sftof": {
@@ -5404,8 +5428,7 @@
54045428
"positive": null,
54055429
"model_variables": [
54065430
"pot_temp",
5407-
"rho_dzt",
5408-
"area_t"
5431+
"rho_dzt"
54095432
],
54105433
"calculation": {
54115434
"type": "formula",
@@ -5418,14 +5441,23 @@
54185441
]
54195442
},
54205443
"rho_dzt",
5421-
"area_t"
5444+
{
5445+
"operation": "load_ressource_data",
5446+
"args": [
5447+
{
5448+
"literal": "fx.areacello_ACCESS-ESM.nc"
5449+
},
5450+
{
5451+
"literal": "areacello"
5452+
}
5453+
]
5454+
}
54225455
]
54235456
},
54245457
"CF standard Name": "sea_water_potential_temperature",
54255458
"model_variable_units": {
54265459
"pot_temp": "K",
5427-
"rho_dzt": "kg m-2",
5428-
"area_t": "m2"
5460+
"rho_dzt": "kg m-2"
54295461
}
54305462
},
54315463
"thkcello": {
@@ -5510,8 +5542,7 @@
55105542
"positive": null,
55115543
"model_variables": [
55125544
"surface_temp",
5513-
"rho_dzt",
5514-
"area_t"
5545+
"rho_dzt"
55155546
],
55165547
"calculation": {
55175548
"type": "formula",
@@ -5524,14 +5555,23 @@
55245555
]
55255556
},
55265557
"rho_dzt",
5527-
"area_t"
5558+
{
5559+
"operation": "load_ressource_data",
5560+
"args": [
5561+
{
5562+
"literal": "fx.areacello_ACCESS-ESM.nc"
5563+
},
5564+
{
5565+
"literal": "areacello"
5566+
}
5567+
]
5568+
}
55285569
]
55295570
},
55305571
"CF standard Name": "sea_surface_temperature",
55315572
"model_variable_units": {
55325573
"surface_temp": "K",
5533-
"rho_dzt": "kg m-2",
5534-
"area_t": "m2"
5574+
"rho_dzt": "kg m-2"
55355575
}
55365576
},
55375577
"tossq": {
@@ -5624,21 +5664,29 @@
56245664
"units": "m3",
56255665
"positive": null,
56265666
"model_variables": [
5627-
"dzt",
5628-
"area_t"
5667+
"dzt"
56295668
],
56305669
"calculation": {
56315670
"type": "formula",
56325671
"operation": "multiply",
56335672
"args": [
56345673
"dzt",
5635-
"area_t"
5674+
{
5675+
"operation": "load_ressource_data",
5676+
"args": [
5677+
{
5678+
"literal": "fx.areacello_ACCESS-ESM.nc"
5679+
},
5680+
{
5681+
"literal": "areacello"
5682+
}
5683+
]
5684+
}
56365685
]
56375686
},
56385687
"CF standard Name": "",
56395688
"model_variable_units": {
5640-
"dzt": "m",
5641-
"area_t": "m2"
5689+
"dzt": "m"
56425690
}
56435691
},
56445692
"vmo": {
@@ -7009,15 +7057,24 @@
70097057
"units": "1e6 km2",
70107058
"positive": null,
70117059
"model_variables": [
7012-
"aice",
7013-
"t_area"
7060+
"aice"
70147061
],
70157062
"calculation": {
70167063
"type": "formula",
70177064
"operation": "calc_siarean",
70187065
"args": [
70197066
"aice",
7020-
"t_area"
7067+
{
7068+
"operation": "load_ressource_data",
7069+
"args": [
7070+
{
7071+
"literal": "fx.areacello_ACCESS-ESM.nc"
7072+
},
7073+
{
7074+
"literal": "areacello"
7075+
}
7076+
]
7077+
}
70217078
]
70227079
},
70237080
"model_variable_units": {
@@ -7034,15 +7091,24 @@
70347091
"units": "1e6 km2",
70357092
"positive": null,
70367093
"model_variables": [
7037-
"aice",
7038-
"t_area"
7094+
"aice"
70397095
],
70407096
"calculation": {
70417097
"type": "formula",
70427098
"operation": "calc_siareas",
70437099
"args": [
70447100
"aice",
7045-
"t_area"
7101+
{
7102+
"operation": "load_ressource_data",
7103+
"args": [
7104+
{
7105+
"literal": "fx.areacello_ACCESS-ESM.nc"
7106+
},
7107+
{
7108+
"literal": "areacello"
7109+
}
7110+
]
7111+
}
70467112
]
70477113
},
70487114
"model_variable_units": {
@@ -7367,15 +7433,24 @@
73677433
"units": "1e6 km2",
73687434
"positive": null,
73697435
"model_variables": [
7370-
"aice",
7371-
"t_area"
7436+
"aice"
73727437
],
73737438
"calculation": {
73747439
"type": "formula",
73757440
"operation": "calc_siextentn",
73767441
"args": [
73777442
"aice",
7378-
"t_area"
7443+
{
7444+
"operation": "load_ressource_data",
7445+
"args": [
7446+
{
7447+
"literal": "fx.areacello_ACCESS-ESM.nc"
7448+
},
7449+
{
7450+
"literal": "areacello"
7451+
}
7452+
]
7453+
}
73797454
]
73807455
},
73817456
"model_variable_units": {
@@ -7392,15 +7467,24 @@
73927467
"units": "1e6 km2",
73937468
"positive": null,
73947469
"model_variables": [
7395-
"aice",
7396-
"t_area"
7470+
"aice"
73977471
],
73987472
"calculation": {
73997473
"type": "formula",
74007474
"operation": "calc_siextents",
74017475
"args": [
74027476
"aice",
7403-
"t_area"
7477+
{
7478+
"operation": "load_ressource_data",
7479+
"args": [
7480+
{
7481+
"literal": "fx.areacello_ACCESS-ESM.nc"
7482+
},
7483+
{
7484+
"literal": "areacello"
7485+
}
7486+
]
7487+
}
74047488
]
74057489
},
74067490
"model_variable_units": {

tests/integration/test_full_cmorisation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ def _get_input_files_for_compound(
252252
# input — returning None signals the CMORiser to use its resource file.
253253
return None
254254

255+
if compound_name == "Omon.areacello":
256+
# areacello is also bundled for ocean tests, even though it is
257+
# exposed through the Omon table in CMIP7 mappings.
258+
return None
259+
255260
if table_name == "Omon":
256261
# For ocean variables, use only configured external ocean files.
257262
data_root = self._configured_data_root()

0 commit comments

Comments
 (0)