From c0420ea4ead0be199d1fb4adb44c32efe185c150 Mon Sep 17 00:00:00 2001 From: Jared Lewis Date: Wed, 22 Jan 2025 11:01:39 +1100 Subject: [PATCH 1/6] chore: Update sample data to v0.3.0 --- Makefile | 2 +- .../ref/src/cmip_ref/datasets/sample_data.txt | 36 ++++++++++++------- packages/ref/src/cmip_ref/testing.py | 2 +- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 3c23632..3f9f31b 100644 --- a/Makefile +++ b/Makefile @@ -123,4 +123,4 @@ fetch-test-data: ## Download any data needed by the test suite .PHONY: update-test-data-registry update-test-data-registry: ## Update the test data registry - curl --output packages/ref/src/ref/datasets/sample_data.txt https://raw.githubusercontent.com/CMIP-REF/ref-sample-data/refs/heads/main/registry.txt + curl --output packages/ref/src/cmip_ref/datasets/sample_data.txt https://raw.githubusercontent.com/CMIP-REF/ref-sample-data/refs/heads/main/registry.txt diff --git a/packages/ref/src/cmip_ref/datasets/sample_data.txt b/packages/ref/src/cmip_ref/datasets/sample_data.txt index bf219e0..bd3e3a9 100644 --- a/packages/ref/src/cmip_ref/datasets/sample_data.txt +++ b/packages/ref/src/cmip_ref/datasets/sample_data.txt @@ -1,13 +1,23 @@ -CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rlut/gn/v20191115/rlut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc 95341df80de95ddb0b45da11aed67db771414fff94508687fb30fce63b82c104 -CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsdt/gn/v20191115/rsdt_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc 25e9e817a05ffab4a2b073078f6be0e52096fa9da8eb55f009d079842c708614 -CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsut/gn/v20191115/rsut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc 139c4c59d98c737ce2d7ca777e52e35e38d49fcb8b08dd98175ed0f1354f8e75 -CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc be4a191c75b3643aad34238970c0587128a3852694f2c61425b4bbda42e5ff08 -CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/fx/areacella/gn/v20191115/areacella_fx_ACCESS-ESM1-5_historical_r1i1p1f1_gn.nc d9d07cacc65c196b9ec47d60cabcf86fd397b1e22063a32c3798a98ee3dfb16e -CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rlut/gn/v20210318/rlut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc 1083d92079e9c40d3797ecc4235df1c86c99af7ca3b9458b21f1d34054351041 -CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsdt/gn/v20210318/rsdt_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-210012.nc 9f9ae50efc55f4e18dc174d7c3af10f4e67a391c84d81cdb6ba574fa8b61b276 -CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsdt/gn/v20210318/rsdt_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc 2299e10eb6ccf190fe07f7b60aa40b8700f7f964ca68c989f3572abe39eb22c7 -CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsut/gn/v20210318/rsut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-210012.nc 5141bb64d6f457550d8bf429a4233af1bd706ed8b2131fc2ef329bcb6db7a236 -CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsut/gn/v20210318/rsut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc 49fbd6c0d7b8c0d10a270e8d88191764c02ba651f80b464605dfa5b0221d622b -CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/tas/gn/v20210318/tas_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-210012.nc bff52adef26d48d4b747368816aff3712c606cafa92f6b78f4974f23efcba510 -CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/tas/gn/v20210318/tas_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc b61faa48540472be5b208a4ecf40873860c1d4cfb7f50a4dff4ac17ee2ba4f73 -CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/fx/areacella/gn/v20210318/areacella_fx_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn.nc e8e3b873d9ba115974329c0f7785c9e30dcca66007fa973c22cd734efc46dcfd +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/1pctCO2/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_1pctCO2_r1i1p1f1_gn_010101-018012.nc ab365f0663c4e33e36fc24c826e2017ddf9ef3da281205fcc2d3ab9f86085338 +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/1pctCO2/r1i1p1f1/fx/areacella/gn/v20191115/areacella_fx_ACCESS-ESM1-5_1pctCO2_r1i1p1f1_gn.nc 3a6c3a6bb56da0ef6b0d89d4e32812f2942b00641f1fe647cf8237efd52afe0b +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/rlut/gn/v20191115/rlut_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc 989260da3a40e9938187aa764b325ca6f680817771d2af7114e817e21e54d3d4 +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/rsdt/gn/v20191115/rsdt_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc d814794a1d5e0e1fdea6e480d3a0a4af10cf3cfea7a8c35ed8be2725810c2cf5 +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/rsut/gn/v20191115/rsut_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc f5b18ac52742a467bf8c9f7c8000349bc535b9967d672c05f8b01ecb84a3216b +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc d7813e452ebc320d724829a651705c2351ad6e271422573a77ccd1e358b6b6c3 +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/fx/areacella/gn/v20191115/areacella_fx_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn.nc d5ccb8cc146d8682b602f7d531be8b3edfdad6d36be284d6ad24528ebecad24a +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rlut/gn/v20191115/rlut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc abd885fd088b1b2db74d7f1244427486f8d2c47ae0fa13ba5b7ddb0a3ddc429b +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsdt/gn/v20191115/rsdt_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc 53096cef9aacdbefd4e32dabe3705843d21979ba7cc06db9efd30528105effc9 +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsut/gn/v20191115/rsut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc 0d9373c0824018caa838ce98b3a65d81c411113c60b78194eebc876bd183adaa +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc 8aa1d145b1218634b7d5fb2ae1cc96a7218ee2ff05fa57ac96fa2e9d02eb282e +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Omon/tos/gn/v20191115/tos_Omon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc 2dd6a3828136dd5ef427d68e6115f8cc9699a2034adeab17da5bd83c59d2c48c +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/fx/areacella/gn/v20191115/areacella_fx_ACCESS-ESM1-5_historical_r1i1p1f1_gn.nc b4ed6bfb22c15541f4d66ca57bee4e2e9c06c6c50676db703b6712565a5c7abf +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/rlut/gn/v20210316/rlut_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-012512.nc 4bcdb5108c884a13299cc855a3a78ff1af1a28c45b00dc9a388d510035328886 +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/rsdt/gn/v20210316/rsdt_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-012512.nc bc1ba4b5b91dc40f80318b73dedffd75daec25e317167119794366ea7d48779d +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/rsut/gn/v20210316/rsut_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-012512.nc 9c236e425fc94a067888f5ae48377eb75cc29f9b4a697621ea68a6c46c1aa0f4 +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/tas/gn/v20210316/tas_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-018012.nc cacab3637a4cc94e5cc6d7267ec4c6f96cd5d618b0f8a097005dbfe89b2c5eb9 +CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/fx/areacella/gn/v20210316/areacella_fx_ACCESS-ESM1-5_piControl_r1i1p1f1_gn.nc fbdf118bd3677eef2a3a63993cf6492a74c34b2a6650bdb6018711ad66e36594 +CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsdt/gn/v20210318/rsdt_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc 187d291702e4a969792fedca9db832657d96e385ea67747cf6432e7eab1af779 +CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsut/gn/v20210318/rsut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc 725c164d0ff33f6443c58eb24a354715525decf051d88df04ec70ee1a358cc56 +CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/tas/gn/v20210318/tas_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc 3124671936cb2554af0a1f48b814fa8bb186a0ee2af6bcc86b5cb126b107d7a2 +CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Omon/tos/gn/v20210318/tos_Omon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc 10d13b1250f5483e5d6105b0dd811658849324c03f27539b83642062a1151b93 +CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/fx/areacella/gn/v20210318/areacella_fx_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn.nc 064b48e5b2971cb4e8edad95b27fbbfc2f6dcdc2de99e2df2944d9c2b0db4910 diff --git a/packages/ref/src/cmip_ref/testing.py b/packages/ref/src/cmip_ref/testing.py index a5be7b9..441ee9b 100644 --- a/packages/ref/src/cmip_ref/testing.py +++ b/packages/ref/src/cmip_ref/testing.py @@ -39,7 +39,7 @@ def _build_sample_data_registry(sample_data_version: str) -> pooch.Pooch: TEST_DATA_DIR = _determine_test_directory() -SAMPLE_DATA_VERSION = "v0.2.1" +SAMPLE_DATA_VERSION = "v0.3.0" def fetch_sample_data(version: str = SAMPLE_DATA_VERSION) -> None: From 8e7dfc1a54b1218f6662e6250bb707cc87712707 Mon Sep 17 00:00:00 2001 From: Jared Lewis Date: Wed, 22 Jan 2025 11:12:37 +1100 Subject: [PATCH 2/6] test: Make the test suite more resilient to changes in the sample data This adds additional regression tests --- packages/ref-core/tests/unit/test_datasets.py | 21 +- .../test_datasets/dataset_collection_hash.yml | 2 +- .../test_datasets/metric_dataset_hash.yml | 2 +- packages/ref/tests/unit/cli/test_datasets.py | 4 +- .../ref/tests/unit/datasets/test_cmip6.py | 3 - .../datasets/test_cmip6/cmip6_catalog_db.yml | 504 +++++++++++++--- .../test_cmip6/cmip6_catalog_local.yml | 536 +++++++++++++++--- packages/ref/tests/unit/test_solver.py | 30 +- .../unit/test_solver/test_solve_metrics.yml | 27 + 9 files changed, 938 insertions(+), 191 deletions(-) create mode 100644 packages/ref/tests/unit/test_solver/test_solve_metrics.yml diff --git a/packages/ref-core/tests/unit/test_datasets.py b/packages/ref-core/tests/unit/test_datasets.py index 792113d..305797d 100644 --- a/packages/ref-core/tests/unit/test_datasets.py +++ b/packages/ref-core/tests/unit/test_datasets.py @@ -6,7 +6,7 @@ @pytest.fixture def dataset_collection(cmip6_data_catalog) -> DatasetCollection: return DatasetCollection( - cmip6_data_catalog, + cmip6_data_catalog[cmip6_data_catalog.variable_id == "tas"], "instance_id", ) @@ -32,18 +32,19 @@ def test_python_hash(self, metric_dataset, cmip6_data_catalog, data_regression): assert hash(metric_dataset.hash) == dataset_hash assert isinstance(dataset_hash, int) - assert dataset_hash == hash( - MetricDataset({SourceDatasetType.CMIP6: DatasetCollection(cmip6_data_catalog, "instance_id")}) - ) + # Check that the hash changes if the dataset changes assert dataset_hash != hash( MetricDataset( { SourceDatasetType.CMIP6: DatasetCollection( - cmip6_data_catalog[cmip6_data_catalog.variable_id == "tas"], "instance_id" + cmip6_data_catalog[cmip6_data_catalog.variable_id != "tas"], "instance_id" ) } ) ) + + # This will change if the data catalog changes + # Specifically if more tas datasets are provided data_regression.check(metric_dataset.hash, basename="metric_dataset_hash") @@ -57,12 +58,12 @@ def test_get_attr(self, dataset_collection): assert dataset_collection.instance_id.equals(expected) def test_hash(self, dataset_collection, cmip6_data_catalog, data_regression): - dataset_hash = hash(dataset_collection) + tas_datasets = cmip6_data_catalog[cmip6_data_catalog.variable_id == "tas"] + dataset_hash = hash(DatasetCollection(tas_datasets, "instance_id")) assert isinstance(dataset_hash, int) - assert dataset_hash == hash(DatasetCollection(cmip6_data_catalog, "instance_id")) - assert dataset_hash != hash( - DatasetCollection(cmip6_data_catalog[cmip6_data_catalog.variable_id == "tas"], "instance_id") - ) + assert dataset_hash != hash(DatasetCollection(tas_datasets.iloc[[0, 1]], "instance_id")) + # This hash will change if the data catalog changes + # Specifically if more tas datasets are provided data_regression.check(dataset_hash, basename="dataset_collection_hash") diff --git a/packages/ref-core/tests/unit/test_datasets/dataset_collection_hash.yml b/packages/ref-core/tests/unit/test_datasets/dataset_collection_hash.yml index 25e8e39..1f3e1b5 100644 --- a/packages/ref-core/tests/unit/test_datasets/dataset_collection_hash.yml +++ b/packages/ref-core/tests/unit/test_datasets/dataset_collection_hash.yml @@ -1,2 +1,2 @@ -2142660390363301609 +303970149429875064 ... diff --git a/packages/ref-core/tests/unit/test_datasets/metric_dataset_hash.yml b/packages/ref-core/tests/unit/test_datasets/metric_dataset_hash.yml index a148d29..57556ac 100644 --- a/packages/ref-core/tests/unit/test_datasets/metric_dataset_hash.yml +++ b/packages/ref-core/tests/unit/test_datasets/metric_dataset_hash.yml @@ -1,2 +1,2 @@ -3d5eefc9508ff9c417e9ff314afadf7e568b9588 +17842649a474366b8d39d11b9867065508d295f0 ... diff --git a/packages/ref/tests/unit/cli/test_datasets.py b/packages/ref/tests/unit/cli/test_datasets.py index ef16dbc..c1b61d4 100644 --- a/packages/ref/tests/unit/cli/test_datasets.py +++ b/packages/ref/tests/unit/cli/test_datasets.py @@ -52,7 +52,7 @@ def test_ingest(self, sample_data_dir, db, invoke_cli): assert db.session.query(Dataset).count() == 5 assert db.session.query(CMIP6Dataset).count() == 5 - assert db.session.query(CMIP6File).count() == 8 + assert db.session.query(CMIP6File).count() == 5 def test_ingest_and_solve(self, sample_data_dir, db, invoke_cli): result = invoke_cli( @@ -82,7 +82,7 @@ def test_ingest_multiple_times(self, sample_data_dir, db, invoke_cli): ) assert db.session.query(Dataset).count() == 1 - assert db.session.query(CMIP6File).count() == 2 + assert db.session.query(CMIP6File).count() == 1 invoke_cli( [ diff --git a/packages/ref/tests/unit/datasets/test_cmip6.py b/packages/ref/tests/unit/datasets/test_cmip6.py index f68dda1..e65dad6 100644 --- a/packages/ref/tests/unit/datasets/test_cmip6.py +++ b/packages/ref/tests/unit/datasets/test_cmip6.py @@ -41,9 +41,6 @@ def test_load_catalog(self, db_seeded, catalog_regression, sample_data_dir): for k in adapter.dataset_specific_metadata + adapter.file_specific_metadata: assert k in df.columns - assert len(df) == 13 # unique files - assert df.groupby("instance_id").ngroups == 10 # unique datasets - # The order of the rows may be flakey due to sqlite ordering and the created time resolution catalog_regression(df.sort_values(["instance_id", "start_time"]), basename="cmip6_catalog_db") diff --git a/packages/ref/tests/unit/datasets/test_cmip6/cmip6_catalog_db.yml b/packages/ref/tests/unit/datasets/test_cmip6/cmip6_catalog_db.yml index d62a1fe..d474c6d 100644 --- a/packages/ref/tests/unit/datasets/test_cmip6/cmip6_catalog_db.yml +++ b/packages/ref/tests/unit/datasets/test_cmip6/cmip6_catalog_db.yml @@ -1,8 +1,260 @@ +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: 0180-12-16 12:00:00 + experiment: 1 percent per year increase in CO2 + experiment_id: 1pctCO2 + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.1pctCO2.r1i1p1f1.Amon.tas.gn.v20191115 + institution_id: CSIRO + long_name: Near-Surface Air Temperature + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/1pctCO2/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_1pctCO2_r1i1p1f1_gn_010101-018012.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: air_temperature + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + units: K + variable_id: tas + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: null + experiment: 1 percent per year increase in CO2 + experiment_id: 1pctCO2 + frequency: fx + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.1pctCO2.r1i1p1f1.fx.areacella.gn.v20191115 + institution_id: CSIRO + long_name: Grid-Cell Area for Atmospheric Grid Variables + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/1pctCO2/r1i1p1f1/fx/areacella/gn/v20191115/areacella_fx_ACCESS-ESM1-5_1pctCO2_r1i1p1f1_gn.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: cell_area + start_time: null + sub_experiment: none + sub_experiment_id: none + table_id: fx + units: m2 + variable_id: areacella + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: 0125-12-16 12:00:00 + experiment: abrupt quadrupling of CO2 + experiment_id: abrupt-4xCO2 + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.Amon.rlut.gn.v20191115 + institution_id: CSIRO + long_name: TOA Outgoing Longwave Radiation + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/rlut/gn/v20191115/rlut_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: toa_outgoing_longwave_flux + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + units: W m-2 + variable_id: rlut + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: 0125-12-16 12:00:00 + experiment: abrupt quadrupling of CO2 + experiment_id: abrupt-4xCO2 + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.Amon.rsdt.gn.v20191115 + institution_id: CSIRO + long_name: TOA Incident Shortwave Radiation + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/rsdt/gn/v20191115/rsdt_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: toa_incoming_shortwave_flux + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + units: W m-2 + variable_id: rsdt + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: 0125-12-16 12:00:00 + experiment: abrupt quadrupling of CO2 + experiment_id: abrupt-4xCO2 + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.Amon.rsut.gn.v20191115 + institution_id: CSIRO + long_name: TOA Outgoing Shortwave Radiation + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/rsut/gn/v20191115/rsut_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: toa_outgoing_shortwave_flux + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + units: W m-2 + variable_id: rsut + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: 0125-12-16 12:00:00 + experiment: abrupt quadrupling of CO2 + experiment_id: abrupt-4xCO2 + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.Amon.tas.gn.v20191115 + institution_id: CSIRO + long_name: Near-Surface Air Temperature + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: air_temperature + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + units: K + variable_id: tas + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: null + experiment: abrupt quadrupling of CO2 + experiment_id: abrupt-4xCO2 + frequency: fx + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.fx.areacella.gn.v20191115 + institution_id: CSIRO + long_name: Grid-Cell Area for Atmospheric Grid Variables + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/fx/areacella/gn/v20191115/areacella_fx_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: cell_area + start_time: null + sub_experiment: none + sub_experiment_id: none + table_id: fx + units: m2 + variable_id: areacella + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 - activity_id: CMIP branch_method: standard branch_time_in_child: 0.0 branch_time_in_parent: 21915.0 - end_time: 2014-07-16 12:00:00 + end_time: 2014-12-16 12:00:00 experiment: all-forcing simulation of the recent past experiment_id: historical frequency: mon @@ -19,13 +271,13 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 0101-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rlut/gn/v20191115/rlut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rlut/gn/v20191115/rlut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_outgoing_longwave_flux - start_time: 1850-01-16 12:00:00 + start_time: 2000-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon @@ -38,7 +290,7 @@ branch_method: standard branch_time_in_child: 0.0 branch_time_in_parent: 21915.0 - end_time: 2014-07-16 12:00:00 + end_time: 2014-12-16 12:00:00 experiment: all-forcing simulation of the recent past experiment_id: historical frequency: mon @@ -55,13 +307,13 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 0101-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsdt/gn/v20191115/rsdt_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsdt/gn/v20191115/rsdt_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_incoming_shortwave_flux - start_time: 1850-01-16 12:00:00 + start_time: 2000-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon @@ -74,7 +326,7 @@ branch_method: standard branch_time_in_child: 0.0 branch_time_in_parent: 21915.0 - end_time: 2014-07-16 12:00:00 + end_time: 2014-12-16 12:00:00 experiment: all-forcing simulation of the recent past experiment_id: historical frequency: mon @@ -91,13 +343,13 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 0101-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsut/gn/v20191115/rsut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsut/gn/v20191115/rsut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_outgoing_shortwave_flux - start_time: 1850-01-16 12:00:00 + start_time: 2000-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon @@ -110,7 +362,7 @@ branch_method: standard branch_time_in_child: 0.0 branch_time_in_parent: 21915.0 - end_time: 2014-07-16 12:00:00 + end_time: 2014-12-16 12:00:00 experiment: all-forcing simulation of the recent past experiment_id: historical frequency: mon @@ -127,13 +379,13 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 0101-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: air_temperature - start_time: 1850-01-16 12:00:00 + start_time: 2000-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon @@ -142,6 +394,42 @@ variant_label: r1i1p1f1 version: v20191115 vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 21915.0 + end_time: 2014-12-16 12:00:00 + experiment: all-forcing simulation of the recent past + experiment_id: historical + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.historical.r1i1p1f1.Omon.tos.gn.v20191115 + institution_id: CSIRO + long_name: Sea Surface Temperature + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-1-1 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Omon/tos/gn/v20191115/tos_Omon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc' + product: model-output + realm: ocean + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: sea_surface_temperature + start_time: 2000-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Omon + units: degC + variable_id: tos + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 - activity_id: CMIP branch_method: standard branch_time_in_child: 0.0 @@ -178,128 +466,200 @@ variant_label: r1i1p1f1 version: v20191115 vertical_levels: 1 -- activity_id: ScenarioMIP +- activity_id: CMIP branch_method: standard - branch_time_in_child: 60265.0 - branch_time_in_parent: 60265.0 - end_time: 2300-07-16 12:00:00 - experiment: update of RCP2.6 based on SSP1 - experiment_id: ssp126 + branch_time_in_child: 0.0 + branch_time_in_parent: 36524.0 + end_time: 0125-12-16 12:00:00 + experiment: pre-industrial control + experiment_id: piControl frequency: mon grid: native atmosphere N96 grid (145x192 latxlon) grid_label: gn init_year: null - instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rlut.gn.v20210318 + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.Amon.rlut.gn.v20210316 institution_id: CSIRO long_name: TOA Outgoing Longwave Radiation member_id: r1i1p1f1 nominal_resolution: 250 km parent_activity_id: CMIP - parent_experiment_id: historical + parent_experiment_id: piControl-spinup parent_source_id: ACCESS-ESM1-5 - parent_time_units: days since 1850-1-1 + parent_time_units: days since 0001-01-01 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rlut/gn/v20210318/rlut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/rlut/gn/v20210316/rlut_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-012512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_outgoing_longwave_flux - start_time: 2101-01-16 12:00:00 + start_time: 0101-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon units: W m-2 variable_id: rlut variant_label: r1i1p1f1 - version: v20210318 + version: v20210316 vertical_levels: 1 -- activity_id: ScenarioMIP +- activity_id: CMIP branch_method: standard - branch_time_in_child: 60265.0 - branch_time_in_parent: 60265.0 - end_time: 2100-07-16 12:00:00 - experiment: update of RCP2.6 based on SSP1 - experiment_id: ssp126 + branch_time_in_child: 0.0 + branch_time_in_parent: 36524.0 + end_time: 0125-12-16 12:00:00 + experiment: pre-industrial control + experiment_id: piControl frequency: mon grid: native atmosphere N96 grid (145x192 latxlon) grid_label: gn init_year: null - instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rsdt.gn.v20210318 + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.Amon.rsdt.gn.v20210316 institution_id: CSIRO long_name: TOA Incident Shortwave Radiation member_id: r1i1p1f1 nominal_resolution: 250 km parent_activity_id: CMIP - parent_experiment_id: historical + parent_experiment_id: piControl-spinup parent_source_id: ACCESS-ESM1-5 - parent_time_units: days since 1850-1-1 + parent_time_units: days since 0001-01-01 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsdt/gn/v20210318/rsdt_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-210012.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/rsdt/gn/v20210316/rsdt_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-012512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_incoming_shortwave_flux - start_time: 2015-01-16 12:00:00 + start_time: 0101-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon units: W m-2 variable_id: rsdt variant_label: r1i1p1f1 - version: v20210318 + version: v20210316 vertical_levels: 1 -- activity_id: ScenarioMIP +- activity_id: CMIP branch_method: standard - branch_time_in_child: 60265.0 - branch_time_in_parent: 60265.0 - end_time: 2300-07-16 12:00:00 - experiment: update of RCP2.6 based on SSP1 - experiment_id: ssp126 + branch_time_in_child: 0.0 + branch_time_in_parent: 36524.0 + end_time: 0125-12-16 12:00:00 + experiment: pre-industrial control + experiment_id: piControl frequency: mon grid: native atmosphere N96 grid (145x192 latxlon) grid_label: gn init_year: null - instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rsdt.gn.v20210318 + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.Amon.rsut.gn.v20210316 institution_id: CSIRO - long_name: TOA Incident Shortwave Radiation + long_name: TOA Outgoing Shortwave Radiation member_id: r1i1p1f1 nominal_resolution: 250 km parent_activity_id: CMIP - parent_experiment_id: historical + parent_experiment_id: piControl-spinup parent_source_id: ACCESS-ESM1-5 - parent_time_units: days since 1850-1-1 + parent_time_units: days since 0001-01-01 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsdt/gn/v20210318/rsdt_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/rsut/gn/v20210316/rsut_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-012512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM - standard_name: toa_incoming_shortwave_flux - start_time: 2101-01-16 12:00:00 + standard_name: toa_outgoing_shortwave_flux + start_time: 0101-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon units: W m-2 - variable_id: rsdt + variable_id: rsut variant_label: r1i1p1f1 - version: v20210318 + version: v20210316 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 36524.0 + end_time: 0180-12-16 12:00:00 + experiment: pre-industrial control + experiment_id: piControl + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.Amon.tas.gn.v20210316 + institution_id: CSIRO + long_name: Near-Surface Air Temperature + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl-spinup + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0001-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/tas/gn/v20210316/tas_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-018012.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: air_temperature + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + units: K + variable_id: tas + variant_label: r1i1p1f1 + version: v20210316 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 36524.0 + end_time: null + experiment: pre-industrial control + experiment_id: piControl + frequency: fx + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.fx.areacella.gn.v20210316 + institution_id: CSIRO + long_name: Grid-Cell Area for Atmospheric Grid Variables + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl-spinup + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0001-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/fx/areacella/gn/v20210316/areacella_fx_ACCESS-ESM1-5_piControl_r1i1p1f1_gn.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: cell_area + start_time: null + sub_experiment: none + sub_experiment_id: none + table_id: fx + units: m2 + variable_id: areacella + variant_label: r1i1p1f1 + version: v20210316 vertical_levels: 1 - activity_id: ScenarioMIP branch_method: standard branch_time_in_child: 60265.0 branch_time_in_parent: 60265.0 - end_time: 2100-07-16 12:00:00 + end_time: 2025-12-16 12:00:00 experiment: update of RCP2.6 based on SSP1 experiment_id: ssp126 frequency: mon grid: native atmosphere N96 grid (145x192 latxlon) grid_label: gn init_year: null - instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rsut.gn.v20210318 + instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rsdt.gn.v20210318 institution_id: CSIRO - long_name: TOA Outgoing Shortwave Radiation + long_name: TOA Incident Shortwave Radiation member_id: r1i1p1f1 nominal_resolution: 250 km parent_activity_id: CMIP @@ -307,18 +667,18 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 1850-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsut/gn/v20210318/rsut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-210012.nc' + path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsdt/gn/v20210318/rsdt_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM - standard_name: toa_outgoing_shortwave_flux + standard_name: toa_incoming_shortwave_flux start_time: 2015-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon units: W m-2 - variable_id: rsut + variable_id: rsdt variant_label: r1i1p1f1 version: v20210318 vertical_levels: 1 @@ -326,7 +686,7 @@ branch_method: standard branch_time_in_child: 60265.0 branch_time_in_parent: 60265.0 - end_time: 2300-07-16 12:00:00 + end_time: 2025-12-16 12:00:00 experiment: update of RCP2.6 based on SSP1 experiment_id: ssp126 frequency: mon @@ -343,13 +703,13 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 1850-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsut/gn/v20210318/rsut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc' + path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsut/gn/v20210318/rsut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_outgoing_shortwave_flux - start_time: 2101-01-16 12:00:00 + start_time: 2015-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon @@ -362,7 +722,7 @@ branch_method: standard branch_time_in_child: 60265.0 branch_time_in_parent: 60265.0 - end_time: 2100-07-16 12:00:00 + end_time: 2025-12-16 12:00:00 experiment: update of RCP2.6 based on SSP1 experiment_id: ssp126 frequency: mon @@ -379,7 +739,7 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 1850-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/tas/gn/v20210318/tas_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-210012.nc' + path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/tas/gn/v20210318/tas_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 @@ -398,16 +758,16 @@ branch_method: standard branch_time_in_child: 60265.0 branch_time_in_parent: 60265.0 - end_time: 2300-07-16 12:00:00 + end_time: 2025-12-16 12:00:00 experiment: update of RCP2.6 based on SSP1 experiment_id: ssp126 frequency: mon grid: native atmosphere N96 grid (145x192 latxlon) grid_label: gn init_year: null - instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.tas.gn.v20210318 + instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Omon.tos.gn.v20210318 institution_id: CSIRO - long_name: Near-Surface Air Temperature + long_name: Sea Surface Temperature member_id: r1i1p1f1 nominal_resolution: 250 km parent_activity_id: CMIP @@ -415,18 +775,18 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 1850-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/tas/gn/v20210318/tas_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc' + path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Omon/tos/gn/v20210318/tos_Omon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc' product: model-output - realm: atmos + realm: ocean source_id: ACCESS-ESM1-5 source_type: AOGCM - standard_name: air_temperature - start_time: 2101-01-16 12:00:00 + standard_name: sea_surface_temperature + start_time: 2015-01-16 12:00:00 sub_experiment: none sub_experiment_id: none - table_id: Amon - units: K - variable_id: tas + table_id: Omon + units: degC + variable_id: tos variant_label: r1i1p1f1 version: v20210318 vertical_levels: 1 diff --git a/packages/ref/tests/unit/datasets/test_cmip6/cmip6_catalog_local.yml b/packages/ref/tests/unit/datasets/test_cmip6/cmip6_catalog_local.yml index 67c9cdd..0e25698 100644 --- a/packages/ref/tests/unit/datasets/test_cmip6/cmip6_catalog_local.yml +++ b/packages/ref/tests/unit/datasets/test_cmip6/cmip6_catalog_local.yml @@ -1,8 +1,267 @@ +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: 0180-12-16 12:00:00 + experiment: 1 percent per year increase in CO2 + experiment_id: 1pctCO2 + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.1pctCO2.r1i1p1f1.Amon.tas.gn.v20191115 + institution_id: CSIRO + long_name: Near-Surface Air Temperature + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/1pctCO2/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_1pctCO2_r1i1p1f1_gn_010101-018012.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: air_temperature + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + time_range: 0101-01-16 12:00:00-0180-12-16 12:00:00 + units: K + variable_id: tas + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: null + experiment: 1 percent per year increase in CO2 + experiment_id: 1pctCO2 + frequency: fx + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.1pctCO2.r1i1p1f1.fx.areacella.gn.v20191115 + institution_id: CSIRO + long_name: Grid-Cell Area for Atmospheric Grid Variables + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/1pctCO2/r1i1p1f1/fx/areacella/gn/v20191115/areacella_fx_ACCESS-ESM1-5_1pctCO2_r1i1p1f1_gn.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: cell_area + start_time: null + sub_experiment: none + sub_experiment_id: none + table_id: fx + time_range: null + units: m2 + variable_id: areacella + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: 0125-12-16 12:00:00 + experiment: abrupt quadrupling of CO2 + experiment_id: abrupt-4xCO2 + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.Amon.rlut.gn.v20191115 + institution_id: CSIRO + long_name: TOA Outgoing Longwave Radiation + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/rlut/gn/v20191115/rlut_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: toa_outgoing_longwave_flux + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + time_range: 0101-01-16 12:00:00-0125-12-16 12:00:00 + units: W m-2 + variable_id: rlut + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: 0125-12-16 12:00:00 + experiment: abrupt quadrupling of CO2 + experiment_id: abrupt-4xCO2 + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.Amon.rsdt.gn.v20191115 + institution_id: CSIRO + long_name: TOA Incident Shortwave Radiation + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/rsdt/gn/v20191115/rsdt_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: toa_incoming_shortwave_flux + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + time_range: 0101-01-16 12:00:00-0125-12-16 12:00:00 + units: W m-2 + variable_id: rsdt + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: 0125-12-16 12:00:00 + experiment: abrupt quadrupling of CO2 + experiment_id: abrupt-4xCO2 + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.Amon.rsut.gn.v20191115 + institution_id: CSIRO + long_name: TOA Outgoing Shortwave Radiation + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/rsut/gn/v20191115/rsut_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: toa_outgoing_shortwave_flux + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + time_range: 0101-01-16 12:00:00-0125-12-16 12:00:00 + units: W m-2 + variable_id: rsut + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: 0125-12-16 12:00:00 + experiment: abrupt quadrupling of CO2 + experiment_id: abrupt-4xCO2 + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.Amon.tas.gn.v20191115 + institution_id: CSIRO + long_name: Near-Surface Air Temperature + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn_010101-012512.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: air_temperature + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + time_range: 0101-01-16 12:00:00-0125-12-16 12:00:00 + units: K + variable_id: tas + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 0.0 + end_time: null + experiment: abrupt quadrupling of CO2 + experiment_id: abrupt-4xCO2 + frequency: fx + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.fx.areacella.gn.v20191115 + institution_id: CSIRO + long_name: Grid-Cell Area for Atmospheric Grid Variables + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/abrupt-4xCO2/r1i1p1f1/fx/areacella/gn/v20191115/areacella_fx_ACCESS-ESM1-5_abrupt-4xCO2_r1i1p1f1_gn.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: cell_area + start_time: null + sub_experiment: none + sub_experiment_id: none + table_id: fx + time_range: null + units: m2 + variable_id: areacella + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 - activity_id: CMIP branch_method: standard branch_time_in_child: 0.0 branch_time_in_parent: 21915.0 - end_time: 2014-07-16 12:00:00 + end_time: 2014-12-16 12:00:00 experiment: all-forcing simulation of the recent past experiment_id: historical frequency: mon @@ -19,17 +278,17 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 0101-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rlut/gn/v20191115/rlut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rlut/gn/v20191115/rlut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_outgoing_longwave_flux - start_time: 1850-01-16 12:00:00 + start_time: 2000-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon - time_range: 1850-01-16 12:00:00-2014-07-16 12:00:00 + time_range: 2000-01-16 12:00:00-2014-12-16 12:00:00 units: W m-2 variable_id: rlut variant_label: r1i1p1f1 @@ -39,7 +298,7 @@ branch_method: standard branch_time_in_child: 0.0 branch_time_in_parent: 21915.0 - end_time: 2014-07-16 12:00:00 + end_time: 2014-12-16 12:00:00 experiment: all-forcing simulation of the recent past experiment_id: historical frequency: mon @@ -56,17 +315,17 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 0101-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsdt/gn/v20191115/rsdt_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsdt/gn/v20191115/rsdt_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_incoming_shortwave_flux - start_time: 1850-01-16 12:00:00 + start_time: 2000-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon - time_range: 1850-01-16 12:00:00-2014-07-16 12:00:00 + time_range: 2000-01-16 12:00:00-2014-12-16 12:00:00 units: W m-2 variable_id: rsdt variant_label: r1i1p1f1 @@ -76,7 +335,7 @@ branch_method: standard branch_time_in_child: 0.0 branch_time_in_parent: 21915.0 - end_time: 2014-07-16 12:00:00 + end_time: 2014-12-16 12:00:00 experiment: all-forcing simulation of the recent past experiment_id: historical frequency: mon @@ -93,17 +352,17 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 0101-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsut/gn/v20191115/rsut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/rsut/gn/v20191115/rsut_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_outgoing_shortwave_flux - start_time: 1850-01-16 12:00:00 + start_time: 2000-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon - time_range: 1850-01-16 12:00:00-2014-07-16 12:00:00 + time_range: 2000-01-16 12:00:00-2014-12-16 12:00:00 units: W m-2 variable_id: rsut variant_label: r1i1p1f1 @@ -113,7 +372,7 @@ branch_method: standard branch_time_in_child: 0.0 branch_time_in_parent: 21915.0 - end_time: 2014-07-16 12:00:00 + end_time: 2014-12-16 12:00:00 experiment: all-forcing simulation of the recent past experiment_id: historical frequency: mon @@ -130,22 +389,59 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 0101-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_185001-201412.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Amon/tas/gn/v20191115/tas_Amon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: air_temperature - start_time: 1850-01-16 12:00:00 + start_time: 2000-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon - time_range: 1850-01-16 12:00:00-2014-07-16 12:00:00 + time_range: 2000-01-16 12:00:00-2014-12-16 12:00:00 units: K variable_id: tas variant_label: r1i1p1f1 version: v20191115 vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 21915.0 + end_time: 2014-12-16 12:00:00 + experiment: all-forcing simulation of the recent past + experiment_id: historical + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.historical.r1i1p1f1.Omon.tos.gn.v20191115 + institution_id: CSIRO + long_name: Sea Surface Temperature + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0101-1-1 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r1i1p1f1/Omon/tos/gn/v20191115/tos_Omon_ACCESS-ESM1-5_historical_r1i1p1f1_gn_200001-201412.nc' + product: model-output + realm: ocean + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: sea_surface_temperature + start_time: 2000-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Omon + time_range: 2000-01-16 12:00:00-2014-12-16 12:00:00 + units: degC + variable_id: tos + variant_label: r1i1p1f1 + version: v20191115 + vertical_levels: 1 - activity_id: CMIP branch_method: standard branch_time_in_child: 0.0 @@ -183,131 +479,205 @@ variant_label: r1i1p1f1 version: v20191115 vertical_levels: 1 -- activity_id: ScenarioMIP +- activity_id: CMIP branch_method: standard - branch_time_in_child: 60265.0 - branch_time_in_parent: 60265.0 - end_time: 2300-07-16 12:00:00 - experiment: update of RCP2.6 based on SSP1 - experiment_id: ssp126 + branch_time_in_child: 0.0 + branch_time_in_parent: 36524.0 + end_time: 0125-12-16 12:00:00 + experiment: pre-industrial control + experiment_id: piControl frequency: mon grid: native atmosphere N96 grid (145x192 latxlon) grid_label: gn init_year: null - instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rlut.gn.v20210318 + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.Amon.rlut.gn.v20210316 institution_id: CSIRO long_name: TOA Outgoing Longwave Radiation member_id: r1i1p1f1 nominal_resolution: 250 km parent_activity_id: CMIP - parent_experiment_id: historical + parent_experiment_id: piControl-spinup parent_source_id: ACCESS-ESM1-5 - parent_time_units: days since 1850-1-1 + parent_time_units: days since 0001-01-01 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rlut/gn/v20210318/rlut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/rlut/gn/v20210316/rlut_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-012512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_outgoing_longwave_flux - start_time: 2101-01-16 12:00:00 + start_time: 0101-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon - time_range: 2101-01-16 12:00:00-2300-07-16 12:00:00 + time_range: 0101-01-16 12:00:00-0125-12-16 12:00:00 units: W m-2 variable_id: rlut variant_label: r1i1p1f1 - version: v20210318 + version: v20210316 vertical_levels: 1 -- activity_id: ScenarioMIP +- activity_id: CMIP branch_method: standard - branch_time_in_child: 60265.0 - branch_time_in_parent: 60265.0 - end_time: 2100-07-16 12:00:00 - experiment: update of RCP2.6 based on SSP1 - experiment_id: ssp126 + branch_time_in_child: 0.0 + branch_time_in_parent: 36524.0 + end_time: 0125-12-16 12:00:00 + experiment: pre-industrial control + experiment_id: piControl frequency: mon grid: native atmosphere N96 grid (145x192 latxlon) grid_label: gn init_year: null - instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rsdt.gn.v20210318 + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.Amon.rsdt.gn.v20210316 institution_id: CSIRO long_name: TOA Incident Shortwave Radiation member_id: r1i1p1f1 nominal_resolution: 250 km parent_activity_id: CMIP - parent_experiment_id: historical + parent_experiment_id: piControl-spinup parent_source_id: ACCESS-ESM1-5 - parent_time_units: days since 1850-1-1 + parent_time_units: days since 0001-01-01 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsdt/gn/v20210318/rsdt_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-210012.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/rsdt/gn/v20210316/rsdt_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-012512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_incoming_shortwave_flux - start_time: 2015-01-16 12:00:00 + start_time: 0101-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon - time_range: 2015-01-16 12:00:00-2100-07-16 12:00:00 + time_range: 0101-01-16 12:00:00-0125-12-16 12:00:00 units: W m-2 variable_id: rsdt variant_label: r1i1p1f1 - version: v20210318 + version: v20210316 vertical_levels: 1 -- activity_id: ScenarioMIP +- activity_id: CMIP branch_method: standard - branch_time_in_child: 60265.0 - branch_time_in_parent: 60265.0 - end_time: 2300-07-16 12:00:00 - experiment: update of RCP2.6 based on SSP1 - experiment_id: ssp126 + branch_time_in_child: 0.0 + branch_time_in_parent: 36524.0 + end_time: 0125-12-16 12:00:00 + experiment: pre-industrial control + experiment_id: piControl frequency: mon grid: native atmosphere N96 grid (145x192 latxlon) grid_label: gn init_year: null - instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rsdt.gn.v20210318 + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.Amon.rsut.gn.v20210316 institution_id: CSIRO - long_name: TOA Incident Shortwave Radiation + long_name: TOA Outgoing Shortwave Radiation member_id: r1i1p1f1 nominal_resolution: 250 km parent_activity_id: CMIP - parent_experiment_id: historical + parent_experiment_id: piControl-spinup parent_source_id: ACCESS-ESM1-5 - parent_time_units: days since 1850-1-1 + parent_time_units: days since 0001-01-01 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsdt/gn/v20210318/rsdt_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc' + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/rsut/gn/v20210316/rsut_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-012512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM - standard_name: toa_incoming_shortwave_flux - start_time: 2101-01-16 12:00:00 + standard_name: toa_outgoing_shortwave_flux + start_time: 0101-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon - time_range: 2101-01-16 12:00:00-2300-07-16 12:00:00 + time_range: 0101-01-16 12:00:00-0125-12-16 12:00:00 units: W m-2 - variable_id: rsdt + variable_id: rsut variant_label: r1i1p1f1 - version: v20210318 + version: v20210316 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 36524.0 + end_time: 0180-12-16 12:00:00 + experiment: pre-industrial control + experiment_id: piControl + frequency: mon + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.Amon.tas.gn.v20210316 + institution_id: CSIRO + long_name: Near-Surface Air Temperature + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl-spinup + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0001-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/Amon/tas/gn/v20210316/tas_Amon_ACCESS-ESM1-5_piControl_r1i1p1f1_gn_010101-018012.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: air_temperature + start_time: 0101-01-16 12:00:00 + sub_experiment: none + sub_experiment_id: none + table_id: Amon + time_range: 0101-01-16 12:00:00-0180-12-16 12:00:00 + units: K + variable_id: tas + variant_label: r1i1p1f1 + version: v20210316 + vertical_levels: 1 +- activity_id: CMIP + branch_method: standard + branch_time_in_child: 0.0 + branch_time_in_parent: 36524.0 + end_time: null + experiment: pre-industrial control + experiment_id: piControl + frequency: fx + grid: native atmosphere N96 grid (145x192 latxlon) + grid_label: gn + init_year: null + instance_id: CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.fx.areacella.gn.v20210316 + institution_id: CSIRO + long_name: Grid-Cell Area for Atmospheric Grid Variables + member_id: r1i1p1f1 + nominal_resolution: 250 km + parent_activity_id: CMIP + parent_experiment_id: piControl-spinup + parent_source_id: ACCESS-ESM1-5 + parent_time_units: days since 0001-01-01 + parent_variant_label: r1i1p1f1 + path: '{esgf_data_dir}/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/piControl/r1i1p1f1/fx/areacella/gn/v20210316/areacella_fx_ACCESS-ESM1-5_piControl_r1i1p1f1_gn.nc' + product: model-output + realm: atmos + source_id: ACCESS-ESM1-5 + source_type: AOGCM + standard_name: cell_area + start_time: null + sub_experiment: none + sub_experiment_id: none + table_id: fx + time_range: null + units: m2 + variable_id: areacella + variant_label: r1i1p1f1 + version: v20210316 vertical_levels: 1 - activity_id: ScenarioMIP branch_method: standard branch_time_in_child: 60265.0 branch_time_in_parent: 60265.0 - end_time: 2100-07-16 12:00:00 + end_time: 2025-12-16 12:00:00 experiment: update of RCP2.6 based on SSP1 experiment_id: ssp126 frequency: mon grid: native atmosphere N96 grid (145x192 latxlon) grid_label: gn init_year: null - instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rsut.gn.v20210318 + instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rsdt.gn.v20210318 institution_id: CSIRO - long_name: TOA Outgoing Shortwave Radiation + long_name: TOA Incident Shortwave Radiation member_id: r1i1p1f1 nominal_resolution: 250 km parent_activity_id: CMIP @@ -315,19 +685,19 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 1850-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsut/gn/v20210318/rsut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-210012.nc' + path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsdt/gn/v20210318/rsdt_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM - standard_name: toa_outgoing_shortwave_flux + standard_name: toa_incoming_shortwave_flux start_time: 2015-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon - time_range: 2015-01-16 12:00:00-2100-07-16 12:00:00 + time_range: 2015-01-16 12:00:00-2025-12-16 12:00:00 units: W m-2 - variable_id: rsut + variable_id: rsdt variant_label: r1i1p1f1 version: v20210318 vertical_levels: 1 @@ -335,7 +705,7 @@ branch_method: standard branch_time_in_child: 60265.0 branch_time_in_parent: 60265.0 - end_time: 2300-07-16 12:00:00 + end_time: 2025-12-16 12:00:00 experiment: update of RCP2.6 based on SSP1 experiment_id: ssp126 frequency: mon @@ -352,17 +722,17 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 1850-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsut/gn/v20210318/rsut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc' + path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/rsut/gn/v20210318/rsut_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 source_type: AOGCM standard_name: toa_outgoing_shortwave_flux - start_time: 2101-01-16 12:00:00 + start_time: 2015-01-16 12:00:00 sub_experiment: none sub_experiment_id: none table_id: Amon - time_range: 2101-01-16 12:00:00-2300-07-16 12:00:00 + time_range: 2015-01-16 12:00:00-2025-12-16 12:00:00 units: W m-2 variable_id: rsut variant_label: r1i1p1f1 @@ -372,7 +742,7 @@ branch_method: standard branch_time_in_child: 60265.0 branch_time_in_parent: 60265.0 - end_time: 2100-07-16 12:00:00 + end_time: 2025-12-16 12:00:00 experiment: update of RCP2.6 based on SSP1 experiment_id: ssp126 frequency: mon @@ -389,7 +759,7 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 1850-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/tas/gn/v20210318/tas_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-210012.nc' + path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/tas/gn/v20210318/tas_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc' product: model-output realm: atmos source_id: ACCESS-ESM1-5 @@ -399,7 +769,7 @@ sub_experiment: none sub_experiment_id: none table_id: Amon - time_range: 2015-01-16 12:00:00-2100-07-16 12:00:00 + time_range: 2015-01-16 12:00:00-2025-12-16 12:00:00 units: K variable_id: tas variant_label: r1i1p1f1 @@ -409,16 +779,16 @@ branch_method: standard branch_time_in_child: 60265.0 branch_time_in_parent: 60265.0 - end_time: 2300-07-16 12:00:00 + end_time: 2025-12-16 12:00:00 experiment: update of RCP2.6 based on SSP1 experiment_id: ssp126 frequency: mon grid: native atmosphere N96 grid (145x192 latxlon) grid_label: gn init_year: null - instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.tas.gn.v20210318 + instance_id: CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Omon.tos.gn.v20210318 institution_id: CSIRO - long_name: Near-Surface Air Temperature + long_name: Sea Surface Temperature member_id: r1i1p1f1 nominal_resolution: 250 km parent_activity_id: CMIP @@ -426,19 +796,19 @@ parent_source_id: ACCESS-ESM1-5 parent_time_units: days since 1850-1-1 parent_variant_label: r1i1p1f1 - path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Amon/tas/gn/v20210318/tas_Amon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_210101-230012.nc' + path: '{esgf_data_dir}/CMIP6/ScenarioMIP/CSIRO/ACCESS-ESM1-5/ssp126/r1i1p1f1/Omon/tos/gn/v20210318/tos_Omon_ACCESS-ESM1-5_ssp126_r1i1p1f1_gn_201501-202512.nc' product: model-output - realm: atmos + realm: ocean source_id: ACCESS-ESM1-5 source_type: AOGCM - standard_name: air_temperature - start_time: 2101-01-16 12:00:00 + standard_name: sea_surface_temperature + start_time: 2015-01-16 12:00:00 sub_experiment: none sub_experiment_id: none - table_id: Amon - time_range: 2101-01-16 12:00:00-2300-07-16 12:00:00 - units: K - variable_id: tas + table_id: Omon + time_range: 2015-01-16 12:00:00-2025-12-16 12:00:00 + units: degC + variable_id: tos variant_label: r1i1p1f1 version: v20210318 vertical_levels: 1 diff --git a/packages/ref/tests/unit/test_solver.py b/packages/ref/tests/unit/test_solver.py index 721100e..380b0ae 100644 --- a/packages/ref/tests/unit/test_solver.py +++ b/packages/ref/tests/unit/test_solver.py @@ -179,34 +179,26 @@ def test_solve_metrics_default_solver(mock_executor, db_seeded, solver): with db_seeded.session.begin(): solve_metrics(db_seeded) - assert mock_executor.return_value.run_metric.call_count == 6 + assert mock_executor.return_value.run_metric.call_count == 16 @mock.patch("cmip_ref.solver.get_executor") -def test_solve_metrics(mock_executor, db_seeded, solver): +def test_solve_metrics(mock_executor, db_seeded, solver, data_regression): with db_seeded.session.begin(): solve_metrics(db_seeded, dry_run=False, solver=solver) definitions = [call.kwargs["definition"] for call in mock_executor.return_value.run_metric.mock_calls] - expected_instance_ids = [ - ["CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.historical.r1i1p1f1.Amon.tas.gn.v20191115"], - ["CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.historical.r1i1p1f1.Amon.rsut.gn.v20191115"], - ["CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.tas.gn.v20210318"], - ["CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rsut.gn.v20210318"], - ] - expected_keys = [ - "ACCESS-ESM1-5_rsut_historical_r1i1p1f1", - "ACCESS-ESM1-5_tas_historical_r1i1p1f1", - "ACCESS-ESM1-5_rsut_ssp126_r1i1p1f1", - "ACCESS-ESM1-5_tas_ssp126_r1i1p1f1", - ] - - assert mock_executor.return_value.run_metric.call_count == len(expected_instance_ids) - + # Create a dictionary of the metric key and the source datasets that were used + output = {} for definition in definitions: - assert definition.metric_dataset["cmip6"].instance_id.unique().tolist() in expected_instance_ids - assert definition.key in expected_keys + output[definition.key] = { + str(source_type): ds_collection.instance_id.unique().tolist() + for source_type, ds_collection in definition.metric_dataset.items() + } + + # Write to a file for regression testing + data_regression.check(output) @mock.patch("cmip_ref.solver.get_executor") diff --git a/packages/ref/tests/unit/test_solver/test_solve_metrics.yml b/packages/ref/tests/unit/test_solver/test_solve_metrics.yml new file mode 100644 index 0000000..2509a03 --- /dev/null +++ b/packages/ref/tests/unit/test_solver/test_solve_metrics.yml @@ -0,0 +1,27 @@ +ACCESS-ESM1-5_rsut_abrupt-4xCO2_r1i1p1f1: + SourceDatasetType.CMIP6: + - CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.Amon.rsut.gn.v20191115 +ACCESS-ESM1-5_rsut_historical_r1i1p1f1: + SourceDatasetType.CMIP6: + - CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.historical.r1i1p1f1.Amon.rsut.gn.v20191115 +ACCESS-ESM1-5_rsut_piControl_r1i1p1f1: + SourceDatasetType.CMIP6: + - CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.Amon.rsut.gn.v20210316 +ACCESS-ESM1-5_rsut_ssp126_r1i1p1f1: + SourceDatasetType.CMIP6: + - CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.rsut.gn.v20210318 +ACCESS-ESM1-5_tas_1pctCO2_r1i1p1f1: + SourceDatasetType.CMIP6: + - CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.1pctCO2.r1i1p1f1.Amon.tas.gn.v20191115 +ACCESS-ESM1-5_tas_abrupt-4xCO2_r1i1p1f1: + SourceDatasetType.CMIP6: + - CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.abrupt-4xCO2.r1i1p1f1.Amon.tas.gn.v20191115 +ACCESS-ESM1-5_tas_historical_r1i1p1f1: + SourceDatasetType.CMIP6: + - CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.historical.r1i1p1f1.Amon.tas.gn.v20191115 +ACCESS-ESM1-5_tas_piControl_r1i1p1f1: + SourceDatasetType.CMIP6: + - CMIP6.CMIP.CSIRO.ACCESS-ESM1-5.piControl.r1i1p1f1.Amon.tas.gn.v20210316 +ACCESS-ESM1-5_tas_ssp126_r1i1p1f1: + SourceDatasetType.CMIP6: + - CMIP6.ScenarioMIP.CSIRO.ACCESS-ESM1-5.ssp126.r1i1p1f1.Amon.tas.gn.v20210318 From f6b470f1548a6cca38567b3fce1aa2e3bbddb86b Mon Sep 17 00:00:00 2001 From: Jared Lewis Date: Wed, 22 Jan 2025 17:01:09 +1100 Subject: [PATCH 3/6] docs: Add documentation for the steps to regenerate the sample data --- changelog/68.trivial.md | 1 + docs/development.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 changelog/68.trivial.md diff --git a/changelog/68.trivial.md b/changelog/68.trivial.md new file mode 100644 index 0000000..cef352a --- /dev/null +++ b/changelog/68.trivial.md @@ -0,0 +1 @@ +Update the target version of the sample data to v0.3.0 diff --git a/docs/development.md b/docs/development.md index ec7d866..3108fa1 100644 --- a/docs/development.md +++ b/docs/development.md @@ -84,6 +84,36 @@ make mypy make test ``` +### Sample data + +We use sample data from [ref-sample-data](https://github.com/CMIP-REF/ref-sample-data) +to provide a consistent set of data for testing. +These data are fetched automatically by the test suite. + +As we support more metrics, +we should expand the sample data to include additional datasets to be able to adequately test the REF. +If you wish to use a particular dataset for testing, +please open a pull request to add it to the sample data repository. + +The sample data is versioned and periodically we need to update the targeted version in the REF. +Updating the sample data can be done by running the following command: + +```bash +# Fetch the latest registry from the sample data repository +make update-test-data-registry + +# Manually edit the `SAMPLE_VERSION` in `packages/ref/src/cmip_ref/testing.py` + +# Regenerate any failing regression tests that depend on the sample data catalog +export PYTEST_ADDOPTS="--force-regen" +make test +```` + +Some other manual tweaks may be required to get the test suite to pass, +but we should try and write tests that don't change when new data becomes available, +or to use [pytest-regressions](https://pytest-regressions.readthedocs.io/en/latest/api.html) to be able to +regenerate the expected output files. + ## Documentation Our documentation is written in Markdown and built using From 45207951f38c260d5783db598677236f61dce178 Mon Sep 17 00:00:00 2001 From: Jared Lewis Date: Wed, 22 Jan 2025 17:05:47 +1100 Subject: [PATCH 4/6] test: Update tests --- .../ref-metrics-example/tests/unit/test_metrics.py | 2 +- tests/integration/test_solve.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/ref-metrics-example/tests/unit/test_metrics.py b/packages/ref-metrics-example/tests/unit/test_metrics.py index 4933f9e..453708b 100644 --- a/packages/ref-metrics-example/tests/unit/test_metrics.py +++ b/packages/ref-metrics-example/tests/unit/test_metrics.py @@ -26,7 +26,7 @@ def metric_dataset(cmip6_data_catalog) -> MetricDataset: def test_annual_mean(sample_data_dir, metric_dataset): annual_mean = calculate_annual_mean_timeseries(metric_dataset["cmip6"].path.to_list()) - assert annual_mean.time.size == 286 + assert annual_mean.time.size == 11 def test_example_metric(tmp_path, metric_dataset, cmip6_data_catalog, mocker): diff --git a/tests/integration/test_solve.py b/tests/integration/test_solve.py index f2a96df..6fc7237 100644 --- a/tests/integration/test_solve.py +++ b/tests/integration/test_solve.py @@ -27,21 +27,24 @@ def build_from_db(db: Database) -> "ExampleProviderRegistry": return ProviderRegistry(providers=[example_provider]) -def test_solve(sample_data_dir, config, invoke_cli, monkeypatch): +def test_solve(sample_data_dir, cmip6_data_catalog, config, invoke_cli, monkeypatch): + num_expected_datasets = cmip6_data_catalog["instance_id"].nunique() + num_expected_metrics = 9 + db = Database.from_config(config) monkeypatch.setattr(cmip_ref.solver, "ProviderRegistry", ExampleProviderRegistry) invoke_cli(["datasets", "ingest", "--source-type", "cmip6", str(sample_data_dir)]) - assert db.session.query(Dataset).count() == 10 + assert db.session.query(Dataset).count() == num_expected_datasets result = invoke_cli(["--verbose", "solve"]) assert "Created metric execution ACCESS-ESM1-5_rsut_ssp126_r1i1p1f1" in result.stderr assert "Running metric" in result.stderr - assert db.session.query(MetricExecution).count() == 4 + assert db.session.query(MetricExecution).count() == num_expected_metrics # Running solve again should not trigger any new metric executions result = invoke_cli(["--verbose", "solve"]) assert "Created metric execution ACCESS-ESM1-5_rsut_ssp126_r1i1p1f1" not in result.stderr - assert db.session.query(MetricExecution).count() == 4 + assert db.session.query(MetricExecution).count() == num_expected_metrics execution = db.session.query(MetricExecution).filter_by(key="ACCESS-ESM1-5_rsut_ssp126_r1i1p1f1").one() assert len(execution.results[0].datasets) == 1 From 63eeda8b5650c0f9914d7695c0814889794fba1d Mon Sep 17 00:00:00 2001 From: Jared Lewis Date: Thu, 23 Jan 2025 13:05:59 +1100 Subject: [PATCH 5/6] chore: Make test indifferent to the providers --- packages/ref/tests/unit/test_solver.py | 44 +++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/packages/ref/tests/unit/test_solver.py b/packages/ref/tests/unit/test_solver.py index 380b0ae..18da079 100644 --- a/packages/ref/tests/unit/test_solver.py +++ b/packages/ref/tests/unit/test_solver.py @@ -5,10 +5,10 @@ from cmip_ref_metrics_example import provider from cmip_ref.provider_registry import ProviderRegistry -from cmip_ref.solver import MetricSolver, extract_covered_datasets, solve_metrics +from cmip_ref.solver import MetricExecution, MetricSolver, extract_covered_datasets, solve_metrics from cmip_ref_core.constraints import RequireFacets, SelectParentExperiment from cmip_ref_core.datasets import SourceDatasetType -from cmip_ref_core.metrics import DataRequirement, FacetFilter +from cmip_ref_core.metrics import DataRequirement, FacetFilter, MetricExecutionDefinition @pytest.fixture @@ -22,6 +22,22 @@ def solver(db_seeded) -> MetricSolver: return metric_solver +@pytest.fixture +def mock_metric_execution() -> MetricExecution: + mock_execution = mock.MagicMock(spec=MetricExecution) + mock_execution.provider = provider + mock_execution.metric = provider.metrics()[0] + + mock_metric_dataset = mock.Mock(hash="123456", items=mock.Mock(return_value=[])) + + mock_execution.build_metric_execution_info.return_value = MetricExecutionDefinition( + key="key", + metric_dataset=mock_metric_dataset, + output_fragment="output_fragment", + ) + return mock_execution + + class TestMetricSolver: def test_solver_build_from_db(self, solver): assert isinstance(solver, MetricSolver) @@ -175,18 +191,36 @@ def test_data_coverage(requirement, data_catalog, expected): @mock.patch("cmip_ref.solver.get_executor") -def test_solve_metrics_default_solver(mock_executor, db_seeded, solver): +@mock.patch.object(MetricSolver, "build_from_db") +def test_solve_metrics_default_solver( + mock_build_solver, mock_executor, mock_metric_execution, db_seeded, solver +): + # Create a mock solver that "solves" to create a single execution + solver = mock.MagicMock(spec=MetricSolver) + solver.solve.return_value = [mock_metric_execution] + mock_build_solver.return_value = solver + + # Run with no solver specified with db_seeded.session.begin(): solve_metrics(db_seeded) - assert mock_executor.return_value.run_metric.call_count == 16 + # Solver should be created + assert mock_build_solver.call_count == 1 + # A single run would have been run + assert mock_executor.return_value.run_metric.call_count == 1 + mock_executor.return_value.run_metric.assert_called_with( + metric=mock_metric_execution.metric, definition=mock_metric_execution.build_metric_execution_info() + ) @mock.patch("cmip_ref.solver.get_executor") -def test_solve_metrics(mock_executor, db_seeded, solver, data_regression): +@mock.patch.object(MetricSolver, "build_from_db") +def test_solve_metrics(mock_build_solver, mock_executor, db_seeded, solver, data_regression): with db_seeded.session.begin(): solve_metrics(db_seeded, dry_run=False, solver=solver) + assert mock_build_solver.call_count == 0 + definitions = [call.kwargs["definition"] for call in mock_executor.return_value.run_metric.mock_calls] # Create a dictionary of the metric key and the source datasets that were used From 6ea4833a5d316ac4bb3b749f71558847e6da1011 Mon Sep 17 00:00:00 2001 From: Jared Lewis Date: Thu, 23 Jan 2025 13:46:33 +1100 Subject: [PATCH 6/6] chore: update the number of timesteps --- packages/ref-metrics-ilamb/tests/unit/test_metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ref-metrics-ilamb/tests/unit/test_metrics.py b/packages/ref-metrics-ilamb/tests/unit/test_metrics.py index a291359..59e0dfc 100644 --- a/packages/ref-metrics-ilamb/tests/unit/test_metrics.py +++ b/packages/ref-metrics-ilamb/tests/unit/test_metrics.py @@ -25,7 +25,7 @@ def metric_dataset(cmip6_data_catalog) -> MetricDataset: def test_annual_mean(metric_dataset): annual_mean = calculate_global_mean_timeseries(metric_dataset["cmip6"].path.to_list()) - assert annual_mean.time.size == 572 + assert annual_mean.time.size == 132 def test_example_metric(tmp_path, cmip6_data_catalog, mocker):