[gradsusr] fwrite on mac
Qian, JianHua
JianHua_Qian at uml.edu
Mon May 27 09:26:01 EDT 2013
Dear grads users,
I have trouble in using fwrite on a mac os x laptop. I get the data written from fwrite, but when I plot the data (the correct values should be between 0 and about 100 mm/day), I got unrealistic number:
d pcp
Contouring: -9e+08 to 0 interval 1e+08
If I use "options little_endian", the number is of e+38.
This is how I used the fwrite in a gs file:
open /Users/jianhua_qian/Desktop/IRI/desktopdata/cmorph_indo/cmorph_indo.ctl
set fwrite -sq cmorph_03_13_son_mjo1.dat
%set fwrite -be cmorph_03_13_son_mjo1.dat (I tried –be, but it does not work either)
set x 1 282
set y 1 301
set z 1
set gxout fwrite
set t 2145
d pcp
set t 2146
d pcp
set t 2147
d pcp
set t 2148
d pcp
…..
And my ctl file is as follows:
dset ^cmorph_03_13_son_mjo1.dat
title cmorph data 7dec2002to14may2013 mjo plases
options sequential
%options big_endian
undef -9999.
xdef 282 linear 74.875 0.25
ydef 301 linear -40.125 0.25
zdef 1 levels 0
tdef 952 linear 00z07Dec2002 3hr
vars 1
pcp 0 99 mm/hr (00z data represents pcp of 00z to 03z)
-----
I tried big_endian, little-endian, sequential, and biteswapped, but none works.
Could someone in the grads user group give me a clue?
Thanks!
Joshua Qian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130527/e884b594/attachment-0003.html
More information about the gradsusr
mailing list