Re: [netcdfgroup] how to change a missing value

Dear Cathy,

I searched for how to do this and didn't see anything, or at least anything
> that worked for me t. I suspect it's because of NaN.
>
> I have a file that has this for the variable
>
>     prate:_FillValue = NaNf ;
>
> I would like to change Nanf to a numerical value. Ideally, -9.96921e+36f
>
> for *all* missing values in the file. How can I do this from the command
> line?
>

It seems you need two steps:

1. Replace the data values that match the old _FillValue with the new
value, using the cdo command.
2. Replace the attribute _FillValue with the new value, using the ncatted
command.

Having said that, NaN is usually "safer" in that its use causes error,
making your bugs easier to spot.

Hope this helps,

Ryo




> Thanks
>
> Cathy Smith
>
>
> --
> ***********************************
> affiliation: CU/CIRES working at NOAA/PSL 
> https://psl.noaa.gov/people/cathy.smith/
> Emails about data/webpages may get quicker responses by 
> emailingpsl.data@xxxxxxxx
> Sign up for PSL newsletter
>
> _______________________________________________
> NOTE: All exchanges posted to Unidata maintained email lists are
> recorded in the Unidata inquiry tracking system and made publicly
> available through the web.  Users who post to any of the lists we
> maintain are reminded to remove any personal information that they
> do not want to be made public.
>
>
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> https://www.unidata.ucar.edu/mailing_lists/
>
  • 2025 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: