Skip to content

SlabOceanSST silently overwrites surface temperature set via surface_condition in case setup Description #4580

Description

@jefftyoder

Issue Description

When using the SlabOceanSST surface model, any surface temperature specified via surface_condition in a case setup file (under src/setups/) is silently overwritten during model initialization.
The overwrite occurs in src/config/model_getters.jl L835, where the slab ocean's prognostic sea surface temperature is initialized from values defined in src/setups/common/prognostic_variables.jl L216.

This is the correct and intended behavior for SlabOceanSST — the surface temperature is a prognostic variable owned by the slab ocean component and should not be externally prescribed — but because no warning is emitted, users who have also specified a surface_condition temperature in their case setup may not realize their value is being ignored.
This is particularly likely to cause confusion when adapting an existing case (which may have a prescribed SST set via surface_condition) to use SlabOceanSST, or when debugging a case where the expected initial surface temperature is not reflected in the output.

Suggested fix

Issue a warning at initialization time when SlabOceanSST is active and a surface temperature has also been specified via surface_condition, informing the user that the surface_condition value will be ignored in favor of the slab ocean's prognostic initialization. Something along the lines of:

┌ Warning: `SlabOceanSST` is active; the surface temperature specified via
│ `surface_condition` in the case setup will be overwritten by the slab ocean's
│ prognostic initialization (see `prognostic_variables.jl`).
└ @ ClimaAtmos ...

This would require no change to existing behavior — only the addition of a diagnostic message to aid user awareness.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions