Computing advection using 'utemp' vs 'temp_xadv'

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
flq321

Computing advection using 'utemp' vs 'temp_xadv'

#1 Unread post by flq321 »

My understanding is the advection terms in the averaged files are written out as convergence of the fluxes, i.e., -d(uT)/dx, -d(vT)/dy, etc. I am trying to compare the time-averaged horizontal advection of temperature estimated two ways

1. The values written out in 'temp_xadv' and 'temp_yadv' in the diagnostic files.

2. Estimate the advection terms by finite-differencing 'utemp' and 'vtemp' (time-averaged quadratic terms), written out in the averaged files. If I want to compare with temp_xadv(i,j), I just take 'utemp' at the two adjoining cell faces and multiply with pm(i,j). Similarly for the 'vtemp' term but with pn(i,j).

I am attaching a plot showing how they compare. The y-axis is not the depth but is simply the array [-50:-1] such that -50 corresponds to the ocean bottom. The model has 50 vertical levels. The two panels in the left column show the two methods agree reasonably well. The panels on the right show the difference (red minus blue) between the two estimates. The difference is about two orders of magnitude smaller than the actual terms.

My questions:

(i) Why is there any difference at all? Shouldn't they be identical?
(ii) The difference plot shows the 'utemp' estimate underestimates 'temp_xadv' at all depths but the corresponding difference for eta-advection assumes both positive and negative values. Any particular reason for this trend?
Attachments
Tadvection_compare.png

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Computing advection using 'utemp' vs 'temp_xadv'

#2 Unread post by wilkin »

No, these things won't be exactly the same.

The _xadv and _yadv terms (and their divergence which is already saved for you in the companion _hadv diagnostics) are the fluxes through the faces (time averaged) exactly as ROMS computed them according to the selected advection scheme. In the case of the high order Akima and weighted-upwind schemes, these fluxes are computed over a 3 or 4 grid cell stencil so their divergence is not a simple difference of the u*temp terms on the faces of a single cell.

Moreover, the ROMS time varying vertical s-coordinate means that the cell thickness, H, and hence cell face area itself (H/n) varies with time on every time step. Thus the time average <u*temp> multiplied by the time average layer area <H/n> is not exactly equal to <H/n*u*temp> because the triple nonlinearity of the perturbations <H'u'temp'> is not zero.

But to assist in detailed term balance calculations ROMS offers the option to save these cell area weighted "quadratic" terms. Look for the line

Code: Select all

Aout(iHUTav) == F F     ! Huon_temp, ...     tracer volume flux, <Huon*t>
in the roms.in file. When working with these terms they are already multiplied by the cell width and thickness, hence the units noted in varinfo.dat that carry over to the output.

Code: Select all

'Huontracer'                                       ! Output
  'time-averaged tracer u-volume flux'
  'meter3 second-1 tracer'                         ! [m3/s tracer]
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

flq321

Re: Computing advection using 'utemp' vs 'temp_xadv'

#3 Unread post by flq321 »

Thanks for the detailed response, John. I see now why the two estimates are not equal.

I have a follow-up question on Huon_temp. I am aware of this quantity and realize it is great for integrating the flux over a 2d surface because the variable has the time-varying cell thickness embedded in it. But this also makes it problematic if I want the flux (say, uT) integrated across 'j' but not 'k', in order to plot it against 'z.' I am attaching an image of the heat budget equation. The terms as shown have units of degC*m^2/s, but if I divide them all by an area, they will have the units degC/s. The goal is to get a horizontally-averaged heat budget as a function of 'z'. There is a term I have boxed in dashed lines. How would I compute this term? The boxed term does not have a 'dz' factor in it. In the image, I indicate that the boxed term can be obtained through dividing Huon_temp by 'dz' although I now know that is incorrect because of the time-averaged nonlinearity you describe in your earlier post. [This was the reason I was trying to see if I can use the utemp variable to get this quantity

One way might be to define a new variable like Huon_temp but without the time-varying cell thickness. So, the new variable would have the units degC*m^2/s.
Attachments
heatbud_eqn.jpg

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Computing advection using 'utemp' vs 'temp_xadv'

#4 Unread post by wilkin »

HuonT is dimensioned (i,j,k).

It still has k dependence.

It's just that it has already been multiplied by the elemental layer thickness "Hz" prior to time averaging, but it is not summed over k.
That's why it has units m^3*tracer/s, not m^2*tracer/s

The vertical integral of HuonT is just the sum k=1,N, without any "dz"

You'll still have to deal with transforming s-coordainte to z-coordinate for the analysis you propose, but you had that problem anyway.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

flq321

Re: Computing advection using 'utemp' vs 'temp_xadv'

#5 Unread post by flq321 »

Thanks for your response, John. If you are aware of any papers/references that show horizontally averaged budgets (of heat/salt/tracer) from ROMS output as a function of 'z' (not depth-integrated budgets), that would be great.

fionanxhjh
Posts: 4
Joined: Tue Aug 10, 2021 1:15 pm
Location: Institute of Atmospheric Physics, Chinese Academy

Re: Computing advection using 'utemp' vs 'temp_xadv'

#6 Unread post by fionanxhjh »

Hi, wilkin. Nice to see your question discussed here (though it was two years ago). I am also confused about the calculation of temperature advection in ROMS. And have you find any references about horizontally averaged budgets (of heat/salt/tracer) from ROMS output as a function of 'z' (not depth-integrated budgets) ? Hope to get your reply. Sincerely.

User avatar
arango
Site Admin
Posts: 1368
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Computing advection using 'utemp' vs 'temp_xadv'

#7 Unread post by arango »

We have all the terms for balance studies in the average and diagnostic output files. You need to make sure the time-averaging window is the same (NAVG=NDIA). Also, it would help if you considered that ROMS is a finite volume model, and the governing equations are written in flux form (transport). Finally, as John mentioned, you need to write the quadratic terms in the average file.

Post Reply