[MITgcm-support] bathymetry-read help

Nikolay Koldunov koldunovn at gmail.com
Wed May 28 05:39:01 EDT 2008


Hi, Maxiaohui

In addition to Martin's answer I can advise you to look at this webpage:
http://www.ecco.ucsd.edu/mitgcmuv/mit_data.html

It's the set of preprocessing MATLAB scripts for MITgcm.

Kolya

On Wed, May 28, 2008 at 11:29 AM, Martin Losch <Martin.Losch at awi.de> wrote:
> Hi Maxiaohui,
>
> all input/output files (that are not netCDF) are ieee-big_endian files,
> there are plenty of examples in the verification directory (all of the
> idealized topography examples) to do it in matlab, look for files
> "gendata.m":
> nx=90;
> ny=40;
> h=ones(nx,ny); % here you need to put "your" topography
> fid=fopen('yourbathymetry.bin','w','b'); % open a big-endian file for
> writing
> fwrite(fid,h,prec); % prec='real*4' if you use readBinaryPrec=32 and
> 'real*8' if readBinaryPrec=64 (to be set in data, namelist PARM01)
> fclose(fid); % close the file
>
> That's it. In Fortran you'd need to open a file with form='unformatted',
> access='direct', and then you have to be careful about the record length,
> depends on the default word length the compiler uses etc, see pkg/mdsio how
> it's done within model.
>
> Martin
>
> On 28 May 2008, at 10:33, Maxiaohui wrote:
>
>> hi,
>> sorry to trouble you! I want to know how to read the bathymetry.bin file
>> in the tutorial_global_oce_latlon\input, since it is a binary file ,I cannot
>> see it,how to transform it into a decimal file, if I want to make a similar
>> topography file, how should I write the topography file? thank you very
>>  much!
>>
>>
>> 雅虎邮箱,您的终生邮箱!
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
>



-- 
Nikolay Koldunov
International Max Planck Research School on Earth System Modelling,
Institut für Meereskunde der Universität Hamburg,
Zentrum für Meeres- und Klimaforschung

koldunovn at gmail.com
nikolay.koldunov at zmaw.de
ph. +49 40 428387479
Bundesstr. 53
20146 Hamburg, Germany




More information about the MITgcm-support mailing list