Skip to content

Experimental wind-speed-dependent betamax for ST4 - updated codebase#19

Closed
pieterbartsmit wants to merge 176 commits into
developfrom
f/sync_with_upstream
Closed

Experimental wind-speed-dependent betamax for ST4 - updated codebase#19
pieterbartsmit wants to merge 176 commits into
developfrom
f/sync_with_upstream

Conversation

@pieterbartsmit

Copy link
Copy Markdown

Implements a linear wind-speed-dependent betamax relation for the ST4 wind input source term:

betamax_eff = BETAMAX_INTERCEPT + BETAMAX_SLOPE * min(U10, 25.0)

This is motivated by a known condition-dependent bias: the current single-value betamax is biased slightly high at moderate winds and low at high winds. The 25 m/s cap reflects the limits of reliable air-sea physics and Spotter wind estimates. See notion page for further details

Implementation
The change is currently hardcoded in w3src4md.F90 for testing purposes.

The HF tail stress lookup table is built at initialisation with a fixed betamax. Since the table entries scale linearly with betamax, the table results are rescaled on lookup by BBETA_EFF / BBETA before use — this keeps the tail stress consistent with the resolved-spectrum computation at no meaningful cost.

Not changed

Namelist parameters (BETAMAX still read and stored as before)
Model definition file format
Restart file format

Follow-up work
If it works, we can consider promoting to proper namelist parameters (BETAMAX_INTERCEPT, BETAMAX_SLOPE) with corresponding updates to w3gdatmd.F90, w3gridmd.F90, w3iogrmd.F90, and ww3_ounf.F90.

mingchen-NOAA and others added 29 commits November 17, 2025 13:10
…AUSS_SEIDEL_BLOCK to address reproducibility issues (NOAA-EMC#1524)
…A-EMC#1564)

w3iosfmd, w3profsmd, w3snl1md, w3src4md, w3srcemd, w3triamd and w3uqckmd
…_JACOBI_GAUSS_SEIDEL_BLOCK to enable bit for bit reproducibility across different numbers of MPI processes. (NOAA-EMC#1538)
…tart reproducibility when variable water level is present and the domain has deep bathymetry. (NOAA-EMC#1589)
…evel and deep bathymetry. In subroutine W3ULEV KDCHK computed from bathymetric depth rather than total water level. (NOAA-EMC#1591)
…ream

# Conflicts:
#	.github/workflows/gnu.yml
#	.github/workflows/intel.yml
#	CMakeLists.txt
#	manual/eqs/ICE4.tex
#	manual/eqs/output.tex
#	manual/manual.bib
#	model/ci/spack_gnu.yaml
#	model/ci/spack_intel.yaml
#	model/inp/ww3_shel.inp
#	model/nml/namelists.nml
#	model/nml/ww3_shel.nml
#	model/src/cmake/switches.json
#	model/src/w3adatmd.F90
#	model/src/w3gdatmd.F90
#	model/src/w3gridmd.F90
#	model/src/w3initmd.F90
#	model/src/w3iogomd.F90
#	model/src/w3iogrmd.F90
#	model/src/w3iopomd.F90
#	model/src/w3iosfmd.F90
#	model/src/w3odatmd.F90
#	model/src/w3ounfmetamd.F90
#	model/src/w3partmd.F90
#	model/src/w3sdb1md.F90
#	model/src/w3sic4md.F90
#	model/src/w3snl1md.F90
#	model/src/w3src4md.F90
#	model/src/w3srcemd.F90
#	model/src/w3wavemd.F90
#	model/src/wminitmd.F90
#	model/src/wmiopomd.F90
#	model/src/ww3_multi.F90
#	model/src/ww3_ounf.F90
#	model/src/ww3_outf.F90
#	model/src/ww3_outp.F90
#	model/src/ww3_shel.F90
#	model/src/ww3_trnc.F90
#	model/tools/bash/ww3_shel_inp2nml.sh
#	regtests/bin/matrix.base
#	regtests/bin/matrix_cmake_ncep
#	regtests/bin/run_cmake_test
#	regtests/unittests/CMakeLists.txt
#	regtests/unittests/test_io_points_bin.F90
#	regtests/ww3_tic1.1/info
#	regtests/ww3_tp2.3/input/namelists_GARDEN.nml
#	regtests/ww3_tp2.3/input/ww3_grid.inp
#	regtests/ww3_ufs1.1/input_unstr/namelists_b.nml
…en removed. Our custom code still refered to these in the read statements.

These labels used to be involved in error handling; and on the happy path should not occur. It is not entirely clear how the new version of ww3 handles potential IO errors. It seems they have just stripped all error handling.

Further there was an error in "wcor" (the linear windspeed enhancement) read syntax statement.
… code

- PTHP0 was incorrectly reset to UNDEF instead of PTHP02 (w3iogomd.F90)
- ASCII write for PNR2 was writing PNR instead (w3iogomd.F90)
- Duplicate USE WMMDATMD/MDSUPA block from merge conflict (wminitmd.F90)
- Typo in NetCDF standard name: 'diectional' -> 'directional' (w3ounfmetamd.F90)
The upstream refactor replaced explicit IFJ range checks with NOGE(IFI)-2,
which correctly skips the last two scalar-per-point fields (PWST, PNR).
However our extension of group 4 to 24 fields (PTMETH2 second partitioning
scheme) caused PT12 (IFJ=23) to be incorrectly excluded from the partition
loop, as it is now the second-to-last field despite being partitioned (0:1).
Added explicit ELSE IF branch for IFJ=23 to restore correct behaviour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.