[Thread Prev][Thread Next][Index]

scatter and C



Dear Ferret users,

For those who use Ferret from within a  C Program,

Whenever you're calling Ferret from within a C program and you want it
to read an ASCII data file for gridding or anything else, beware that
your file is not already open by a call to "fopen" by example. Every
file must be closed before you can use  the FILE/VAR ....... toto.dat
and the scatter2gridgauss_xy functions.

I usually open an ASCII file for reading or writing and close it right
when I don't need it anymore in my program. But at that time, I tought I
should let my data file open before using
FILE/VAR="long,lat,data"/GRID=gin toto.dat and "scatter2gridgauss_xy" in
order to let Ferret read the file. Wrong! If you do that, Ferret will
try to access an ASCII data file that is already open and that  won't
work. You will get that kind of error message:

**ERROR: all data have same value: data are all flagged as bad

See
http://www.ferret.noaa.gov/Ferret/Mail_Archives/fu_2000/msg00339.html
for details.

Maybe that is a beginners mistake but it took me time to figure it out.
So if you got the same kind of mistake, check if your ASCII file is not
already open before you use Ferret's commands that use the same
ASCII file. Hope that could help somebody sometime.

Thanks to the ferret users list,
Guille











[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement