[Mitgcm-support] FW: KPP suggestion

mitgcm-support at dev.mitgcm.org mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:54:19 EDT 2003


>From Chris Edwards

-----Original Message-----
From: cae at abyss.dms.uconn.edu [mailto:cae at abyss.dms.uconn.edu]On Behalf
Of cae at socrates.Berkeley.EDU
Sent: Thursday, January 17, 2002 10:14 AM
To: cnh at plume.mit.edu
Subject: FW: KPP suggestion


Hi Chris.  Here's the KPP note.

                                                -Chris

-----FW: <XFMail.20020102172741.cae at socrates.berkeley.edu>-----

Date: Wed, 02 Jan 2002 17:27:41 -0500 (EST)
Sender: cae at abyss.dms.uconn.edu
From: cae at socrates.Berkeley.EDU
To: support at mitgcm.org
Subject: KPP suggestion

Hi.

  Here is a small suggestion for the KPP algorithm in its current form
(sealion release 1, beta 1.  Under some conditions, I believe it
can generate small negative diffusivities. This can occur when the boundary
layer depth, as calculated by kpp, is in the bottom-most cell.
This is typically not noticeable, as advection can dominate the small
diffusion
process, but I discovered it in my coastal application where I had a few
scattered landlocked cells of isolated water only 2 cells deep.  Negative
diffusive values led to diverging temperature extrema.

  The problem occurs at line 471 of kpp_routines.F (toward the end of the
subroutine bldepth).  I checked my own copy of the original Large et al.
code,
and it exists there also.  I imagine they were not concerned with cases in
which hbl could be near bottom topography.

The code as is looks like this:

c-----------------------------------------------------------------------
c      find new kbl
c-----------------------------------------------------------------------

do kl = 2, Nr
 do i = 1, imt
  if ( kbl(i).eq.kmtj(i) .and. (-zgrid(kl)).gt.hbl(i) ) then
   kbl(i) = kl
  endif
 enddo
enddo

(The i-loop is immaterial here, cycling horizontally through the domain)
kbl is simply an index that points to the first grid-level below hbl, the
boundary layer depth. Prior to this section, kbl(i) is set to kmtj(i), which
is
the local depth of the bottom most level (nzmax).  The check
kbl(i).eq.kmtj(i) appears to be used as a device to allow the loop to cycle
from top to bottom of the water column, and set kbl to the first zgrid level
that lies just below -hbl.  The problem occurs if kl=kmtj, when zgrid(kl)
drops
just below -hbl.

Suppose that Nr=4, with levels 100 m wide,
zgrid(0:Nr+1), with zgrid(0)=0, and zgrid(Nr+1)=100*zgrid(Nr)
zgrid = 0,-50, -150, -250, -350, -35000
hbl = 75

Suppose first that
kmtj = 4;
kbl will be set to 2, pointing to zgrid(2) = -150

Now suppose that
kmtj = 2;
kbl will be set first to 2, pointing to zgrid(2) = -150, but then
on the next iteration will be set to 3, below the local bottom, because
kbl(i).eq.kmtj(i) is true in this unusual case and (-zgrid(kl)).gt.hbl(i) is
also true, for all kl>kmtj.

Having kbl below the bottom propagates through the code, and in my case led
to
negative diffusivities.

I solve this by modifying the code to

c-----------------------------------------------------------------------
c      find new kbl
c-----------------------------------------------------------------------

do kl = 2, Nr
 do i = 1, imt
  if ( kbl(i).eq.kmtj(i) .and. (-zgrid(kl)).gt.hbl(i) ) then
   kbl(i) = min(kl,kmtj(i))
  endif
 enddo
enddo

I don't think that kbl should ever be larger than kmtj.  Hope this is
helpful.

                                                        -Chris
---------------------------------------------------------------------
Christopher Edwards                     christopher.edwards at uconn.edu
Department of Marine Sciences           phone: (860) 405-9157
University of Connecticut               fax: (860) 405-9153
1080 Shennecossett Road
Groton, CT  06340-6048
---------------------------------------------------------------------

--------------End of forwarded message-------------------------

---------------------------------------------------------------------
Christopher Edwards                     christopher.edwards at uconn.edu
Department of Marine Sciences           phone: (860) 405-9157
University of Connecticut               fax: (860) 405-9153
1080 Shennecossett Road
Groton, CT  06340-6048
---------------------------------------------------------------------




More information about the MITgcm-support mailing list