Note
This page is rendered from the Jupyter notebook notebooks/Tutorial_CM3.ipynb
in the ACCESS-MOPPy repository. The outputs below were stored the last time
the notebook was run; cells are not re-executed when the documentation is
built. Open the notebook on GitHub to run it yourself.
Tutorial for CM3 data#
[1]:
from access_moppy import ACCESS_ESM_CMORiser
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
Loaded Configuration:
Creator Name: Yousong Zeng
Organisation: ACCESS-NRI
Creator Email: rhaegar227@gmail.com
Creator URL: None
[ ]:
import glob
[2]:
import dask.distributed as dask
client = dask.Client(threads_per_worker=1)
client
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/node.py:187: UserWarning: Port 8787 is already in use.
Perhaps you already have a cluster running?
Hosting the HTTP server on port 33379 instead
warnings.warn(
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
/g/data/xp65/public/apps/med_conda/envs/analysis3-25.10/lib/python3.11/site-packages/distributed/diagnostics/nvml.py:14: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml
[2]:
Client
Client-7e3b29fe-f73f-11f0-890d-000003c3fe80
| Connection method: Cluster object | Cluster type: distributed.LocalCluster |
| Dashboard: /proxy/33379/status |
Cluster Info
LocalCluster
13bd02d5
| Dashboard: /proxy/33379/status | Workers: 28 |
| Total threads: 28 | Total memory: 251.19 GiB |
| Status: running | Using processes: True |
Scheduler Info
Scheduler
Scheduler-a60b335c-8db6-4319-abc9-f1e5c8c52d87
| Comm: tcp://127.0.0.1:40925 | Workers: 0 |
| Dashboard: /proxy/33379/status | Total threads: 0 |
| Started: Just now | Total memory: 0 B |
Workers
Worker: 0
| Comm: tcp://127.0.0.1:37687 | Total threads: 1 |
| Dashboard: /proxy/42279/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:40485 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-63dkdj2e | |
Worker: 1
| Comm: tcp://127.0.0.1:41189 | Total threads: 1 |
| Dashboard: /proxy/39715/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:44345 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-dwrnc_5a | |
Worker: 2
| Comm: tcp://127.0.0.1:43301 | Total threads: 1 |
| Dashboard: /proxy/35927/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:42619 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-h4uffme2 | |
Worker: 3
| Comm: tcp://127.0.0.1:45663 | Total threads: 1 |
| Dashboard: /proxy/36877/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:35307 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-7n68z_k0 | |
Worker: 4
| Comm: tcp://127.0.0.1:44061 | Total threads: 1 |
| Dashboard: /proxy/34909/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:43545 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-dqy7zkcf | |
Worker: 5
| Comm: tcp://127.0.0.1:43697 | Total threads: 1 |
| Dashboard: /proxy/41037/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:44861 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-ij_hy9ku | |
Worker: 6
| Comm: tcp://127.0.0.1:40471 | Total threads: 1 |
| Dashboard: /proxy/40779/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:46023 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-t73b75hp | |
Worker: 7
| Comm: tcp://127.0.0.1:37047 | Total threads: 1 |
| Dashboard: /proxy/46397/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:39529 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-q6gwc33v | |
Worker: 8
| Comm: tcp://127.0.0.1:46883 | Total threads: 1 |
| Dashboard: /proxy/38529/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:35587 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-nuhgxzwl | |
Worker: 9
| Comm: tcp://127.0.0.1:39111 | Total threads: 1 |
| Dashboard: /proxy/43013/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:34233 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-7_rnbeb_ | |
Worker: 10
| Comm: tcp://127.0.0.1:40583 | Total threads: 1 |
| Dashboard: /proxy/45207/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:46277 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-gnno4ukg | |
Worker: 11
| Comm: tcp://127.0.0.1:45809 | Total threads: 1 |
| Dashboard: /proxy/44713/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:39119 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-81zqveog | |
Worker: 12
| Comm: tcp://127.0.0.1:34107 | Total threads: 1 |
| Dashboard: /proxy/36557/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:34765 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-qcqm4rjj | |
Worker: 13
| Comm: tcp://127.0.0.1:41351 | Total threads: 1 |
| Dashboard: /proxy/34811/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:44111 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-ga1u4ilc | |
Worker: 14
| Comm: tcp://127.0.0.1:41199 | Total threads: 1 |
| Dashboard: /proxy/45837/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:33365 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-1_5zjsi3 | |
Worker: 15
| Comm: tcp://127.0.0.1:41197 | Total threads: 1 |
| Dashboard: /proxy/40169/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:36459 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-awyn091c | |
Worker: 16
| Comm: tcp://127.0.0.1:45665 | Total threads: 1 |
| Dashboard: /proxy/33641/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:43059 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-26yukazm | |
Worker: 17
| Comm: tcp://127.0.0.1:41755 | Total threads: 1 |
| Dashboard: /proxy/36227/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:40553 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-kkq14x4p | |
Worker: 18
| Comm: tcp://127.0.0.1:45033 | Total threads: 1 |
| Dashboard: /proxy/33669/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:34937 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-xzl28cot | |
Worker: 19
| Comm: tcp://127.0.0.1:43333 | Total threads: 1 |
| Dashboard: /proxy/43127/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:33043 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-8nbnd1tp | |
Worker: 20
| Comm: tcp://127.0.0.1:35019 | Total threads: 1 |
| Dashboard: /proxy/40739/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:46825 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-t7bu8q9x | |
Worker: 21
| Comm: tcp://127.0.0.1:34963 | Total threads: 1 |
| Dashboard: /proxy/46857/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:37505 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-wsfkfq7_ | |
Worker: 22
| Comm: tcp://127.0.0.1:45411 | Total threads: 1 |
| Dashboard: /proxy/42275/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:34547 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-led35s9z | |
Worker: 23
| Comm: tcp://127.0.0.1:43671 | Total threads: 1 |
| Dashboard: /proxy/44737/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:39489 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-mfspy7as | |
Worker: 24
| Comm: tcp://127.0.0.1:40919 | Total threads: 1 |
| Dashboard: /proxy/45849/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:39781 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-72li3hhz | |
Worker: 25
| Comm: tcp://127.0.0.1:38155 | Total threads: 1 |
| Dashboard: /proxy/38369/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:39901 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-m__1gnut | |
Worker: 26
| Comm: tcp://127.0.0.1:45793 | Total threads: 1 |
| Dashboard: /proxy/38635/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:35057 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-tv_fma34 | |
Worker: 27
| Comm: tcp://127.0.0.1:36393 | Total threads: 1 |
| Dashboard: /proxy/39437/status | Memory: 8.97 GiB |
| Nanny: tcp://127.0.0.1:36169 | |
| Local directory: /jobfs/158917954.gadi-pbs/dask-scratch-space/worker-ukkkawqb | |
[ ]:
ROOT_FOLDER = "/g/data/zv30/non-cmip/ACCESS-CM3/cm3-run-29-01-2025-exp-runoff-smoothing-rmax-500-efold-1000/archive/1981/atmosphere/"
FILES = glob.glob(ROOT_FOLDER + "*mon.nc")
[ ]:
OUTPUT_FOLDER = "YOUR-OUTPUT-PATH"
[ ]:
parent_experiment_config = {
"parent_experiment_id": "piControl",
"parent_activity_id": "CMIP",
"parent_source_id": "ACCESS-CM2",
"parent_variant_label": "r1i1p1f1",
"parent_time_units": "days since 0001-01-01 00:00:00",
"parent_mip_era": "CMIP6",
"branch_time_in_child": 0.0,
"branch_time_in_parent": 54786.0,
"branch_method": "standard",
}
Amon.pr#
[ ]:
cmoriser = ACCESS_ESM_CMORiser(
input_data=FILES,
compound_name="Amon.pr",
experiment_id="piControl",
source_id="ACCESS-CM2", # <-- currently we don't have metadata for CM3, so treat it as CM2 data.
model_id="ACCESS-CM3", # <-- model_id need to be explicitly specifiied for cmoriser to find the right mappings for CM3.
variant_label="r1i1p1f1",
grid_label="gn",
activity_id="CMIP",
output_path=OUTPUT_FOLDER,
parent_info=parent_experiment_config, # <-- This is optional, can be skipped if not needed.
)
[ ]:
cmoriser.run()
[ ]:
cmoriser.write()
Amon.ts#
[ ]:
cmoriser = ACCESS_ESM_CMORiser(
input_data=FILES,
compound_name="Amon.ts",
experiment_id="piControl",
source_id="ACCESS-CM2", # <-- currently we don't have metadata for CM3, so treat it as CM2 data.
model_id="ACCESS-CM3", # <-- model_id need to be explicitly specifiied for cmoriser to find the right mappings for CM3.
variant_label="r1i1p1f1",
grid_label="gn",
activity_id="CMIP",
output_path=OUTPUT_FOLDER,
parent_info=parent_experiment_config, # <-- This is optional, can be skipped if not needed.
)
[ ]:
cmoriser.run()
[ ]:
cmoriser.write()
Omon.tos#
[ ]:
ROOT_FOLDER = "/g/data/zv30/non-cmip/ACCESS-CM3/cm3-run-29-01-2025-exp-runoff-smoothing-rmax-500-efold-1000/archive/1981/ocean/"
[ ]:
FILES = glob.glob(ROOT_FOLDER + "access-cm3.mom6.2d.tos.1mon.mean.*.nc")
[ ]:
cmoriser = ACCESS_ESM_CMORiser(
input_data=FILES,
compound_name="Omon.tos",
experiment_id="piControl",
source_id="ACCESS-CM2",
model_id="ACCESS-CM3",
variant_label="r1i1p1f1",
grid_label="gn",
activity_id="CMIP",
output_path=OUTPUT_FOLDER,
parent_info=parent_experiment_config, # <-- This is optional, can be skipped if not needed
)
[ ]:
cmoriser.run()
[ ]:
cmoriser.write()