Skip to content

Commit 6959b00

Browse files
committed
Update documentation for batch processing system and enhance getting started guide
1 parent b0c1da0 commit 6959b00

4 files changed

Lines changed: 725 additions & 38 deletions

File tree

README.md

Lines changed: 126 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,155 @@
1-
# ACCESS Model Output Post-Processor (ACCESS-MOPPeR) v2.1.0a (Alpha Version)
1+
# ACCESS Model Output Post-Processor (ACCESS-MOPPeR) v2
22

3-
## Overview
4-
ACCESS-MOPPeR v2.1.0a is a CMORisation tool designed to post-process ACCESS model output. This version represents a significant rewrite of the original MOPPeR, focusing on usability rather than raw performance. It introduces a more flexible and user-friendly Python API that can be integrated into Jupyter notebooks and other workflows.
5-
6-
ACCESS-MOPPeR allows for targeted CMORisation of individual variables and is specifically designed to support the ACCESS-ESM1.6 configuration prepared for CMIP7 FastTrack. However, ocean variable support remains limited in this alpha release.
3+
ACCESS-MOPPeR is a CMORisation tool designed to post-process ACCESS model output and produce CMIP-compliant datasets. This version represents a significant rewrite focusing on usability, flexibility, and integration with modern Python workflows.
74

85
## Key Features
9-
- **Improved Usability**: Designed for ease of use over maximum performance.
10-
- **Python API**: Enables seamless integration into Python-based workflows, including Jupyter notebooks.
11-
- **Flexible CMORisation**: Supports targeted CMORisation of specific variables.
12-
- **ACCESS-ESM1.6 Support**: Tailored for CMIP7 FastTrack simulations.
13-
- **Cross-Platform Compatibility**: Can be run from any computing platform, not limited to NCI Gadi.
14-
- **Dask Enabled**
156

16-
## Current Limitations
17-
- **Alpha Version**: Intended for evaluation purposes only; not recommended for data publication.
7+
- **Python API** for integration into notebooks and scripts
8+
- **Batch processing system** for HPC environments with PBS
9+
- **Real-time monitoring** with web-based dashboard
10+
- **Flexible CMORisation** of individual variables
11+
- **Dask-enabled** for scalable parallel processing
12+
- **Cross-platform compatibility** (not limited to NCI Gadi)
13+
- **CMIP6 and CMIP7 FastTrack support**
1814

19-
> **⚠️ Variable Mapping Under Review**
20-
>
21-
> We are currently reviewing the mapping of ACCESS variables to their CMIP6 and CMIP7 equivalents. Some variables that require derivation may not be available yet, or their calculation may need further verification.
22-
> **If you notice any major issues or missing variables, please submit an issue!**
15+
## Installation
2316

17+
ACCESS-MOPPeR requires Python >= 3.11. Install with:
2418

25-
## Background
26-
ACCESS-MOPPeR v2 is a complete rewrite of the original APP4 and MOPPeR frameworks. Unlike previous versions, it does **not** depend on CMOR; instead, it leverages modern Python libraries such as **xarray** and **dask** for efficient processing of NETCDF files. This approach streamlines the workflow, improves flexibility, and enhances integration with contemporary data science tools.
19+
```bash
20+
pip install numpy pandas xarray netCDF4 cftime dask pyyaml tqdm requests streamlit
21+
pip install .
22+
```
2723

28-
While retaining the core concepts of "custom" and "cmip" modes, ACCESS-MOPPeR v2 unifies these workflows within a single configuration file, focusing on usability and extensibility for current and future CMIP projects.
24+
## Quick Start
2925

30-
---
26+
### Interactive Usage (Python API)
3127

