[MITgcm-support] exch2 and autogenerated grids (llc, cs, etc.)

Dimitris Menemenlis dmenemenlis at gmail.com
Fri Oct 23 11:47:50 EDT 2015


Hi Ryan, the set of llc grids that were used for the hi-res simulations originate here:
ocean.mit.edu <http://ocean.mit.edu/>:/net/weddell/raid3/gforget/grids/gridCompleted/llcRegLatLon
The generation scripts must be buried somewhere in there.

Not sure if this is relevant to your question but I attach
a schematic that I have used in the past to explain llc topology.
In matlabese, some simple code to read/plot these five tiles is:

cd …./llc_270_grid
nx=270;
landmask=readbin('hFacC.data',[nx nx*13]);

tile1=landmask(:,1:3*nx);
tile2=landmask(:,3*nx+1:6*nx);
mypcolor([tile1' tile2’]);

tile3=landmask(:,6*nx+1:7*nx);
mypcolor(tile3’);

tiles45=reshape(landmask(:,nx*7+1:end),nx*3,nx*2);
mypcolor(rot90(tiles45,-1)’);

>> whos
  Name            Size                Bytes  Class     Attributes
  landmask      270x3510            7581600  double              
  nx              1x1                     8  double              
  tile1         270x810             1749600  double              
  tile2         270x810             1749600  double              
  tile3         270x270              583200  double              
  tiles45       810x540             3499200  double              

readbin and mypcolor are available under MITgcm/utils/matlab/cs_grid/read_cs
or you can replace with your favorite routines for reading/plotting binary files.

Cheers, Dimitris



> On Oct 22, 2015, at 8:52 PM, Ryan Abernathey <ryan.abernathey at gmail.com> wrote:
> 
> Thanks for the reply. You cleared up one source of confusion: the grid files are NOT generated by MITgcm. They need to be generated by the user. (Correct?)
> 
> But I am still confused about one thing:
> Where is the script that generates the input files for the llc configurations?
> If I could see the logic within this script, I feel like I could maybe start to understand how the llc grid works.
> 
> -Ryan
> 
> On Thu, Oct 22, 2015 at 11:34 PM, Jean-Michel Campin <jmc at ocean.mit.edu <mailto:jmc at ocean.mit.edu>> wrote:
> Hi Ryan,
> 
> There might be some confusion here:
> 1) this part of the documentation:
> > http://mitgcm.org/public/r2_manual/latest/online_documents/node233.html <http://mitgcm.org/public/r2_manual/latest/online_documents/node233.html>
>  is NOT up-to-date. No need to use any matlab script (driver.m) from
>  MITgcm/utils/exch2/matlab-topology-generator to set-up the correct/customized
>  exch2 topology. See the top of the 2 README files
>  in: utils/exch2/matlab-topology-generator and in: utils/exch2/code-mods
> 
>  Setting SIZE.h and data.exch2 should be enough to get pkg/exch2 tile-topology
>  set-up.
>  But this is (mostly) independent from the the input grid-files
>  which provides lat,lon position, grid-spacing and grid-cell area.
> 
> 2) Regarding grid files (horizGridFile= ...) used with usingCurvilinearGrid=T,
>  I am not aware of any MITgcm fortran code that would generate these files.
>  Some set of grid-files are available (in some verification exp., also in
>  MITgcm_contrib area) but otherwise you will need to generate these files.
>  There has been few email exchange on support list related to how generate
>  grid-files for cubed-sphere grid ; and you can take a look at the recently
>  publish paper in GMD about ECCO-v4, with some information regarging the
>  lap-lon-cap grid and grid-files.
> 
> Cheers,
> Jean-Michel
> 
> On Thu, Oct 22, 2015 at 05:16:17PM -0400, Ryan Abernathey wrote:
> > Hi,
> >
> > After avoiding this issue for a long time, I am finally trying to
> > understand how the new auto-generated grids work (in particular the llc
> > grids).
> >
> > Is this documentation up to date?
> > http://mitgcm.org/public/r2_manual/latest/online_documents/node233.html <http://mitgcm.org/public/r2_manual/latest/online_documents/node233.html>
> >
> > For the global_oce_llc90 setup, the input files seem very simple, i.e. data
> > file just has
> >   usingCurvilinearGrid=.TRUE.,
> >
> > and data.exch2 has
> >   W2_printMsg= 0,
> >   W2_mapIO   = 1,
> >   preDefTopol=0,
> >   dimsFacets(1:10) = 90, 270, 90, 270, 90, 90, 270, 90, 270, 90,
> >   facetEdgeLink(1:4,1)= 3.4, 0. , 2.4, 5.1,
> >   facetEdgeLink(1:4,2)= 3.2, 0. , 4.2, 1.3,
> >   facetEdgeLink(1:4,3)= 5.4, 2.1, 4.4, 1.1,
> >   facetEdgeLink(1:4,4)= 5.2, 2.3, 0. , 3.3,
> >   facetEdgeLink(1:4,5)= 1.4, 4.1, 0. , 3.1,
> >
> > This is evidently enough information to completely specify the grid
> > geometry. But I can't figure out where in the code the geometry is actually
> > calculated. In ini_curvilinear_grid.F, it looks like it is just reading the
> > geometry from horizGridFile (i.e. tile.0001.mitgrid). So when do these
> > horizGridFiles get written?
> >
> > Just looking for some hints to get started on understanding this important
> > but intimidating subject.
> >
> > Thanks,
> > Ryan
> 
> > _______________________________________________
> > MITgcm-support mailing list
> > MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
> > http://mitgcm.org/mailman/listinfo/mitgcm-support <http://mitgcm.org/mailman/listinfo/mitgcm-support>
> 
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
> http://mitgcm.org/mailman/listinfo/mitgcm-support <http://mitgcm.org/mailman/listinfo/mitgcm-support>
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20151023/2ccb11d7/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llcGridOrientation.pdf
Type: application/pdf
Size: 87317 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20151023/2ccb11d7/attachment-0001.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20151023/2ccb11d7/attachment-0003.htm>


More information about the MITgcm-support mailing list