[MITgcm-support] Other SpF_test_cube_cap questions to Ed

Ed Hill ed at eh3.com
Wed Jan 16 16:59:34 EST 2008


On Wed, 16 Jan 2008 09:35:29 +0000 (GMT) Riema Rachmayani wrote:
> 
> Questions :
> 1. what are ifacet=0, ifacet=1, ...ifacet=4 ??

A "facet" means one of the logically rectangular regions that SPGrid
will try to create a grid upon.  Areas coverd by SPGrid are broken up
into one or more facets and the facets may share common edges.


> 2. what is n= 11, why 11 ??

Please don't pay too much attention to the outputs written to the
screen.  Some are wrong or confusing.  What matters is the output
files.  Either they contain useful grid information or they don't.


> 3. why there is warning statement (bold) ??

This is difficult to explain in words but much easier to explain with a
few pictures.  Basically, SPGrid tries to grid a domain in a way that
produces *conforming* logically rectangular grids.  Here, conforming
means "grid cell coincidence at the grid edges".  The SPGrid algorithm
marches through the facets in a way that tries to honor the edge
coincidences for every facet.

The warning you see means SPGrid is trying to grid a facet where the
edge spacings are specified on two opposite edges.  It has to choose to
ignore the spacing (which means the iso-contours of the Laplace
solutions) of the edges and hope that the solution works for both due to
symmetry of the overall problem.

I hope that explanation makes sense.  Its the best I can do for now.


> 4. what is flipit =1/-1 ??

Its keeping track of the orientation of each facet relative to its
neighbors.  Facets have their own local coordinate systems and these
coordinates may be "flipped" relative to each other at facet--facet
edges.


> 5. Number of facets gridded:  5  [correct=9], what this is mean??

Please ignore it.  Its an error where the "correct=9" part was
hard-coded and probably copied from a previous driver program.


> 6. in SpF_test_cube_cap directory there are :
> exch2_topo_v1.txt  grid_3.nc       mat_scr_2.m
> grid_0.fed1        grid_4.fed1     mat_scr_3.m
> grid_0.fed2        grid_4.fed2     mat_scr_4.m
> grid_0.fed3        grid_4.fed3     state_20080115T143243.mat
> grid_0.fed4        grid_4.fed4     state_20080115T143244.mat
> grid_0.mitgrid     grid_4.mitgrid  state_20080115T143255.mat
> grid_0.nc          grid_4.nc       state_20080115T143257.mat
> grid_1.fed1        ife_0_0         state_20080115T143306.mat
> grid_1.fed2        ife_0_1         state_20080115T143309.mat
> grid_1.fed3        ife_1_0         state_20080115T143320.mat
> grid_1.fed4        ife_1_1         state_20080115T143321.mat
> grid_1.mitgrid     ife_2_0         state_20080115T143331.mat
> grid_1.nc          ife_2_1         state_20080115T143332.mat
> grid_2.fed1        ife_3_0         state_20080116T151259.mat
> grid_2.fed2        ife_3_1         state_20080116T151300.mat
> grid_2.fed3        ife_4_0         state_20080116T151315.mat
> grid_2.fed4        ife_4_1         state_20080116T151317.mat
> grid_2.mitgrid     mat_out_0       state_20080116T151328.mat
> grid_2.nc          mat_out_1       state_20080116T151329.mat
> grid_3.fed1        mat_out_2       state_20080116T151338.mat
> grid_3.fed2        mat_out_3       state_20080116T151340.mat
> grid_3.fed3        mat_out_4       state_20080116T151348.mat
> grid_3.fed4        mat_scr_0.m     state_20080116T151350.mat
> grid_3.mitgrid     mat_scr_1.m     std_topology.nc
> 
> why there are grid_0.mitgrid,....grid_4.mitgrid,
> grid_0.nc,....grid_4.nc ??  what is inside of these?? latitude
> longitude?? is there any connection between 1 file to other file??

The *.mitgrid and the *.nc files contain the very same grid information
written in two different file formats.  They are the files you want to
provide to MITgcm to specify all of your grid quantities.

Please see the MITgcm manual:

  http://eddy.csail.mit.edu/r2/latest/online_documents/node1.html

and look at any one of the cube-sphere experiments to see how the
*.mitgrid file(s) are used to specify all of the grid quantities.


> 7. in mat_out_* there are :
> 
>                               < M A T L A B >
>                   Copyright 1984-2004 The MathWorks, Inc.
>                          Version 7.0.0.19901 (R14)
>                                 May 06, 2004
> 
> Warning: Name is nonexistent or not a
> directory: /home/admin/src/matlab_v7/m_map. Warning: Name is
> nonexistent or not a directory: /home/admin/src/matlab_v7/m_map. 
>   To get started, type one of these: helpwin, helpdesk, or demo.
>   For product information, visit www.mathworks.com.

> Is that correct?? Why there are warning statement about m_map...there
> is no m_map in my matlab_v7 directory??

Please ignore m_map.  In fact, delete it from your matlab path.  Its a
3rd-party matlab plotting package that you don't need for any SPGrid
functions.


> 8. what should I do with state_*.mat ? what is that??

Please ignore them.  They are copies of all the internal matlab state
during the grid generation.  I used them for debugging purposes.


> 9. I've opened one of grid_0.mitgrid, there are :

[ ...snip... ]

> what is that numbers??

The *.mitgrid files should be documented in the MITgcm manual.  If not,
you can learn about them by reading the code in the file:

  model/src/ini_curvilinear_grid.F


> 10. what should I do next if I'd like to run for make Lombok strait
> curvilinear??

I can think of two approaches:

 1) You can create (write) an SPGrid "driver" program that specifies 
    the exterior geometry for a small number of facets (say, 2 to 6) 
    that covers the Lombok Strait area.  You can then run that program 
    and, if the inputs are correct, SPGrid will provide you with the 
    *.nc and/or *.mitgrid files that specify the grid you want for
    MITgcm.

 2) In earlier emails you showed what appeared to be a curvilinear
    orthogonal grid for the Lombok strait area that was (I assume) 
    generated with some other program.  If that previously generated
    grid is acceptable to you then you can use some of the MatLAB 
    scripts contained in SPGrid to convert it (that is, the corner
    points of your previously generated grid) to the *.mitgrid file 
    format needed by MITgcm.  The script you would probably want to 
    use is:

       spgrid/scripts/compute_grid_perface_nX.m

    and it calculates and writes all the grid information (e.g., cell 
    areas, cell edge lengths, ...) to *.mitgrid and *.nc files 
    given only the cell corner locations.


>        thank you Ed,
> 
> sorry for asking you much...

That's OK, I hope the above helps.
       
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/20080116/10e3e2c1/attachment.sig>


More information about the MITgcm-support mailing list