32-
## Installation
28+
```python
29+
import glob
30+
from access_mopper import ACCESS_ESM_CMORiser
3331

32+
# Select input files
33+
files = glob.glob("/path/to/model/output/*mon.nc")
3434

35-
```sh
36-
pip install numpy pandas xarray netCDF4 cftime dask pyyaml tqdm requests
37-
pip install .
35+
# Create CMORiser instance
36+
cmoriser = ACCESS_ESM_CMORiser(
37+
input_paths=files,
38+
compound_name="Amon.pr", # table.variable format
39+
experiment_id="historical",
40+
source_id="ACCESS-ESM1-5",
41+
variant_label="r1i1p1f1",
42+
grid_label="gn",
43+
activity_id="CMIP",
44+
output_path="/path/to/output"
45+
)
46+
47+
# Run CMORisation
48+
cmoriser.run()
49+
cmoriser.write()
3850
```
3951

40-
---
52+
### Batch Processing (HPC/PBS)
4153

42-
## Documentation
54+
For large-scale processing on HPC systems:
4355

44-
See the [Getting Started notebook](notebooks/Getting_started.ipynb) and the [docs](docs/) folder for detailed usage and API documentation.
56+
1. **Create a configuration file** (`batch_config.yml`):
4557

46-
---
58+
```yaml
59+
variables:
60+
- Amon.pr
61+
- Omon.tos
62+
- Amon.ts
63+
64+
experiment_id: piControl
65+
source_id: ACCESS-ESM1-5
66+
variant_label: r1i1p1f1
67+
grid_label: gn
68+
69+
input_folder: "/g/data/project/model/output"
70+
output_folder: "/scratch/project/cmor_output"
4771

48-
## Testing
72+
file_patterns:
73+
Amon.pr: "output[0-4][0-9][0-9]/atmosphere/netCDF/*mon.nc"
74+
Omon.tos: "output[0-4][0-9][0-9]/ocean/*temp*.nc"
75+
Amon.ts: "output[0-4][0-9][0-9]/atmosphere/netCDF/*mon.nc"
4976

50-
To run tests:
77+
# PBS configuration
78+
queue: normal
79+
cpus_per_node: 16
80+
mem: 32GB
81+
walltime: "02:00:00"
82+
scheduler_options: "#PBS -P your_project"
83+
storage: "gdata/project+scratch/project"
5184

52-
```sh
53-
pytest
85+
worker_init: |
86+
module load conda
87+
conda activate your_environment
5488
```
5589
56-
---
90+
2. **Submit batch job**:
91+
92+
```bash
93+
mopper-cmorise batch_config.yml
94+
```
95+
96+
3. **Monitor progress** at http://localhost:8501
97+
98+
## Batch Processing Features
99+
100+
The batch processing system provides:
101+
102+
- **Parallel execution**: Each variable processed as a separate PBS job
103+
- **Real-time monitoring**: Web dashboard showing job status and progress
104+
- **Automatic tracking**: SQLite database maintains job history and status
105+
- **Error handling**: Failed jobs can be easily identified and resubmitted
106+
- **Resource optimization**: Configurable CPU, memory, and storage requirements
107+
- **Environment management**: Automatic setup of conda/module environments
108+
109+
### Monitoring Tools
110+
111+
- **Streamlit Dashboard**: Real-time web interface at http://localhost:8501
112+
- **Command line**: Use standard PBS commands (`qstat`, `qdel`)
113+
- **Database**: SQLite tracking at `{output_folder}/cmor_tasks.db`
114+
- **Log files**: Individual stdout/stderr for each job
115+
116+
### File Organization
117+
118+
```
119+
work_directory/
120+
├── batch_config.yml # Your configuration
121+
├── cmor_job_scripts/ # Generated PBS scripts and logs
122+
│ ├── cmor_Amon_pr.sh # PBS script
123+
│ ├── cmor_Amon_pr.py # Python processing script
124+
│ ├── cmor_Amon_pr.out # Job output
125+
│ └── cmor_Amon_pr.err # Job errors
126+
└── output_folder/
127+
├── cmor_tasks.db # Progress tracking
128+
└── [CMORised files] # Final output
129+
```
130+
131+
## Documentation
132+
133+
- **Getting Started**: `docs/source/getting_started.rst`
134+
- **Example Configuration**: `src/access_mopper/examples/batch_config.yml`
135+
- **API Reference**: [Coming soon]
136+
137+
## Current Limitations
138+
139+
- **Alpha version**: Intended for evaluation only
140+
- **Ocean variables**: Limited support in current release
141+
- **Variable mapping**: Under review for CMIP6/CMIP7 compliance
142+
143+
## Support
144+
145+
- **Issues**: Submit via GitHub Issues
146+
- **Questions**: Contact ACCESS-NRI support
147+
- **Contributions**: Welcome via Pull Requests
57148

58149
## License
59150

60151
ACCESS-MOPPeR is licensed under the Apache-2.0 License.
61152

62153
---
63154

64-
## Contact
65-
66-
Author: Romain Beucher
155+
**Background**: ACCESS-MOPPeR v2 is a complete rewrite using modern Python libraries (xarray, dask) instead of CMOR, providing improved flexibility and integration with contemporary data science workflows.

0 commit comments

Comments
 (0)