The DIAGNOSTICS_TS and AVERAGES options allow you to save everything you need, but it will take some care to get the balance you seek.

#define DIAGNOSTICS_TS will save (to the diagnostics file) the vertical advection, vertical mixing, lateral mixing, and time rate of changes terms provided you also activate the logical switches in ocean.in:

Dout(iTrate) == T F ! temp_rate, ... time rate of change

Dout(iThadv) == T F ! temp_hadv, ... horizontal total advection

Dout(iTvadv) == T F ! temp_vadv, ... vertical advection

Dout(iThdif) == T F ! temp_hdiff, ... horizontal total diffusion

Dout(iTvdif) == T F ! temp_vdiff, ... vertical diffusion

#define AVERAGES will save (to the averages file) the averages of heat flux, velocity <U>, temperature <T>, and quadratic product <UT> provided you also activate the logical switches in ocean.in:

Aout(idTsur) == T F ! shflux, ssflux surface net heat and salt flux

Aout(idUvel) == T ! u 3D U-velocity

Aout(idVvel) == T ! v 3D V-velocity

Aout(idTvar) == T F ! temp, salt temperature and salinity

Aout(idUTav) == T F ! utemp, usalt quadratic <u*t> T/S terms

Aout(idVTav) == T F ! vtemp, vsalt quadratic <v*t> T/S terms

You will need to construct <u't'> yourself from the saved <u*t> - <u>*<t>

Obviously, you must choose the same averaging time interval for averages and diagnostics, i.e. NAVG = NDIA.

Something to be aware of is that because of the time-changing vertical s coordinate your vertical integrals may be only approximate. ROMS offers the options to save the products of <dz*u*t> etc with these logical switches:

Aout(iHUTav) == T F ! Huontemp, ... T/S volume flux, <Huon*t>

Aout(iHVTav) == T F ! Hvomtemp, ... T/S volume flux, <Hvom*t>

These values then already have the vertical grid metrics included, so a vertical integral is achieved simply by a vertical summation. The horizontal grid metric dx = 1/m and dy = 1/n are also in these products ("Huon" means vertical spacing "H" times u "over n") so some care is needed here to use these values correctly.

This might not be an issue for you, but it was for me in my calculations of heat budgets on the New England Shelf: Wilkin, J. (2006):, The summer time heat budget and circulation of southeast New England shelf waters, Journal of Physical Oceanography, 36(11), 1997-2011

http://marine.rutgers.edu/%7Ewilkin/Wilkin_CBLAST_JPO2006.pdf I could not get an exact balance unless I took the time correlations of vertical grid spacing (which depends on sea level, zeta) and tidal velocity into account.

--

John.

_________________

John Wilkin: IMCS Rutgers University

71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559

jwilkin@rutgers.edu