[ncl-talk] SPI values derived using Pearson 3

Dennis Shea shea at ucar.edu
Sat Jun 10 07:36:01 MDT 2017


re: "for months with consecutive zero precipitation values, the
corresponding SPI value is indicated as missing value (i.e. -999)."

Given all 0s, the code is telling you that it could not calculate Pearson 3
distribution parameters.
EG: The mean would be 0.0, the standard deviation is 0.0. What would you
expect the
Pearson 3 distribution parameters to be?

I believe I sent you the code used by NCL. This subroutine was developed by
Hosking (IBM). You can follow the code to see waht leads to that message.

Good Lucl

      DOUBLE PRECISION FUNCTION CDFPE3(X,PARA,ifail,amssng)
C***********************************************************************
C*                                                                     *
C*  FORTRAN CODE WRITTEN FOR INCLUSION IN IBM RESEARCH REPORT RC20525, *
C*  'FORTRAN ROUTINES FOR USE WITH THE METHOD OF L-MOMENTS, VERSION 3' *
C*                                                                     *
C*  J. R. M. HOSKING                                                   *
C*  IBM RESEARCH DIVISION                                              *
C*  T. J. WATSON RESEARCH CENTER                                       *
C*  YORKTOWN HEIGHTS                                                   *
C*  NEW YORK 10598, U.S.A.                                             *
C*                                                                     *
C*  VERSION 3     AUGUST 1996                                          *
C*                                                                     *
C***********************************************************************
C
C  DISTRIBUTION FUNCTION OF THE PEARSON TYPE 3 DISTRIBUTION
C


On Sat, Jun 10, 2017 at 6:29 AM, Dawit Abebe <dawit.kan at gmail.com> wrote:

> Dear All
>
> Kindly your help on errors with SPI using Pearson Type 3 described below
>
> Dawit
>
> ---------- Forwarded message ----------
> From: Dawit Abebe <dawit.kan at gmail.com>
> Date: 8 June 2017 at 15:43
> Subject: SPI values derived using Pearson 3
> To: ncl-talk-request at ucar.edu, ncl-talk at ucar.edu, Mary Haley <
> haley at ucar.edu>
>
>
> Dear All,
>
> Can any one help me understand the following error messages when
> calculating SPI based on Pearson 3 option.
>
> Part of my script related to this is:
> =============================================
> opt = True
> opt at spi_type = 3
> spi = new((/nrun, ntime, nlat, mlon/), typeof(prc), pmsg)
>
> do nr=0, nrun-1
>     spi(nr, :, :, :) = dim_spi_n(prc, run(r), opt, 0)
> end do
>
> However,
> 1. I get the an error message: "*** ERROR *** ROUTINE CDFPE3 : PARAMETERS
> INVALID” , why and what does this mean? I cam across a similar problem
> being reported but not responded to.
>
> 2. After the above error message, however, NCL has generated the SPI
> values. However,  for months with consecutive zero precipitation values,
> the corresponding SPI value is indicated as missing value (i.e. -999). The
> fact that Pearson 3 is advantageous over Gama that where monthly and
> seasonal precipitation of zero is common, it will give better results than
> Gama (http://www.ncl.ucar.edu/Document/Functions/Built-in/dim_spi_n.shtml),
> I'm unsure why missing values (-999) generated for months and seasons with
> zero precipitation value.  This is observed mainly on SPI calculate over 1
> and 3 months time scale.
>
> I would very much appreciate if any me help me to understand and solve
> this two issues.
>
> Dawit
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170610/fffa04c5/attachment.html 


More information about the ncl-talk mailing list