Skip to content

Commit 5a0356e

Browse files
committed
Update doc/cam4_fwaut_constituent_order.md
1 parent e2e25f5 commit 5a0356e

1 file changed

Lines changed: 25 additions & 30 deletions

File tree

doc/cam4_fwaut_constituent_order.md

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,32 @@ Forcing capgen-ng's advected water species into the baseline order
6565
`[cloud_liquid = 1, cloud_ice = 2, water_vapor = 3]` (a flag-guarded one-off
6666
patch in the framework's `ccp_model_const_table_lock`) makes QPC4 reproduce the
6767
ccpp-prebuild baseline **bit-for-bit** (cprnc: all fields identical). This
68-
isolates constituent ordering as the *sole* cause. Patch (file `ccpp_constituent_prop_mod.F90.patch` in the top-level directory of the `feature/capgen-ng` ccpp-framework branch):
68+
isolates constituent ordering as the *sole* cause. See section "Artifacts"
69+
below for the full patch.
6970

71+
## Assessment — neither order is "wrong"
72+
73+
Both builds register the same constituents with identical properties; the
74+
ordering is not physically meaningful, and the resulting solutions are
75+
roundoff-equivalent and both physically correct. The b4b failure reflects only
76+
that capgen-ng's (arbitrary) order differs from the (equally arbitrary) order
77+
the capgen baseline happened to produce.
78+
79+
## Decision requested
80+
81+
To resolve QPC4 (and any other case sensitive to constituent order), we propose:
82+
83+
1. Give capgen-ng a **deterministic, documented** constituent-registration order
84+
(e.g. water vapor first, with a clear rule for how constituents land in the
85+
array) — replacing today's hash-bucket order.
86+
2. Adopt the new documented order and **re-baseline** the affected CAM-SIMA cases once.
87+
88+
The temporary proof patch will be removed once the path is agreed.
89+
90+
## Artifacts
91+
92+
- **Patch:** Stored as `ccpp_constituent_prop_mod.F90.patch` in the top-level
93+
directory of the `feature/capgen-ng` ccpp-framework branch):
7094
```
7195
--- capgen-ng/src/ccpp_constituent_prop_mod.F90
7296
+++ capgen-ng/src/ccpp_constituent_prop_mod.F90
@@ -116,36 +140,7 @@ isolates constituent ordering as the *sole* cause. Patch (file `ccpp_constituent
116140
index_const = index_const + 1
117141
if (index_const > num_vars) then
118142
```
119-
120-
## Assessment — neither order is "wrong"
121-
122-
Both builds register the same constituents with identical properties; the
123-
ordering is not physically meaningful, and the resulting solutions are
124-
roundoff-equivalent and both physically correct. The b4b failure reflects only
125-
that capgen-ng's (arbitrary) order differs from the (equally arbitrary) order
126-
the capgen baseline happened to produce.
127-
128-
## Decision requested
129-
130-
To resolve QPC4 (and any other case sensitive to constituent order), we propose:
131-
132-
1. Give capgen-ng a **deterministic, documented** constituent-registration order
133-
(e.g. water vapor first, with a clear rule for how constituents land in the
134-
array) — replacing today's hash-bucket order.
135-
2. Adopt the new documented order and **re-baseline** the affected CAM-SIMA cases once.
136-
137-
The temporary proof patch will be removed once the path is agreed.
138-
139-
## Artifacts
140-
141-
- **Patch (git diff):** `<FILL IN: path to the .patch / repo+commit>`
142-
reproduce with
143-
`git -C EXT/cam-sima-ng/ccpp_framework/capgen-ng diff src/ccpp_constituent_prop_mod.F90`.
144143
- **Run directories (Derecho):**
145144
- Baseline (original capgen): `<FILL IN>`
146145
- capgen-ng, unpatched (shows the FWAUT diff): `<FILL IN>`
147146
- capgen-ng + reorder patch (**b4b**): `<FILL IN>`
148-
- **cprnc summaries:**
149-
- unpatched vs baseline: `<FILL IN: FWAUT RMS ≈ 4.24e-2, state fields ~15 digits>`
150-
- patched vs baseline: `<FILL IN: all fields identical (b4b)>`
151-
- **Constituent lists (`debug_output = 2`, `atm.log`):** as tabulated above.

0 commit comments

Comments
 (0)