Re: missing values

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 28 Mar 2007 16:23:03 -0600 (MDT)

On Wed, 28 Mar 2007, Mateus da Silva Teixeira wrote:

> Dear NCL users,
>
> Sorry about my previous question, it was incomplete!!!!
> My precipitation data has as missing value -999.9.
> The problem mentioned in the previous e-mail occurs when there are missing
> data.
> So, when I change the _FillValue value, all the -999.9 are changed to the new
> _FillValue value.
> Because this that my counting isn't right!
> Is there a way to change _FillValue without change the data?
>
> Thanks
> Mateus

Mateus,

If I understand you correctly, you don't want -999.9 to be treated as
missing values? If so, you can sneak around this by first deleting
the missing value, and then resetting it:

   delete(seriePluv@_FillValue) ; Now no data is considered missing,
                                     ; and the -999.9 remain intact.
   seriePluv@_FillValue = fakeDays_value

--Mary

> Mateus da Silva Teixeira escreveu:
>> Dear NCL users,
>>
>> I have a 3D array dimensioned (year | 1960:2004, month | 1:12, day | 1:31)
>> in which I put precipitation data - I should do it because my data source.
>> Because the array dimensionality, some fake days do appear, like Feb 30 and
>> April 31, for example.
>> So, in order to eliminate these fake days I substitute the data _FillValue
>> for another, like -1.0.
>> When I print the array for one year, the fake days appear correctly marked
>> with -1.0. I show to you the right end of the first year of this array:
>>
>> 0.00 0.00 0.00 13.40 0.00 3.80 21.00 <-
>> JANUARY
>> 0.00 0.00 0.00 32.00 -1.00 -1.00 -1.00
>> 7.20 4.40 3.40 7.00 0.00 0.00 0.00
>> 0.00 0.00 19.20 0.00 0.00 0.00 -1.00
>> 0.00 0.00 0.00 0.00 0.00 0.00 0.00
>> 0.00 0.00 8.40 0.00 7.20 0.00 -1.00
>> 0.00 0.00 0.00 0.00 0.00 0.00 0.00
>> 0.00 0.00 0.00 0.00 0.00 0.00 0.00
>> 30.40 0.00 0.00 0.00 0.00 0.00 -1.00
>> 0.00 0.00 0.00 0.00 0.00 0.00 0.00
>> 0.00 0.00 0.00 0.00 0.00 0.00 -1.00
>> 11.00 15.00 4.00 0.00 0.00 0.00 0.00 <-
>> DECEMBER
>>
>> To eliminate these days, I transform these array to an 1D array and find
>> the indexes of the fake days, like below
>>
>> seriePluv = ndtooned(selPeriodo(0,:,:)) ; selPeriodo is the
>> 3D array, getting only the first year (the data showed above).
>> seriePluv@_FillValue = fakeDays_value ; fakeDays_value = -1.0
>> print(num(ismissing(seriePluv))) ; verifying the
>> number of the fake days of the first year => should be 7
>>
>>
>> However, the result is completely strange: it returns 68 fake days for this
>> first year.
>> Am I doing something wrong?
>> I already try another values to mark the fake days, but nothing changed!
>>
>> Thanks
>> Mateus
>>
>> _______________________________________________
>> 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 Mar 28 2007 - 16:23:03 MDT

This archive was generated by hypermail 2.2.0 : Wed Mar 28 2007 - 16:25:00 MDT