help in fwrite a data

Eduardo Agosta Scarel eduardo.agosta at GMAIL.COM
Tue May 27 21:30:09 EDT 2008


Hi Mr. you,
This is like that because the fwrite command writes binary files. To read
them you should do a ctl file as described in the users' guide.

Below I give you an example. To run the ctl file use the command open.

Eduardo.

DSET     c:/grads19/data/Eu1992.bin
TITLE     EP
UNDEF    9.36e36f
XDEF   145 LINEAR 0 2.5
YDEF    73 LINEAR -90 2.5
ZDEF       1 levels 200
TDEF       1 linear 1jan1950 1yr
VARS      3
Eux 0 99 local EP en x
Euy 0 99 local EP en y
Euz 0 99 local EP en z
ENDVARS

2008/5/27 Mald MM5 <maldmm5 at gmail.com>:

>
> Hi there,
>
> After doing an fwrite how can I open the file written. When I try to view
> it in a text editor (eg vi editor) it looks like garbage. Am not sure why
> its doing so. Could you please help me on this?
>
> Thanks
>
>
>
> On 5/20/08, Arlindo da Silva <dasilva at alum.mit.edu> wrote:
>>
>> On Mon, May 19, 2008 at 6:43 AM, Manish Singh <singhmanish1010 at gmail.com>
>> wrote:
>>
>>> Hi all, i am working on sgi machine,my ctl file is as below -
>>> dset  ^time_mean.00%y4.%m2.01.nc
>>> dtype netcdf
>>
>>
>> If you are producing your file with "fwrite" it is not "netcdf", so remove
>> this line. If you would like to produce netcdf files, use lats4d.
>>
>>
>>>
>>> options byteswapped big_endian template
>>
>>
>> The option "byteswapped" is deprecated, being replaced by either
>> "little_endian" or "big_endian". Since you are on a SGI (and I am assuming
>> you have a MIPS processor, do a "uname -m" to find out) keep the
>> "big_endian". If you have a SGI Altix (IA64) specify "little_endian". In any
>> case, remove the "byteswapped".
>>
>>   Arlindo
>>
>>
>> --
>> Arlindo da Silva
>> dasilva at alum.mit.edu
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080527/ab695933/attachment.html 


More information about the gradsusr mailing list