[MITgcm-devel] Re: overturning on cubed sphere

Martin Losch mlosch at awi-bremerhaven.de
Mon Sep 19 10:09:19 EDT 2005


Hi,
I am puzzled by the overturning thing, because I do exactly what is 
described in the README in cs_grid/bk_line/README (except that I have 
to change a few names and paths, in order to make it work). Well, I'll 
look into it further.

About the cs_pcol: I can only say, what it does compared to grph_CS, 
which I find, frankly, a little unflexible (you have to edit the script 
in order to remove the colorbar, there is only one projection 
possible). What follows is what I put into the help comment of 
cs_pcol.m (I am not too particular about the name, but is is basically 
pcol for scalar cubed sphere grids). To my mind the advantages over 
grph_CS are that
1. you only need 3 arguments (xg,yg,fld)
2. you can add arguments to choose any map projection that m_map 
allows, without editing the file (try it out, it is attached to this 
email and the last one, also attached is a plot of SST, that I produced 
with cs_pcol(xg,yg,sst,'stereo','lat',90,'rad',51); m_coast; colorbar).

Martin

> %function h=cs_pcol(x,y,v)
> %function h=cs_pcol(x,y,v,'m_map arguments')
> %
> % plots 2D scalar fields v on the MITgcm cubed sphere grid with pcolor.
> % x,y are really 'xg', and 'yg', that is, they should be the 
> coordinates
> % of the points one half grid cell to the left and bottom, that is
> % vorticity points for tracers, etc.
> % If present 'm_map argurments' are passed directly to m_proj to select
> % any projection that m_map allows, then m_grid is called without any
> % options (requires m_map, obviously). In order to control the input of
> % m_grid, use m_ungrid and the m_grid with proper arguments, e.g.
> % h=cs_pcol(x,y,v,'stereo','lon',0,'lat',80,'rad',60)
> % plots a stereographic map with center at (0E,80N) and a radius of 60
> % degrees as in: m_proj('stereo','lon',0,'lat',80,'rad',60); use
> % m_ungrid; m_grid('box','off')
> % to turn off the box around the plot.
> % If you want coast lines, you can add them with m_coast after calling
> % cs_pcol.
> % Unfortunatly, cylindrical and conic maps are limited to the [-180 
> 180]
> % range.
>
>   % cs_pcol first divides the 2D cs-field(6*n,n) into six faces. Then 
> for
>   % each face, an extra row and colum is added from the neighboring 
> faces in
>   % order to fool pcolor into drawing the entire field and not just
>   % (n-1,m-1) data points. There are two corner points that have no 
> explicit
>   % coordinates so that they have to be found by
>   % interpolation/averaging. Then each face is divided into 4 tiles,
>   % assuming cs-geometry, and each tile is plotted individually in
>   % order to avoid problems due to ambigous longitude values (the jump
>   % between -180 and 180, or 360 and 0 degrees). As long as the poles
>   % are at the centers of the north and south faces and the first tile 
> is
>   % symmetric about its center this should work.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cs_pcol.m
Type: application/octet-stream
Size: 5322 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20050919/ed977b5b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.pdf
Type: application/pdf
Size: 41496 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20050919/ed977b5b/attachment.pdf>
-------------- next part --------------

On Sep 19, 2005, at 3:40 PM, Jean-Michel Campin wrote:

> Hi Martin,
>
> On Mon, Sep 19, 2005 at 12:00:01PM +0200, Martin Losch wrote:
>> Hi Jean-Michel,
>>
>> this is an off-list email, because I don't want to complain publically
>> (o:
>>
>
> I will not cc to the support list, but at least to mitgcm-devel,
> since others might be interested.
>
>> I have been playing around with the cubed sphere configuration
>> (global_ocean.cs32x15), tried to plot a few things, etc. and ran into 
>> a
>> few problems with the scripts, that can be found in utils/cs_grid. 
>> From
>> the programming style I gather, that they are all yours.
>> How reliable is the overturning calculation? I tried your script on 
>> the
>> testreport output (the 20 timesteps), and found the results really
>> strange (no real overturning cell etc., see attachment ot.eps). When I
>> tried to use w instead of v (integral south to north of zonal mean of
>> w, quick and dirty interpolation of w onto a regular lat-lon-grid), I
>> get a funny result near the equator (which I sort of expected), but
>> otherwise it looks quite good and familiar, so the fields seem to be
>> OK. I know all this broken line stuff is quite complicated and you 
>> have
>> spent a lot of time on this but I can't get it to plot a reasonable
>> overturning streamfunction. Do you?
>
> I tried to use "use_bk_line.m" (now in utils/matlab/cs_grid/) after 
> running
> the global_ocean.cs32x15 for 20 time-steps, with taveFreq=864000., 
> just to
> get some output fields (hUtave & hVtave).
> And I don't get the same plot as you. Mine does not look great, 
> because a
> 10 days average is certainly not enough to filter the seasonal cycle, 
> but
> I get an NADW cell (> 10 Sv) as far north as 60-65.N. It would be much
> better to run it for (at least) 1 year and to re-do the plot with 
> annual-mean
> fields. But anyway, something is strange in your plot.
> I propose:
> either that you check again that you are doing the right things.
> or
> to tell exactly what you are going, so that we can check.
>
>>
>> I have now my own version of a 2D plot of cubed sphere fields. It's a
>> little less sophisticated than your grphCS.m, but more flexible, and
>> uses only minimal input arguments. Are you interested (see 
>> attachment)?
>>
>> Martin
>
> We were in the process of gathering (cleaning ? not yet) and 
> documenting
> the matlab scripts, and specially the CS-grid ones. We already have few
> versions of merccube.m , few grph_CS.m that are arround, we can
> add an other one. But at some point, it would be nice to review what
> each of them does that the others don't, and to merge them into a 
> single
> one that has all in it. Would you be interested in telling what
> your script do better that the others ?
>
> Thanks,
>
> Jean-Michel


More information about the MITgcm-devel mailing list