[Thread Prev][Thread Next][Index]
Re: How to define specific value for BAD?
Hi Daniel,
Ferret does not allow you to impose the missing value flag. The SET
VARIABLE/BAD= qualifier merely allows you to inform Ferret of missing value
flags for a variable to be read from a file.
You can replace all of the missing values in a variable with zeros using the
function
MISSING(var, 0.0)
however, if the resulting variable is SAVEd to a netCDF file, the
missing_value (and _FillValue) attribute in that file will still be a value
that is inherited from the definition, typically -1.0E+34.
Work-around:
* Use MISSING(var,0) to define your variable. Write it to a netCDF file.
Then when you read the data back with Ferret you can use
SET VARIABLE/BAD=
- steve
===========================================
Daniel Müller wrote:
> Dear Ferret-Users
>
> I was just wondering how to define a value as bad flag (0 is desired)
> when saving a variable defined by "let my_variable=..." to a NetCDF-File
> using "save/file=test.cdf my_variable".
> Right now when I look at the created file using ncdump i see
> "missing_value = -9.96921e+36f" and "missing_value = -9.96921e+36f".
> How to change this to 0 (Zero) within ferret?
> I already tried "set data/bad=0 ..." and "set variable/bad=0
> my_variable" which didn't have the desired effect.
>
> Can anybody give me a hint?
>
> Regards
>
> Daniel
--
| NOAA/PMEL | ph. (206) 526-6080
Steve Hankin | 7600 Sand Point Way NE | FAX (206) 526-6744
| Seattle, WA 98115-0070 | hankin@pmel.noaa.gov
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement