fwrite bends values
Heiner Körnich
heiner at MISU.SU.SE
Thu Jan 4 05:55:19 EST 2007
Hi,
I am not sure what goes wrong. But I think your pictures show that the
new file has too many data entries. For every latitudinal circle you
should have one longitude too much and thus, the temperature signal is
shifted. This happens hardly recognizable at low latitudes, since there
the shift is only a few degrees, but in high latitudes, the shift sums
up to twenty and more degrees.
So, please check the file size. It should be 4 times number of latitudes
times number of longitudes. If you use "set lon -180 180", it is number
of latitudes times (number of longitudes plus one). I just saw that you
use "sequential", so add two to number of longitudes.
However, using "set x 1 360" or "set lon -180 180" must make a
difference in the number of elements written to the file.
You could try to remove the "sequential"-option from both the
"fwrite"-call and from the ctl-file.
I do not quite understand your entry in the ctl-file:
temp2 27 122,109,0 ** temperature
Maybe try instead:
temp2 1 99 ** temperature
Happy new year,
Heiner
Erko Jakobson wrote:
> Hello
>
> You can look the 2 pictures from the web:
>
> www.ut.ee/~erkok/temperature
>
> There temp1.gif is original and temp2.gif is the file after saving with the
> fwrite ...
>
> The solution not to use -180 180 didn't help
>
> Erko
>
--
Heiner Körnich
Dept. of Meteorology Tel: +46 8 164333
Stockholms University, SE-106 91 Stockholm, Sweden
Email: heiner at misu.su.se www.misu.su.se/~heiner/
More information about the gradsusr
mailing list