Skip to content

Commit 157ae9a

Browse files
authored
Merge branch 'main' into update_om2
2 parents 4f61a17 + 32f7149 commit 157ae9a

18 files changed

+2005
-3897
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/[email protected]
25-
- uses: prefix-dev/[email protected].2
25+
- uses: prefix-dev/[email protected].3
2626
with:
2727
pixi-version: v0.39.5
2828
- name: Run pre-commit
@@ -37,7 +37,7 @@ jobs:
3737
uses: actions/[email protected]
3838

3939
- name: Setup pixi
40-
uses: prefix-dev/[email protected].2
40+
uses: prefix-dev/[email protected].3
4141
with:
4242
pixi-version: v0.39.5
4343

.github/workflows/full-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
2626

2727
- name: Setup pixi
28-
uses: prefix-dev/setup-pixi@59d669bca01299140a23e5e8a9f713ad36f1f069 # v0.9.0
28+
uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.0
2929
with:
3030
pixi-version: v0.39.5
3131

@@ -60,7 +60,7 @@ jobs:
6060

6161
- name: Upload coverage artifacts
6262
if: github.event.inputs.test_type == 'all'
63-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
63+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6464
with:
6565
name: coverage-report
6666
path: htmlcov/

src/access_moppy/driver.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def __init__(
2727
output_path: Optional[Union[str, Path]] = ".",
2828
drs_root: Optional[Union[str, Path]] = None,
2929
parent_info: Optional[Dict[str, Dict[str, Any]]] = None,
30+
model_id: Optional[str] = None,
3031
):
3132
"""
3233
Initializes the CMORiser with necessary parameters.
@@ -40,6 +41,7 @@ def __init__(
4041
:param output_path: Path to write the CMORised output.
4142
:param drs_root: Optional root path for DRS structure.
4243
:param parent_info: Optional dictionary with parent experiment metadata.
44+
:param model_id: Optional model identifier for model-specific mappings (e.g., 'ACCESS-ESM1.6').
4345
"""
4446

4547
self.input_paths = input_paths
@@ -50,7 +52,8 @@ def __init__(
5052
self.variant_label = variant_label
5153
self.grid_label = grid_label
5254
self.activity_id = activity_id
53-
self.variable_mapping = load_cmip6_mappings(compound_name)
55+
self.model_id = model_id
56+
self.variable_mapping = load_model_mappings(compound_name, model_id)
5457
self.drs_root = Path(drs_root) if isinstance(drs_root, str) else drs_root
5558
if not parent_info:
5659
warnings.warn(

0 commit comments

Comments
 (0)