[MITgcm-support] bathymetry

Martin Losch mlosch at awi-bremerhaven.de
Tue Oct 17 06:45:05 EDT 2006


Riema,

all input files of for the mitgcm are binary ieee big endian files.  
How you generate is "your problem". They have to have the correct  
size (corresponding to the model domains size set in SIZE.h) and the  
correct precision (single or double, accoring to the parameter  
readBinaryPrec = 32/64 in data). In matlab you can generate such a  
file like this:
 >> yourTopo = (interpolate your topography to the grid coordinates)
 >> size(yourTopo) should give you values nx,ny, so that yourTopo 
(nx,ny) (against matlab convention)
 >>fid=fopen('your.topo','w','b');
 >>fwrite(fid,yourTopo,'real*8'); % for double precision, real*4 for  
single precision
 >>fclose(fid)
done. other examples are in most gendata.m files in the verification  
experiments. If you want to use Fortran you have to write your field  
into a direct access file (make sure it's ieee-big endian!).

The bathymetry file is then read in ini_depths.F, but you don't need  
to fiddle with that file at all if you can generate a topography  
files that the mitgcm understands. The name "topog.slope" is  
completely arbitrary and should not be used to infer any type of  
format. You could call your topography file Riema.Rachmayani, or  
lombok.strait or lombok_strait or lombok_strait.ieee-be or whatever  
you like, as long as it is a ieee big endian file with the proper  
information in it.

Martin

On 17 Oct 2006, at 06:50, Riema Rachmayani wrote:

> hi, all....
> about bathyfile= 'topog.slope' in data of internal wave...it is  
> read in ini_depths.F right??
> what about when i change the bathyfile by bathymetry of lombok  
> strait?? not just that simple right??
> should i change in .slope or i can change in other format of file?? 
> for example in .btm or .txt....
>
> i still dont understand that we can generate the bathymetry from  
> gendata.m
>
> what should i do??



More information about the MITgcm-support mailing list