[MITgcm-support] balancing the heat equation

Martin Losch Martin.Losch at awi.de
Wed Sep 5 03:12:11 EDT 2007


Hi Allison,
without checking details in the code I would suggest that you use the  
diagnostics package for diagnosing the different contributions. As  
far as I can see, the diagnostics are all available:
dT/dt:
       diagName  = 'TOTTTEND'
       diagTitle = 'Tendency of Potential Temperature'
uTx/vTy/wTz: 'ADVx/y/r_TH '
KTxx/yy/zz: 'DFx/y/rE_TH ' (and 'DFrI_TH ' for the implicit part  
which is relevant for KPP)
Then there is the non-local term in KPP, which can be diagnosed with  
'KPPghat '; however that is not the contribution to diffusive flux,  
and you'll have to alter the code a little to get that contribution  
with the diagnostics package. Here's a hack that abuses DFrE_TH for  
this purpose: In gad_calc_rhs.F find the calls to KPP_TRANSPORT_T  
etc. They are within a #ifdef ALLOW_KPP/#endif block. just before  
this there is a diagnostics call (#ifdef ALLOW_DIAGNOSTICS/#endif).  
Just exchange the order of these two blocks and DFrE_TH will give you  
the flux-contribution of the non-local term (but the explicit  
diffusive flux will be overwritten and not diagnosed, which is only  
OK, if you are using KPP without GMREDI!).
A better solution is to add  a new diagnostic and insert it after the  
calls to KPP_TRANSPORT_T etc).

Martin


On 4 Sep 2007, at 21:19, Allison Byrd wrote:

> Hello mitcgm-ers!!
>
> I am trying to solve the heat equation
> dVT/dt+uTx+vTy+wTz=KTxx+KTyy+KTzz
> with the goal being the left and right hand side equaling each  
> other to machine precision.  We have a large imbalance between the  
> two sides and are lost to the small detail we are missing.
>
> for the left hand side we use gTnm1 for dT/dt, and then take the  
> forward difference of T to solve for uTx,vTy, and wTz.  For the  
> right hand side we use Khorizontal=500 m2/sec. and Kvertical =  
> KPPdiffKzT+2*10^-4m2/sec.  Perhaps we are misusing the KPP  
> schemes?  Has anyone ever done this before?? Any help would be  
> greatly appreciated.
>
> Allison Byrd
> FSU Dept of Oceanography
> Physical Oceanography
> Office Room 403
> byrd at ocean.fsu.edu
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list