[MITgcm-support] tutorial_offline, creating .meta and .data files for velocities
Martin Losch
Martin.Losch at awi.de
Thu Apr 7 06:10:09 EDT 2011
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
More information about the MITgcm-support
mailing list