Re: two fold problem with runave_n and regline_stats

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 10 2014 - 10:44:48 MDT

Hi Michael,
I'm not sure about the second question of yours pertaining to the errors
returned by the regline function, but I can answer the first question:
All runave* functions do not return values for any calculation that
involves data denoted by _FillValue.

For example:
ncl 1> a = (/1.5,2.4,-1.2,-999.,2.3/)
ncl 2> a@_FillValue = -999.
ncl 3> print(runave(a,3,0))
(0) -999
(1) 0.9
(2) -999
(3) -999
(4) -999

The only good value returned is in the 1st index, which contains the
average of 1.4, 2.4 and -1.2. If you wish to compute a running average
while missing data is present I would suggest using the dim_avg* suite of
functions and running things through a do loop.

Hope that helps. If not, please respond to the ncl-talk email list.
Adam




On Wed, Jul 9, 2014 at 3:45 PM, Michael Stone <mrstone@colorado.edu> wrote:

> Hi all,
>
> I have a time series of data with some missing values that I'm using
> runave_n to smooth and then fitting a regline to the smoothed data. I'm not
> sure I understand how runave_n handles missing values but when I use
> runave_n with increasing nave, the number of missing values in the data set
> continually increases, this seems odd to me. I know my _FillValues are set
> correctly as well. Is this intended behavior? If so, could someone maybe
> explain why?
>
> Finally, a part two to this question, when I feed the smoothed time series
> into regline_stats after doing the running average, I found out that when
> run_ave_n has filled the entire time series with missing values
> regline_stats throws a very cryptic error. It says:
>
> fatal:Subscript out of range, error in subscript #0
> fatal:An error occurred reading
>
> This is an odd way for the function to error handle that particular case
> and thought I should mention it.
>
> Relevant information:
>
> NCL version: 6.2.0
> Linux version: Linux 2.6.32-431.11.2.el6.i686 #1 SMP Mon Mar 3 13:33:00
> EST 2014 i686 i686 i386 GNU/Linux
>
> Attached you'll find my data file and a short script with the issue
> outlined.
>
> Thanks,
> Michael
>
>
> --------------------------------------------------------------------------------------------------
> Michael Stone (mrstone@colorado.edu)
> ATOC PhD Student
> CIRES Researcher
> Ekeley/CIRES Room S327
> University of Colorado <mrstone@colorado.edu>
>
> --------------------------------------------------------------------------------------------------
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


--
Adam Phillips
Associate Scientist, Climate and Global Dynamics Division, NCAR
www.cgd.ucar.edu/staff/asphilli/ 303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>

Received on Thu Jul 10 04:45:24 2014

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2014 - 15:10:55 MDT