use R-Project to make station files

Costas Douvis cdouvis at YAHOO.COM
Thu Apr 2 03:48:53 EDT 2009


It worked. Thank you Luiz Rodrigo Tozzi

I used size=8 for the character variables and size =4 for the real and integer variables. I didn't expect that. I thought the integers needed size=2 but that proved to be wrong. I found it easier than using Fortran :)

--- On Tue, 3/31/09, Luiz Rodrigo Tozzi <luizrodrigotozzi at gmail.com> wrote:
From: Luiz Rodrigo Tozzi <luizrodrigotozzi at gmail.com>
Subject: Re: use R-Project to make station files
To: cdouvis at yahoo.com
Cc: GRADSUSR at list.cineca.it
Date: Tuesday, March 31, 2009, 4:53 PM

Hi Kostas

I use R to read grads binary files using the function
readBin("binaryfile.bin",numeric(),size=4,nlon*nlat). This R function
reads it directly and I think the function "writeBin" is what you
need.

The function "seek" can be usefull for you too.

--

Luiz Rodrigo Lins Tozzi
luizrodrigotozzi at gmail.com

Blog de meteorologia:
http://thedealwith.blogspot.com

Twitter:
http://twitter.com/luiztozzi



On Tue, Mar 31, 2009 at 5:27 PM, Costas Douvis <cdouvis at yahoo.com> wrote:
> Hello
>
> The title says it all: It would be good for me to find a way to build
> station data files using R-Project. Has anyone done that? I searched the
> archive but it seems everyone is using Fortran or C
>
> Thanks
> Kostas
>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090402/4073e2cd/attachment.html 


More information about the gradsusr mailing list