[MITgcm-support] Re: Other SpF_test_cube_cap questions to Ed (Ed Hill)

Ed Hill ed at eh3.com
Wed Jan 23 10:55:44 EST 2008


On Wed, 23 Jan 2008 02:08:05 -0800 (PST) Riema Rachmayani wrote:
>  
> For now, I will consentrate to make curvilinear grid for Lombok
> Strait, and I choose second approaches you gave me, which is to
> convert grid I’ve made by other program to *.mitgrid using
> spgrid/scripts/compute_grid_perface.m (there is no
> compute_grid_perface_nX.m in my directory).

Hi Riema,

I hope you got your copy of SPGrid from CVS at:

  http://mitgcm.org/cgi-bin/viewcvs.cgi/development/edhill/spgrid

and, if not, please do so.  You want the versions in CVS since they are
the "latest" and contain all the known bug fixes.  As you can see in:

  http://mitgcm.org/cgi-bin/viewcvs.cgi/development/edhill/spgrid/scripts/

there is indeed a script named "compute_grid_perface_nX.m".


> My question is what kind
> of input format that I should prepare for a file that I will convert
> to *.mitgrid using  compute_grid_perface.m. 

Please read the MatLAB comments within "compute_grid_perface_nX.m".

The two quantities you need to supply are the 3D (x,y,z) coordinates of
the grid cell corners and the sphere (planetary) radius.  The rest is
computed by the script using some simple assumptions about the corner
point connectivity (mostly, that all grid cell edges are great-circle
arcs).


> What about file format that I should prepare to convert to *.mitgrid
> in column 1, column 2,column 3, and column 4? Any examples? And when
> I use spgrid/scripts/compute_grid_perface.m, I just run it or I
> should prepare something else?? Thank you Ed,

The on-line documentation has been updated recently so there may be
better docs within the manual (and, if so, perhaps someone can point
them out?).  In my opinion, the *.mitgrid and *.nc file formats are 
best documented by the MITgcm Fortran code.  See:

  MITgcm/model/src/ini_curvilinear_grid.F
  MITgcm/model/inc/GRID.h

which shows exactly how all the grid quantities (locations, lengths,
areas, angles, etc.) are stored in memory and read-from and written-to
the various file formats.

Ed

-- 
Edward H. Hill III, PhD  |  ed at eh3.com  |  http://eh3.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20080123/e4d3f593/attachment.sig>


More information about the MITgcm-support mailing list