real function fouri2 i (indpar) c Subroutine to calculate Fourier Series representation of seasonal c variables. c Code received 01/21/99 from Clarence Richardson. c Modified by C. R. Meyer and verified to give identical results. c integer indpar c c indpar - index of the current parameter. c c + + + COMMON BLOCKS + + + include 'cinterp.inc' c read: c, t c c - fourier series coefficient. c t - fourier series coefficient. c include 'cbk3.inc' c read: ida c ida - Julian Day of Year. c + + + LOCAL VARIABLES + + + real dd c c + + + END SPECIFICATIONS + + + c c ---- compute the daily values from c & t: dd=(float(ida)+15.5)/366. fouri2 = x_bar(indpar) 1 + c(1,indpar)*cos(6.2832*float(1)*dd+t(1,indpar)) 2 + c(2,indpar)*cos(6.2832*float(2)*dd+t(2,indpar)) 3 + c(3,indpar)*cos(6.2832*float(3)*dd+t(3,indpar)) 4 + c(4,indpar)*cos(6.2832*float(4)*dd+t(4,indpar)) 5 + c(5,indpar)*cos(6.2832*float(5)*dd+t(5,indpar)) 6 + c(6,indpar)*cos(6.2832*float(6)*dd+t(6,indpar)) c return end