subroutine register_ocean_thermo(cfg, schema)
!! `&ocean_thermo_nml`: thermodynamics switch + scalar surface fluxes.
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_thermo"
g%doc = "Thermodynamics master switch + scalar surface fluxes."
ps => cfg%ocean%thermo%sw_source
call g%add(nml_enum("sw_source", ps, &
"Shortwave irradiance source: net_heat (legacy) or q_sw", &
allowed=[character(len=8) :: "net_heat", "q_sw"]))
ps => cfg%ocean%thermo%kpp_sw_method
call g%add(nml_enum("kpp_sw_method", ps, &
"KPP shortwave-in-BL method: all_sw | mxl_sw | lv1_sw", &
allowed=[character(len=8) :: "all_sw", "mxl_sw", "lv1_sw"]))
pl => cfg%ocean%thermo%epbl_sw_ctke
call g%add(nml_logical("epbl_sw_ctke", pl, &
"Charge the EPBL TKE ledger for penetrating shortwave"))
pl => cfg%ocean%thermo%enable_thermodynamics
call g%add(nml_logical("enable_thermodynamics", pl, &
"Run EOS + tracer advection + vertical mixing"))
pr => cfg%ocean%thermo%q_heat
call g%add(nml_real("q_heat", pr, "Net surface heat flux (positive down)", &
units="W/m^2"))
pr => cfg%ocean%thermo%q_salt
call g%add(nml_real("q_salt", pr, "Net surface salt flux (positive salinifies)", &
units="kg/m^2/s"))
pr => cfg%ocean%thermo%sw_pen_frac
call g%add(nml_real("sw_pen_frac", pr, &
"Penetrating fraction of q_heat (0 = off, all at surface)"))
pr => cfg%ocean%thermo%sw_band_ratio
call g%add(nml_real("sw_band_ratio", pr, &
"Two-band shortwave band-1 weight R (Jerlov type I)"))
pr => cfg%ocean%thermo%sw_zeta1
call g%add(nml_real("sw_zeta1", pr, &
"Shortwave band-1 e-folding depth", units="m"))
pr => cfg%ocean%thermo%sw_zeta2
call g%add(nml_real("sw_zeta2", pr, &
"Shortwave band-2 e-folding depth", units="m"))
call schema%add_group(g)
end subroutine register_ocean_thermo