[gradsusr] Read binary files written from R

Kiswendsida Hyacinthe Guigma K.Guigma at sussex.ac.uk
Wed Apr 11 10:37:56 EDT 2018


Dear Dr. Sujata,
I replaced all missing values in R by -99999 before to write in a binary file. So I think this is not the cause of the problem.
Thank you for your help,

GUIGMA
________________________________________
From: gradsusr [gradsusr-bounces at gradsusr.org] on behalf of Sujata Mandke [amin at tropmet.res.in]
Sent: Wednesday, April 11, 2018 1:36 PM
To: GrADS Users Forum
Subject: Re: [gradsusr] Read binary files written from R

Hello!

   Please check if value of undefine is correct.
That could create problem such as you mentioned.

with best regards
Dr. Sujata Mandke
scientist, Indian Institute of Tropical Meteorology
PUNE, INDIA

----- Original Message -----
From: Kiswendsida Hyacinthe Guigma <K.Guigma at sussex.ac.uk>
To: gradsusr at gradsusr.org
Sent: Tue, 10 Apr 2018 17:18:39 +0530 (IST)
Subject: [gradsusr] Read binary files written from R

Hi everyone!
I have some meteorological data that I processed using R and I would like to plot them in Grads. Then, I wrote binary files from R and I took time to check that they are well written in the right order. I also wrote a control file. GrADS is able to read the file but it gives so bad values. When I try to display them for example, I get my data range and it is completely different from what I have in R. Actually my data in R span from -0.005 to 0.05 while in Grads I get -5e+37 to 3e+38 !!!
This is my control file code:

DSET    /home/k/kg/kg312/eof.dat
TITLE   EMPIRICAL ORTHOGONAL FUNCTIONS
UNDEF   -99999
XDEF 61 LINEAR -20.5 1
YDEF 12 LINEAR 5.5 1
ZDEF 1 LINEAR 1 1
TDEF 1 LINEAR 16FEB2018 1DY
VARS 1
EOF1 1 99 EOF1
ENDVARS

I thought the problem could be due to a byte swapping. Then I included successively all of the OPTIONS related to that: byteswapped, little_endian and big_endian but none of them solved my problem.
Both my R and Grads are run on the same machine on Apollo HPC. I used Grads Version 2.1.0 and  Version 2.0.1.oga.1. The R version is R3.4.0 .

Any help is appreciated!

GUIGMA
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr



More information about the gradsusr mailing list