[MITgcm-support] tutorial_offline, creating .meta and .data files for velocities

Krishnakumar Rajagopalan krishna_raj_2010 at yahoo.com
Thu Apr 7 16:56:08 EDT 2011


Thanks a lot, Martin

Your  method works very well and like you said there is no need for a .meta 
file.

Regards

Krishnakumar




________________________________
From: Martin Losch <Martin.Losch at awi.de>
To: mitgcm-support at mitgcm.org
Sent: Thu, April 7, 2011 3:10:09 AM
Subject: Re: [MITgcm-support] tutorial_offline, creating .meta and .data files 
for velocities

Hi Krishnakumar,

I assume, that your matlab-fields have this shape:
u(1:nx,1:ny,1:nr,1:timelevels)
Then creating a *.data file is a simple as this (in matlab):
fid=fwrite('MY_UVEL.0000000000.data','w','b');
fwrite(fid,u,'real*4'); % or 'real*8' depending on what you want
fclose(fid);
See the matlab help for more details of these functions, if required.
For the meta file (if you really need one), I recommend to copy some other 
similar meta-file and edit it's contents with a text editor.

Martin


On Apr 7, 2011, at 9:27 AM, Krishnakumar Rajagopalan wrote:

> Hi All,
>  
> I would like to advect tracers in the offline mode. I have velocity data  (in 
>.mat format) but do not know how to covert the velocity data into .meta and 
>.data files. What is the suggested software/method to create these files ?
>  
> Thanks a lot
> Krishnakumar
> 
> _______________________________________________
> 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



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20110407/1b56d885/attachment.htm>


More information about the MITgcm-support mailing list