subroutine register_ocean_dataovr(cfg, schema)
!! `&ocean_dataovr_nml`: file-backed surface forcing (PR-15). Flat
!! per-tag knobs (`<tag>_file`, `<tag>_var`, `<tag>_scale`,
!! `<tag>_add`) rather than a MOM6-style parallel-array data table
!! — the schema engine has no string-array key type, and the set of
!! recognised tags is fixed by the slots they feed, so a flat
!! layout is both expressible today and self-documenting in
!! `docs/generated_nml_knobs.md`.
type(config_t), target, intent(in) :: cfg
type(nml_schema_t), intent(inout) :: schema
type(nml_group_t) :: g
logical, pointer :: pl
real(wp), pointer :: pr
character(len=:), pointer :: ps
g%name = "ocean_dataovr"
g%doc = "File-backed surface forcing (PR-15): wind stress, heat, freshwater."
pl => cfg%ocean%dataovr%enable
call g%add(nml_logical("enable", pl, &
"Master switch (default off; requires RDB_ENABLE_NETCDF=ON)"))
ps => cfg%ocean%dataovr%time_mode
call g%add(nml_enum("time_mode", ps, &
"Shared time-axis mode for every active tag", &
allowed=[character(len=6) :: "linear", "cyclic", "static"]))
pr => cfg%ocean%dataovr%cycle_period
call g%add(nml_real("cycle_period", pr, &
"Climatology period (required > 0 when time_mode=cyclic)", &
units="s", min=0.0_wp))
pr => cfg%ocean%dataovr%t_offset
call g%add(nml_real("t_offset", pr, &
"Added to the model time before the file-axis lookup", units="s"))
pl => cfg%ocean%dataovr%oor_clamp
call g%add(nml_logical("oor_clamp", pl, &
"Clamp an out-of-range query to the end record instead of aborting"))
call add_dataovr_entry(g, cfg%ocean%dataovr%tau_x, "tau_x", &
"zonal wind stress", "Pa")
call add_dataovr_entry(g, cfg%ocean%dataovr%tau_y, "tau_y", &
"meridional wind stress", "Pa")
call add_dataovr_entry(g, cfg%ocean%dataovr%heat, "heat", &
"net surface heat flux (positive down)", "W m-2")
call add_dataovr_entry(g, cfg%ocean%dataovr%evap, "evap", &
"evaporative mass flux (<= 0)", "kg m-2 s-1")
call add_dataovr_entry(g, cfg%ocean%dataovr%lprec, "lprec", &
"liquid precipitation (>= 0)", "kg m-2 s-1")
call add_dataovr_entry(g, cfg%ocean%dataovr%salt, "salt", &
"surface salt flux (positive salinifies)", "kg m-2 s-1")
call schema%add_group(g)
end subroutine register_ocean_dataovr