The reason why you have these compiling problems is a faulty version of mpc.F supplied

with the package at some point in the past. This was corrected, but it appears that the

old version came back because at some point the web page was restored from the backup

after disk failure and I did not realize that this happened. At this moment I do not

have access to the web server to replace tar file, so use file "tools.tar" attached to

this response.

Note that a Matlab grid generation tool which was used to make the grid in the previous

post is also available from the same web suite

http://people.atmos.ucla.edu/alex/ROMS/grid_gui.taralthough it is relatively new and lacks instructions - a README file is being written,

but not included into the package yet. It is basically a tool to create analytical

grid using staged conformal transformations. Setting all weird parameters to zero

cent_lat = EWtpr = NStpr = cushn1 = cushn2 = cushn3 = cushn4 = 0reverts it to

easy_grid type of tool: it creates a patch of Mercator grid transferred

to user-specified location and rotated by user-specified azimuth angle.

Optionally the initial rectangular patch on Mercator plane can be deformed into

a desired shape by two kind of transforms:

(i) "tapering" in either direction - rectangle turns into a sector of polar coordinates

with simultaneous exponential stretching along the radial direction (delta r is

proportional to r), and

(ii) "cushioning" - rectangle becomes convex in one direction, concave in the other

(or vice versa, depending whether parameter

cushn is positive or negative).

This is actually transform into elliptic coordinates: imagine a family of confocal ellipses

and a family of hyperbolae with the same foci. It can be proven that ellipses and

hyperbolae intersect each other at right angle. This is the basis.

Parameter

cushn controls the location of foci:

cushn=0 means that they are infinitely

far away - rectangle remains rectangle and nothing happens;

cushn > 0 makes them approach from infinity along x-axis - actually places the foci

on the horizontal line passing through point (xctr,yctr) and at equal distance from

the point, so the rectangle become concave in eastern and western side (they become

hyperbolae) and convex on northen and southern (they become cutoffs of ellipses).

Now exactly depends on (xctr,yctr).

cushn < 0 along y-axis -- similarly, but everything is rotated

90 degrees.

It is a bit tricky to control, but after some practice you can fit very weird shapes.

Couple tips:

1. The boundaries of the map are determined automatically based on current grid

configuration. Once the desired geographical region is captured unclick the "redraw map"

box on top -- this would speed up the drawing by a factor of 100 LITERALLY(!) because

map does not need to be redrawn every time when you hit "update" button.

2. Leaving one of the four boxes,

nx, ny, size_x, size_y, blank makes the tool to calculate

the missing value from the condition of isotropy of the grid: dx = dy EVERYWHERE (same

as pm == pn EVERYWHERE). This is very useful. Of course, if size_x, size_y are both

specified, but one of nx,ny is not, then isotropy is not exact because of rounding

to the nearest integer; but is nx,ny are both specified, while one of size_x,size_y left

blank, then isotropy is perfect. THIS IS HOW I ALWAYS RECOMMEND to do it at the end:

at first specify both size_x,size_y, and leave nx blank, play with setting until

you like it, then see Matlab command window to figure nx (the tool always prints the

computed value), put nx into the box, but erase size_x or size_y -- the tool will

adjust its value to make the grid be perfectly isotropic.

3. UPDATE button draws the new contour on top of the old (alternating between red and

magenta colors). This is useful to visualize incremental change, so you can accept or

reverse it. Hitting UPDATE button second time without changing any of the parameters

makes single contour.

4. The contours are actually double lines exactly 1dx or 1dy apart from each other.

this is useful because one can use Matlab zoom facility to check how the edge of

the grid is placed relative to the coastline: ideally the coastline should be in

between the double lines - in this case there will be EXACTLY 1 row of mask points.

5. BREXIT means "Break and Exit" this button just quits the tool without doing anything

else, i.e., it does not trigger saving into the file.