Re: 'nan' in 'nc' file

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 27 Aug 2008 10:05:58 -0600 (MDT)

On Wed, 27 Aug 2008 h3dang_at_scimail.uwaterloo.ca wrote:

> Hello
>
> Thanks for the response, I've just reviewed the example and made my own ncl
> program:
>
> begin
> flname = addfile("./no2d3.nc","w")
> v_no2 = flname->NO2
>
> if(any(isnan_ieee(v_no2))) then
> value = -99.
> replace_ieeenan(v_no2, value, 0)
> v_no2@_FillValue = value
> end if
> flname->NO2=(/v_no2/)
> end
>
> But when I ncdump the new nc file, the "nan" has changed to "_", which is
> like:
> 0.007887535, 0.008808989, 0.009664029, 0.01029408, 0.01089421,
> 0.01207584, 0.01365368, 0.01421177, 0.01258714, 0.009963885, _, _, _, _,
> _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
>

Y,

The '-,' is how ncdump indicates that these values are missing (i.e.,
equal to the "_FillValue" value of 99). Since you set all your 'nan'
values to _FillValue, this is exactly what you should be seeing.

--Mary

> Y
> Quoting David Brown <dbrown_at_ucar.edu>:
>
>> See the example in the documentation for function 'isnan_ieee' and
>> the procedure 'replace_ieeenan'
>>
>>
>> On Aug 26, 2008, at 5:24 PM, h3dang_at_scimail.uwaterloo.ca wrote:
>>
>>> Dear all,
>>>
>>> I just got an netCDF file and 'ncdump' show that some of the data are
>>> 'nan'. Was wondering how can I change these 'nan's to '0.000' or other
>>> numbers so that I can plot it using ncl.
>>>
>>>
>>> Thanks
>>> Y
>>>
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk_at_ucar.edu
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 27 2008 - 10:05:58 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 27 2008 - 10:22:45 MDT