[MITgcm-support] Re: non-MDSIO input files

Ed Hill ed at eh3.com
Sat Aug 12 16:13:25 EDT 2006


On Sat, 2006-08-12 at 12:09 -0700, Dmitri Leonov wrote:
> 
> I'm trying to run the model on a hand-made orthogonal curvilinear grid 
> with rectangular topology. The grid is already generated. All I need is 
> to make the model read the grid quantities correctly. As I understand I 
> don't need exch2.

Hi Dmitri,

Yes, thats true.


> I've tried both approaches from your script without luck so far: there 
> are errors in both cases.
> I'm assuming npx and npy in your script correspond to Nx+1 and Ny+1. Is 
> that right?

Yes.


> I generated the 16 grid quantities in matlab with size (npx,npy) and ran 
> the portion of the script that saves them in the 2 formats.
> The netcdf file looks right (except the dimensions are transposed with 
> respect to the ones in mnc output). But when I turn the readgrid_mnc 
> option on I get a NetCDF error about index being out of bounds.

I have very little free time this weekend so I only took a quick look at
the files -- and didn't see any obvious errors.


> To use READSYMTILE_RS I had to modify ini_curvilinear_grid.F commenting 
> out the following 3 lines:
> #ifdef ALLOW_MDSIO
> #define OLD_GRID_IO
> #endif
> 
> When I did that and ran the model it complained about unexpected end of 
> file.
> Am I missing something?

Please take a look at the Lab Sea setup in MITgcm_contrib/ifenty/Curvi
which is in many ways similar:

  http://mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm_contrib/ifenty/Curvi/

to what you're trying to do.  Its another single-tile curvilinear grid
example.

Also, there is a not-well-documented subtlety in the handling of the
sin/cos vector rotation parameters.  If you name the files using the
default

  "tile%03d.mitgrid"

pattern [that is, the default for READSYMTILE_RS()] then you don't need
to provide the vector rotation information (which is only used for a few
obscure things currently).  If you use a non-default file name (which is
what you did) then you must also specify the vector rotation information
which is not computed in the script that I sent you earlier.

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3 at mit.edu                ed at eh3.com
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464





More information about the MITgcm-support mailing list