Remove W3_IS2 compile guard from IC5 floe diameter update in w3wavemd - #15
Conversation
| ! | ||
| ! 1.e Ice floe interval | ||
| ! | ||
| #ifdef W3_IS2 |
There was a problem hiding this comment.
Are there cases where this code shouldn't be included ?
should this say
#if defined(W3_IS2) || defined(W3_IS0) or something ?
There was a problem hiding this comment.
Thanks @anton-seaice, I checked this, and I don’t think this should be changed to:
#if defined(W3_IS2) || defined(W3_IS0)
The reason is that this update is not really specific to either "IS2" or "IS0". "W3UIC5" is the generic updater for the IC5 floe-diameter input field: it copies the imported forcing field "ICEP5" into the internal WW3 fields "ICEF" / "ICEDMAX".
So the correct gate is the existing runtime condition:
IF ( FLIC5 .AND. DTI50.NE.0. ) THEN
CALL W3UIC5( FLFRST )
END IF
"FLIC5" is set from "INFLAGS1(-3)", i.e. whether the IC5/floe-diameter input is actually active. In ACCESS-OM3 this is enabled by "wav_coupling_to_cice = .true." / "ICE_PARAM5 = C". If IC5 forcing is not active, "FLIC5" is false and this block does not run.
So there are cases where the code should not execute, but that is already handled by "FLIC5". I don’t think there are cases where it needs to be compiled out based on the selected sea-ice source/scattering switch.
Using "#if defined(W3_IS2) || defined(W3_IS0)" would fix the current "IC4 IS0" case, but it would still couple a generic forcing-field update to particular ice physics switches. That seems more fragile than using the existing runtime forcing flag.
**1. Summary**: This build updates the component versions to MOM6 `2026.05.002`, CICE6 `CICE6.6.3-2`, and WW3 `2026.03.001`. It includes MOM6 diagnostic and numerical fixes, a CICE supergrid fix, and WW3 memory leak and floe size output fixes. **2. Issues Addressed:** - Add a minimum-thickness clamp in `mixedlayer_restrat_Bodner` ([MOM6 #61](ACCESS-NRI/MOM6#61)). - Add the `FILE_DYE_TRACER_ACCUMULATE` parameter for file-based dye tracers ([MOM6 #67](ACCESS-NRI/MOM6#67)). - Save the correct thickness for the `vert_remap_h` diagnostic ([MOM6 #66](ACCESS-NRI/MOM6#66)). - Add a numerical-mixing diagnostic ([MOM6 #57](ACCESS-NRI/MOM6#57)). - Fix `ANGLE` and tripole closure in the MOM supergrid ([CICE #50](ACCESS-NRI/CICE#50)). This is answer-changing. - Remove the `W3_IS2` compile guard from the IC5 floe-diameter update ([WW3 #15](ACCESS-NRI/WW3#15)). - Avoid ST6 `IRANGE` heap allocations in source loops ([WW3 #16](ACCESS-NRI/WW3#16)). **3. Dependencies (e.g. on payu, model or om3-scripts)** This change requires changes to (note required version where true): - [ ] payu: - [x] access-om3: 2026.05.003 - [ ] om3-scripts: **5. CI Testing** - [x] `!test repro` or `!test repro commit` has been run The determinism tests pass for the new build. **6. Reproducibility** Is this reproducible with the previous commit? (If not, why not?) - [ ] Yes - [x] No The CICE supergrid fix is answer-changing **7. Documentation** The docs folder has been updated with output from running the model? - [ ] Yes - [x] N/A A PR has been created for updating the documentation? - [ ] Yes: <!--link--> - [x] N/A **8. Formatting** Changes to MOM_input have been copied from model output in docs/MOM_parameter_docs.short? - [ ] Yes - [x] N/A **9. Merge Strategy** - [ ] Merge commit - [ ] Rebase and merge - [x] Squash --------- Co-authored-by: access-bot <113399144+access-bot@users.noreply.github.com>
This PR fixes the missing
W3UIC5update in IC4 builds by removing incorrect#ifdef W3_IS2guards inw3wavemd.F90.In ACCESS-OM3
IC4 IS0configurations, CICE correctly exports floe diameter asSi_floediam, and WW3 imports it intoICEP5, but theW3UIC5call that copiesICEP5intoICEFwas not compiled becauseW3_IS2is not defined. As a result,ICEFstayed at its hard-coded initial value of 1000 m throughout the run.The fix removes the unnecessary compile guards while keeping the existing runtime check, refer here:
Validation with
access-om3/pr242-1confirms the fix:ICEFis no longer constant 1000 m, but varies from the CICE FSD floor value of 5.4 m up to ~1255 m, consistent with2 × fsdrad.This restores the intended CICE → CMEPS → WW3 floe-diameter coupling path for IC4 wave-ice scattering.
The fixed build produces spatially varying
ICEFvalues instead of the constant 1000 m initialisation value: