[MITgcm-devel] MNC_CW_ADD_GNAME
Ed Hill
ed at eh3.com
Wed Sep 2 21:59:34 EDT 2009
On Wed, 2 Sep 2009 10:10:14 -0400 Ryan Abernathey <rpa at mit.edu> wrote:
> Hi,
>
> I am working on writing a package that will compute volume fluxes in
> isopycnal layers. (This is based loosely on a MATLAB code I got from
> David.)
>
> I am a bit stuck on the MNC output code. I need to define new MNC
> grids that use temperature (or density) as the vertical coordinate.
> The grids would be called something like 'U_xy_Hn__G__t' and
> 'V_xy_Hn__G__t' where 'G' is the letter indicating the vertical
> temperature coordinate.
>
> I have figured out that I need to call MNC_CW_ADD_GNAME to
> initialize these grids. However, there are not a lot of examples of
> this function--the only time I can find it called is from
> MNC_CW_INIT, where it is inside a giant loop that is hard for me to
> decipher. I am having trouble understanding the interface for
> MNC_CW_ADD_GNAME, since the arguments are not documented.
>
> Can anyone who is familiar with the MNC code give me some
> suggestions on how to proceed? What I want to do seems fairly
> straightforward, right?
Hi Ryan,
Yes, your description above is good.
I think the easiest way to get what you want is to modify the
MNC_CW_INIT function so it defines a set of grid names (not just a
single one) which use your new temperature-or-salinity-or-whatever Z
coordinate system. For lack of better name, I'll call it "Za" which
stands for "Z additional" and you can feel free to substitute a better
name. :-)
Attached is a patch against:
mnc_cw_init.F
which should do it. In addition to the placeholder "Za" name, you
should substitute values for the following:
ZA_DIM_LENGTH_GOES_HERE
ZA_STARTING_INDEX_GOES_HERE
ZA_ENDING_INDEX_HERE
which are probably defined in a (new?) header somewhere.
Hope that helps,
Ed
--
Edward H. Hill III, PhD | ed at eh3.com | http://eh3.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mnc_cw_init.patch
Type: text/x-patch
Size: 2139 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20090902/95212ada/attachment.bin>
More information about the MITgcm-devel
mailing list