[Thread Prev][Thread Next][Index]

Re: How to make ferret recognize/process "NaN" in a MatLab file?



Hi Chi,
Ferret can deal with NaN in a NetCDF file, but not in an ascii file.
I think the quickest answer might be for you to use a sed script on
your ascii file, and change the NaN to some numeric value to represent
missing data.  Then in Ferret you can define that value as the missing
value for your variable, once you have read it, with SET VARIABLE/BAD=

Another option would be to have matlab write the file in NetCDF
format, if that is an option, and set the missing data flag to NaN.

Ansley Manke

Chi wrote:

> Hi there
>       I have some 3D scattered point data. I picked one of them as
> sample, did 3D interpolation with MatLab.
> Then I cut a slice from the interpolated 3D data and saved it into an
> ascii file.
>       Everything went perfectly expect that there were a few "NaN" in
> the ascii file. When I use ferret to read this file,
> for example, file/var=salinity/grid=mygird mytest.dat, ferret complained
> about the "NaN".  However, this not a problem
> at all using MatLab to ingest it.
>       Anybody knows how to solve this problem? How to make ferret ingest
> the file with "NaN" in?
>       Thanks a lot.
>       Ding
>
>
>
> --
> Ding Chi
> Research Staff
> Oceanography Department, Dalhousie University
> Halifax, Nova Scotia, Canada
> Phone (902)494-3655

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement