Re: handing missing values in gamma fit

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 18 2012 - 12:35:50 MDT

I think that there may be grid points where a climatology
was used. Hence, all Januaries were constant.

=====
The following does not address the problem but will make
make all bad points equall _FillValue

Not sure why you did the following:

  var = f1->pre(stiR:endiR, :, :)
  var = log10(var + 0.01) ; comment this out?

Replace

  do nl = 0, nlat-1
   do ml = 0, nlon-1
    if (all(.not.ismissing(var(:, nl, ml))))then
       do k = 0, ds_len-1
           var_spi(k, :, nl, ml) = (/dim_spi_n(var(:,nl ml), dr_len(k),
False, 0)/)
       end do
    end if
   end do

with

  wcStrt = systemfunc("date") ; timing only

  do k = 0, ds_len-1
    var_spi(k, :, :, :) = (/dim_spi_n(var, dr_len(k), False, 0)/)
  end do

This is *MUCH* faster than manually looping. 8 seconds on CGD systems/

Add

  nNaN = num(isnan_ieee(var_spi))
  print(nNaN)
  if (nNaN.gt.0) then
      var_spi = where(isnan_ieee(var_spi), var_spi@_FillValue, var_spi)
  end if

  nBig = num(var_spi.gt.1e10)
  print(nBig)
  if (nBig.gt.0) then
      var_spi = where(var_spi.gt.1e30, var_spi@_FillValue, var_spi)
  end if

  wallClockElapseTime(wcStrt,"LOOP",0)

On 10/18/2012 11:52 AM, Mary Haley wrote:
> This will be fixed, but unfortunately not in the next version (6.1.0) of
> NCL.
>
> If you really need a fix, we can get you a new binary soon.
>
> --Mary
>
> On Oct 17, 2012, at 10:28 AM, Sanjiv Kumar wrote:
>
>> Hi Mary:
>>
>> thank you for the reply. You may also want to fix another problem with
>> 'dim_spi_n'
>>
>> i get following error message:
>>
>> >>>>>>>>>>>>>>>
>>
>> Error in anvnrmd(). Prob. not in [0,1.0]
>>
>> >>>>>>>>>>
>>
>> I the output file i get some non-wanted values e.g.
>> "9.99999993381581e+36" and "NaN".
>>
>> I am guessing this issue is related to the above error message.
>>
>> Let me know if you have any question.
>>
>> -Sanjiv Kumar
>>
>>
>>
>> On Wed, Oct 17, 2012 at 8:22 AM, Mary Haley <haley@ucar.edu
>> <mailto:haley@ucar.edu>> wrote:
>>
>> This will be fixed in V6.1.0, which we are trying to get out the
>> door this week or next.
>>
>> --Mary
>>
>> On Oct 15, 2012, at 2:50 PM, Sanjiv Kumar wrote:
>>
>> > Hi,
>> >
>> > I am trying to use 'dim_spi_n' in NCL 6.1.0. IT works great if i
>> do not have missing data. But when data array contains missing
>> data i get following error message:
>> >
>> > >>>>>>
>> > Error in gamfitd - empty data array
>> > >>>>>
>> >
>> > For example, i have a global land only precipitation so all
>> ocean data point are empty.
>> > Since, the program encounter first missing ocean data point, it
>> gives the above error and stops. It does not calculate the SPI
>> values for the land points.
>> >
>> > Is there some way to work around this issue.
>> >
>> > Thank you in advance.
>> >
>> > -sanjiv
>> >
>> > _______________________________________________
>> > ncl-talk mailing list
>> > List instructions, subscriber options, unsubscribe:
>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 18 12:36:00 2012

This archive was generated by hypermail 2.1.8 : Tue Oct 23 2012 - 11:10:04 MDT