Re: Odd error from day_of_year

From: Bridget Thrasher <bthrasher_at_nyahnyahspammersnyahnyah>
Date: Wed Oct 26 2011 - 15:47:59 MDT

No other warning or errors, and the script keeps running. Fortunately,
Dave's loop let me find the culprit. Two files of the 56 I'm using each had
seven times with missing values. I'm still not sure how the regridded
versions of the data have the correct times since I don't remember fixing
them. I guess linint2_Wrap is omnipotent! ;)

Seriously though, thanks for the help, and sorry for taking your time. I
should have been able to figure that out myself!

-Bridget

On Wed, Oct 26, 2011 at 7:30 AM, Mary Haley <haley@ucar.edu> wrote:

> Bridget,
>
> Your assumption was correct, that this error would mean that you've
> inputted a month of -8 for the 2nd argument of day_of_year.
>
> One possibility is that you are not passing integers to this function.
>
> Also, as Dave Allured asked, are you getting any other errors or warnings
> from your script?
>
> --Mary
>
>
> On Oct 25, 2011, at 4:35 PM, Bridget Thrasher wrote:
>
> I'm receiving an odd error that I've never seen before: "day_of_year:
>> illegal month, -8"
>>
>> My command is: doyobs = day_of_year(datesobs(:,0),**datesobs(:,1),datesobs(:,2))
>> - 1
>>
>> I thought it meant that the function was finding a value of -8 in the
>> month slot, but using the commands below to look at both the inputs and the
>> outputs show nothing unusual:
>> print(datesobs(:,0)+" "+datesobs(:,1)+" "+datesobs(:,2))
>> print(doyobs)
>>
>> Another weird thing is that I'm fairly certain it's only showing this when
>> reading from leap years (I'm reading in 56 years of daily times, and I get
>> the error 14 times), and it only happens with my original data files, not
>> with the files containing regridded data that I made with linint2_Wrap.
>>
>> Any insight? Should I just ignore it and carry on?
>> bridget$ ncl -V
>> 5.2.0
>>
>> -Bridget
>>
>> --
>> Bridget Thrasher, PhD
>> Independent Contractor, Research Scientist
>>
>>
>> ______________________________**_________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/**mailman/listinfo/ncl-talk<http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>>
>
>

-- 
Bridget Thrasher, PhD
Independent Contractor, Research Scientist
Received on Wed Oct 26 15:48:03 2011

This archive was generated by hypermail 2.1.8 : Fri Oct 28 2011 - 10:52:03 MDT