[ecco-support] question about calc_barostream.m

Martha Buckley marthabuckley at gmail.com
Tue Mar 1 10:36:51 EST 2016


Thanks Gael.  Some follow-up is below.

On Mon, Feb 29, 2016 at 4:19 PM, gael forget <gforget at mit.edu> wrote:

> Hi Martha,
>
> I am transferring this thread to ecco-support since the answers may be of
> interest to others.
>
> I've used calc_barostream.m many times to calculate the barotropic
> streamfuntion.  I'd like to also use it to calculate the streamfunction in
> each layer, of course removing the divergent part of the flow.  It seems to
> me that the function can be used for this "as is", by simply passing u, v
> in a single depth layer, and then the function will return the
> streamfunction in Sv/m in that layer.
>
> Two questions
> (1) is this use correct?
> (2) If I do the above to calculate the streamfunction in each layer, I get
> a warning from diffsmooth2D_div_inv.m that the matrix is singular to
> working precision for a number of the depth levels.
>
>
> Yes this should work but you want to make sure that you specify an
> adequate list of scaling factors:
>
> 1) depending on the output you use dh | dz | hfac may have already been
> factored in by the MITgcm
> diagnostics package; UVELMASS & VVELMASS for example include hfac whereas
> UVEL & VVEL do not;
> neither include the horizontal and vertical grid spacing (i.e. they are in
> m/s) but some other diagnostics may.
> 2) in the 3D case you can omit the list_factors argument of
> calc_barostream to let it apply the default dh and
> dz factors for you. But in 2D cases you want to apply dz beforehand and
> you might as well also apply dh
> beforehand too. Once you have converted velocities to m3/s you should be
> able to call calc_barostream
> with list_factors={} as the fourth argument — in analogy with what's done
> in diags_set_SEAICE.m.
>
> Thanks for the tips.  In the 2D case, the dz factors are set to 1 directly
in the code, so I guess whether they are applied or not makes little
difference.   I want my diagnostics in SV/m so they don't depend on the
layer thickness, so I just didn't apply any dh factors.


> I would disregard the singular matrix warning unless you see something
> weird in the result.
>

The results look reasonable to me, although I've never looked at the
streamfunction in the deep layers before.
I did try integrating the streamfunction in each layer to see if I could
recover the barotropic streamfunction, calculated by passing the full 3-D
field to the same function.  The patters look qualitatively the same, but
there are differences on the order of 5 Sv in the eastern subpolar gyre
where the barotropic streamfunction I get summing the layer-by-layer
streamfunctions is too weak (not negative enough).


> I'm trying to look at a section across the subtropical/subpolar gyre
> boundary, which I want to define as where the barotropic streamfunction is
> zero.   I looked a bit at the gcmfaces programs to see what might be
> helpful, including gcmfaces_lines_zonal.m and gcmfaces_lines_transp.m I'm
> still having trouble figuring out the best way to do this.  Do you have any
> suggestions?
>
>
> With regard to your earlier question pasted above (sorry for the delay) I
> would rather suggest using
> gcmfaces_interp_2d by providing the vectors of longitude and latitude that
> define the contour
> you like in the barotropic stream function. To identify these points you
> can do something like:
> mskInt=1*(mygrid.Depth>1000);
> [mskCedge,mskWedge,mskSedge]=gcmfaces_edge_mask(mskInt);
> l=convert2vector(mygrid.XC); L=convert2vector(mygrid.YC);
> m=convert2vector(mskCedge);
> l=l(find(m)); L=L(find(m));
>
> Two comments:
> - gcmfaces_interp_2d.m is a relatively new capability (or at least I
> revamped it recently) so
>   make sure to use the latest gcmfaces before you try this. On a related
> note I recently revised
>   the gcmfaces examples and documentation (wrt gcmfaces_interp_2d.m see
> example_interp.m).
> - gcmfaces_edge_mask.m also provides the velocity points
> (mskWedge,mskSedge) that
>   you would need to compute transports across your selected domain edge.
>
> Hope this helps.
>
> Cheers,
> Gael
>
>
>


-- 
Martha W. Buckley
marthabuckley at gmail.com
http://sites.google.com/site/marthabuckley/home
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/ecco-support/attachments/20160301/6a18b379/attachment.html


More information about the ecco-support mailing list