possible bug in day_of_year function ...

From: Ufuk Utku Turuncoglu (BE) <u.utku.turuncoglu_at_nyahnyahspammersnyahnyah>
Date: Thu Aug 23 2012 - 11:33:26 MDT

Hi,

I try to create three array filled with first day of the month using
day_of_year but it seems that "calendar" attribute does not effect the
behavior of the function. To test it i used following code,

   zeros = ispan(1,12,1)*0
   year = zeros+1996
   month = ispan(1,12,1)

   year@calendar = "360"
   doy360 = day_of_year(year, month, zeros+1)
   year@calendar = "noleap"
   doy365 = day_of_year(year, month, zeros+1)
   year@calendar = "366"
   doy366 = day_of_year(year, month, zeros+1)
   print(year+" "+month+" "+doy360+" "+doy365+" "+doy366)

in this case all arrays (doy360, doy365 and doy366) print same values
like following,

(0) 1996 1 1 1 1
(1) 1996 2 32 32 32
(2) 1996 3 61 61 61
(3) 1996 4 92 92 92
(4) 1996 5 122 122 122
(5) 1996 6 153 153 153
(6) 1996 7 183 183 183
(7) 1996 8 214 214 214
(8) 1996 9 245 245 245
(9) 1996 10 275 275 275
(10) 1996 11 306 306 306
(11) 1996 12 336 336 336

So, it is a bug? or i am doing something wrong. Any suggestion will be
helpful.

Regards,

--ufuk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Aug 23 11:33:47 2012

This archive was generated by hypermail 2.1.8 : Thu Aug 23 2012 - 16:16:15 MDT