[MITgcm-support] Pre- processing Input data to MITGCM grid

Martin Losch Martin.Losch at awi.de
Thu Jun 5 03:55:42 EDT 2014


Hi Anuradha,

the “gendata.m” files in the verification are meant to guide you to write your own scripts (you can probably use the matlab-clone octave to run them). The most important aspect is, that you need to store your input data as unblocked “ieee big endian” files. Either single (real*4) or double precision (real*8), depending on the parameters in your namelists.

For example in Fortran you would create such a file with OPEN(unit,filename,ACCESS=‘DIRECT’,recl=length_of_rec)
In Python/Numpy:
import numpy as np
import sys
data = np.array(…) # with defined precision, either float32 or float64
if sys.byteorder == 'little': data.byteswap(True)
fid = open(fname,"wb")
data.tofile(fid) # this does not work for very large data sets
fid.close()

exp2 is not the best example to start with. I recommend that you have a look at the tutorials; they start with verification/tutorial_*  and are documented here:
<http://mitgcm.org/public/r2_manual/latest/online_documents/node88.html>
Usually the grid information (x/yGorigin) is passed to the model in the namelist file “data”

Martin

On Jun 5, 2014, at 9:26 AM, Anuradha Modi <anuradha at ncmrwf.gov.in> wrote:

> Dear MIT Users,
> I am new to MIT model. Model installed successfully.
> Now want to run the model for ocean simulation
> I having few questions regarding preparation of input data
> To prepare the input data, I have seen some matlab codes are given.
> But I dont have a matlab software ( as it is not free to download)
> Is there any other way to prepare the input files into MITGCM grid using
> Grads or Fortran (which I am currently using for my research work).
> 
> Also I have some input files in verification/exp2/input/
> salt.bin, SSS.bin, SST.bin etc
> want to know the format of this input files to plot in Grads.
> Needs some information like starting latitude grid point, longitude grid
> point etc, to create .ctl file to plot in grads.
> 
> Kindly Help..
> 
> 
> Thanks in Advance
> Anuradha
> 
> 
> 
> 
> Email secured by Check Point
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list