[MITgcm-support] Bathymetry file
Jody Klymak
jklymak at uvic.ca
Thu Mar 23 16:18:13 EDT 2017
https://en.wikipedia.org/wiki/Row-_and_column-major_order <https://en.wikipedia.org/wiki/Row-_and_column-major_order>
So, matlab is column-major when it writes, numpy is row-major when it writes.
The MITgcm reads in as row-major:
"Line 46,
bathyFile=’topog.box’
This line specifies the name of the file from which the domain bathymetry is read. This file is a two-dimensional (x,y) map of depths. This file is assumed to contain 64-bit binary numbers giving the depth of the model at each grid cell, ordered with the x coordinate varying fastest. The points are ordered from low coordinate to high coordinate for both axes. The units and orientation of the depths in this file are the same as used in the MITgcm code. In this experiment, a depth of 0m indicates a solid wall and a depth of −5000m indicates open ocean. The matlab program input/gendata.m shows an example of how to generate a bathymetry file.”
> On 23 Mar 2017, at 12:49 PM, Daniel Goldberg <dngoldberg at gmail.com> wrote:
>
> Hi Saeid
>
> If you are using matlab, note that the ordering of the x and y dimensions is opposite what is needed in your binary file. So if you have a bathymetry array in matlab, you should do the transpose operation before writing it to a binary file. (which is not the same as rotating three times.)
>
> dan
>
> On Thu, Mar 23, 2017 at 7:03 PM, Menemenlis, Dimitris (329C) <Dimitris.Menemenlis at jpl.nasa.gov <mailto:Dimitris.Menemenlis at jpl.nasa.gov>> wrote:
> http://mitgcm.org/public/r2_manual/latest/online_documents/node102.html <http://mitgcm.org/public/r2_manual/latest/online_documents/node102.html>
>
>> On Mar 23, 2017, at 7:10 AM, smaeilpour <saeid_gal at yahoo.com <mailto:saeid_gal at yahoo.com>> wrote:
>>
>> Hi everyone,
>> I have a question, to build a bathymetry file, is it necessary to rotate file 90 degrees and three times before i convert it to a binary file?
>> any advice will be greatly appreciated.
>>
>> Regards,
>> Saeid
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
> http://mitgcm.org/mailman/listinfo/mitgcm-support <http://mitgcm.org/mailman/listinfo/mitgcm-support>
>
>
>
>
> --
>
> Daniel Goldberg, PhD
> Lecturer in Glaciology
> School of Geosciences, University of Edinburgh
> Geography Building, Drummond Street, Edinburgh EH8 9XP
>
>
> em: D <mailto:dgoldber at mit.edu>an.Goldberg at ed.ac.uk <mailto:an.Goldberg at ed.ac.uk>
> web: http://ocean.mit.edu/~dgoldberg <http://ocean.mit.edu/~dgoldberg>_______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
--
Jody Klymak
http://web.uvic.ca/~jklymak/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20170323/86e94ca9/attachment-0001.htm>
More information about the MITgcm-support
mailing list