Hello,
I’ve been working on heat budget diagnostics in ROMS and ran into something I’m struggling to interpret. I’m comparing:
1. Volume integral of `hadv` from the ROMS diagnostic (`dia`) output,
2. Surface integral of the horizontal advective flux calculated directly from the `his` output using a fixed control volume in physical (x, y, z)-space.
Here’s what I found:
* The diagnostic heat budget from the `dia` terms (i.e., hadv + vadv + hdiff + vdiff + sources) closes nicely, so the internal ROMS accounting is consistent.
* My surface integral method also flow the similar trend, so I don’t believe there is a numerical or math mistake in my flux calculations.
* However, the `hadv` term alone from `dia` does not match the horizontal advection calculated from the surface integral, even though I selected a control volume that spans the full depth and set surface heat fluxes to zero.
From what I’ve read, I suspect this is because ROMS uses terrain-following s-coordinates, so `hadv` and `vadv` are not pure Cartesian x, y, z horizontal and vertical advection terms. Some of the physical horizontal flux associated with sloping sigma layers ends up in `vadv` instead of `hadv`.
I’m looking for resources or documentation to help me better understand:
1. How exactly `hadv` / `vadv` (and similarly `hdiff` / `vdiff`) are defined in ROMS,
2. How to transform these diagnostics into physical horizontal and vertical components in Cartesian coordinates, so I can interpret them more intuitively,
3. Whether there are example scripts or workflows others have used for this type of analysis.
Any explanations, references, or example code would be greatly appreciated. I’ve read through the WikiROMS pages on sigma coordinates, but I’m still unsure about how to formally make this transformation.
Thanks in advance for your help!