38 dimension wavobs(1024),fwhm(1024)
39 COMMON /getinput4/ wavobs,fwhm
42 COMMON /solar_irr1/yirr
44 COMMON /getinput5/ nobs,hsurf,dlt,dlt2
45 COMMON /geometry1/ solzni,solaz,obszni,obsphi,iday
53 parameter(nobs_max = 1024, ninstr_max = 3001)
55 REAL FINSTR(NINSTR_MAX)
56 INTEGER NCVHF(NOBS_MAX)
70 REAL WAVLN_MED(NP_MED)
77 REAL VSTART, VEND, DWAVLN
80 parameter(vstart = 0.30, vend = 3.1, dwavln = 0.0001)
98 INTEGER INDEX_MED(NP_MED)
99 REAL WAVLN_MED_INDEX(NP_MED), TRAN_MED_INDEX(NP_MED)
101 REAL FINSTR_WAVNO(5000), FWHM_WAVNO(NP_MED)
102 INTEGER NCVHF_WAVNO(NP_MED)
104 DATA pi,dtorad /3.1415926,0.0174533/
107 OPEN(31,file=
'sun_binary_PC',status=
'old',
108 & form=
'unformatted',access=
'direct',recl=4*49933)
109 read(31,rec=1) (wavno_hi(i), i = 1, 49933)
110 read(31,rec=2) (tran_hi(i), i = 1, 49933)
115 wavln_med(i) = vstart + float(i-1)*dwavln
126 index_med(i) = ( (10000./wavln_med(i) - 51.)/dwavno + 1.)
133 wavln_med_index(i) = 10000. /(float(index_med(i)-1)*dwavno
139 fwhm_wavno(i) = 10000.*dlt_med
140 & /(wavln_med_index(i)*wavln_med_index(i))
141 IF(fwhm_wavno(i).LT.1.0) fwhm_wavno(i) = 1.0
146 ncvhf_wavno(i) = ( facdlt * fwhm_wavno(i) / dwavno + 1.)
154 ncvhf(i) = ( facdlt * fwhm(i) / dwavln + 1.)
178 tran_med_index(j) = 0.0
179 ncvtot_wavno = 2 * ncvhf_wavno(j) - 1
183 DO 560 i = ncvhf_wavno(j), ncvtot_wavno
185 & exp( -const1*(float(i-ncvhf_wavno(j))*dwavno
186 & /fwhm_wavno(j))**2.0)
187 sumins = sumins + finstr_wavno(i)
190 DO 565 i = 1, ncvhf_wavno(j)-1
191 finstr_wavno(i) = finstr_wavno(ncvtot_wavno-i+1)
192 sumins = sumins + finstr_wavno(i)
195 sumins = sumins * dwavno
197 DO 570 i = 1, ncvtot_wavno
198 finstr_wavno(i) = finstr_wavno(i)*dwavno/sumins
202 DO 491 k = index_med(j)-(ncvhf_wavno(j)-1),
203 & index_med(j)+ncvhf_wavno(j)-1
204 tran_med_index(j) = tran_med_index(j) + tran_hi(k)*
205 & finstr_wavno(k-index_med(j)+ncvhf_wavno(j))
214 tran_med(1) = tran_med_index(1)
215 tran_med(np_med) = tran_med_index(np_med)
218 dlt = wavln_med_index(j) - wavln_med_index(j-1)
219 IF(dlt.LT.1.0e-06)
THEN
220 tran_med(j) = tran_med_index(j)
222 fjm1 = (wavln_med_index(j) - wavln_med(j)) /dlt
223 fj = (wavln_med(j) - wavln_med_index(j-1))/dlt
224 tran_med(j) = fjm1*tran_med_index(j-1) + fj*tran_med_index(j)
242 ncvtot = 2 * ncvhf(j) - 1
247 DO 1560 i = ncvhf(j), ncvtot
249 & exp( -const1*(float(i-ncvhf(j))*dwavln
251 sumins = sumins + finstr(i)
254 DO 1565 i = 1, ncvhf(j)-1
255 finstr(i) = finstr(ncvtot-i+1)
256 sumins = sumins + finstr(i)
259 sumins = sumins * dwavln
261 DO 1570 i = 1, ncvtot
262 finstr(i) = finstr(i)*dwavln/sumins
267 CALL hunt(wavln_med, np_med, wavobs(j), ia)
272 DO 1491 k = ia-(ncvhf(j)-1), ia+ncvhf(j)-1
273 tran_ia = tran_ia + tran_med(k)*
274 & finstr(k-ia+ncvhf(j))
278 DO 1492 k = ia_p1-(ncvhf(j)-1), ia_p1+ncvhf(j)-1
279 tran_iap1 = tran_iap1 + tran_med(k)*
280 & finstr(k-ia_p1+ncvhf(j))
285 dlt_ia = wavln_med(ia_p1) - wavln_med(ia)
286 fia = (wavln_med(ia_p1) - wavobs(j)) /dlt_ia
289 yirr(j) = fia*tran_ia + fia_p1*tran_iap1
303 gamm=2.0*
pi*float(iday-1)/365.
304 e0=1.000110+0.034221*cos(gamm)+0.001280*sin(gamm)
305 & + 0.000719*cos(2.0*gamm)+0.000077*sin(2.0*gamm)
308 yirr(i)=yirr(i)*cos(solzni)*e0