ACCESS-NRI / um2nc-standalone

Standalone um2nc/um2netcdf to unify development efforts in a single repository.
Apache License 2.0
0 stars 0 forks source link

Stage 1 Develop minimum `um2nc` for esm1.5 postprocessing #1

Open truth-quark opened 5 months ago

truth-quark commented 5 months ago

This is a high level project management issue to outline general work to prepare a minimum um2nc utility for esm1.5 post-processing. For simplicity, this content is a GitHub issue, however can be a separate markdown document if required.

The stages are intended as scaffolding, not a prescriptive approach (e.g. stage 2 & stage 3 may interleave).

Overview

Multiple versions of um2nc exist on gadi, with uncertain provenance. This project is to create a single canonical version of um2nc to replace other copies, starting from Martin Dix's version copied from 16/6/2024.

Background: the original um2nc code lacked unit tests & it is unclear what manual testing had been carried out (or the results). There was no way to determine if the code was functioning as intended. Additionally, no requirements documentation existed at the beginning of this project. Martin Dix knows project history & requirements, although this was not captured in documentation.

An early review identified non-modular code as another primary concern. The code had been developed over several years, accumulating features across the module. The base version contained a mix of smaller, separate functions & several larger workflow functions. The larger workflow functions bundled several functional steps together, with the coupling making the code difficult or unwieldy to test isolated parts. The code lacked a consistent software architecture. Other smaller issues existed, including complicated logic, older features & missing checks.

Naming: different copies have different module names, depending on different authors & their customisations. In this repo, the name um2nc is considered synonymous with um2netcdf, with the primary module being um2netcdf.py.

Overarching Requirements & Goals

Development Stage 1 - Retrofitting & Modularisation

The first dev stage focuses on rearranging the code & retrofitting unit tests. The goal is to substantially modularise the code base & provide a suite of tests to support future fixes & refactoring. Without tests, there is no safety net to determine if the changes are breaking or non-breaking.

NB: as this stage is uncertain, some loose work is perfectly acceptable. The goal is to decouple first, learn the code & then improve it. It is significantly easier working with smaller pieces due to reduced dependencies.

Tasks:

truth-quark commented 5 months ago

This requirement also relates to this issue: https://github.com/ACCESS-NRI/access-esm1.5-configs/issues/3

truth-quark commented 1 month ago

See also #65 / the Test Driven Repair strategy for further details.

truth-quark commented 1 month ago

This issue is being split into separate issues for the 3 core development steps.