[Thread Prev][Thread Next][Index]

Re: [ferret_users] meridional overturning streamfunction


| I found the variables are staggered on the B-grid, and the
| pre-cooked meridional overturning streamfunction (stfmmc) is located
| at the same latitudes as (u, v) and staggered in the vertical
| direction.

I think that should be the case.  To compute such a streamfunction,
you need to first compute

   forall(i=1:NX-1) vm(i,:,:) = ( v(i-1,:,:) + v(i,:,:) )/2
   vm(NX,:,:) = 0

which is an average of v defined at the center of a face
of the scalar gridbox.


   ! Transport into each scalar gridbox integrated in x.
   forall(j=1:NY, k=1:NZ) &
     vh(j,k) = sum( vm(:,j,k) * mask(:,j,k) * dx(:,j) ) * dz(k)

   ! Integration from the bottom.
   strfn(:,NZ) = vh(:,NZ)
   do k = NZ-1, 1, -1
     strfn(:,k) = strfn(:,k+1) + vh(:,k)
   end do

or something along the lines. This code isn't tested; don't take
it as is.  I have no experience in doing this in Ferret, but
I guess you can do it.  I suppose vm can be defined by
interpolating v in the x-direction onto a new x-axis.
(mask has to be defined on the same grid as vm.)

Hope this helps,

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement