180 integer,
parameter :: c_omsiz = 512
181 integer,
parameter :: n_amsiz = 384
182 integer,
parameter :: a_rrsiz = 8704
184 integer,
parameter :: anchor_c = 1
185 integer,
parameter :: anchor_ = 2048
187 integer,
parameter :: mult_ = 1
189 integer,
parameter :: mx_boxsiz = 9
193 integer,
parameter :: numgeo = 5
195 real*8,
parameter :: p_i = 3.1415926535898d0
199 integer,
parameter :: m_m = 41
200 integer,
parameter :: n_n = 45
201 integer,
parameter :: c_h = 2
205 integer*4 isflag(c_h);
209 real*4 phi0(m_m,n_n,c_h);
210 real*4 phi1(m_m,n_n,c_h);
211 real*4 phi2(m_m,n_n,c_h);
220 integer*4 nk, ianchr;
221 integer*4 ni, nj, jnpixsiz;
224 real*4 thesatd, thesund, fsun, fsat;
225 real*4 phi00, phi01, phi10, phi11, phi21, phi23;
226 real*4 thesun, sunmui, aercof;
232 real*4 f0var, x, fday, gday;
258 save theta, theta0, phi0, phi1, phi2, tau, isflag;
264 data to(1), to(2) / .090, .000 /;
266 data needray / .true. /;
275 . (1.0+.0167*sngl(dcos(2.0d0*p_i*(dble(fday)-3.0d0)/365.0d0)))
277 deg8(x8) = x8*180.0d0/p_i
278 rad(x) = x*sngl(p_i)/180.
280 stop
'AVHRRSUB5H is a package'
286 entry avconsh(lundk, inpixsiz,
jday)
297 gday = amod(float(
jday),1000.);
299 f1ln(ii) = f0var(sngl(p_i)*100.,gday);
306 call rayget(lundk,theta,theta0,phi0,phi1,phi2,tau,isflag)
309 if (tau(1,nk) .eq. 0.)
then
323 entry avlooph(satz, solz, delphi, rayly, aersol, aglint)
330 b00 = 1./sngl(dcos(thesat));
348 if (sunmui .eq. 0.)
then
354 thesatd = sngl(deg8(thesat));
355 if (thesatd > theta(m_m))
then
359 ni=int((((thesatd-theta(1))/(theta(m_m)-theta(1)))*float(m_m-1
360 do while (ni >= 1 .and. ni < m_m)
361 if (theta(ni) <= thesatd .and.
362 . theta(ni+1) >= thesatd)
then
365 else if (theta(ni+1) < thesatd)
then
376 if (thesund > theta0(n_n))
then
380 nj=int((((thesund-theta0(1))/(theta0(n_n)-theta0(1)))*float(n_n
381 do while (nj >= 1 .and. nj < n_n)
382 if (theta0(nj) <= thesund .and.
383 . theta0(nj+1) >= thesund)
then
386 else if (theta0(nj+1) < thesund)
then
395 if (ni >= 1 .and. ni < m_m .and.
396 . nj >= 1 .and. nj < n_n)
then
397 fsat = (thesatd-theta(ni))/(theta(ni+1)-theta(ni));
398 fsun = (thesund-theta0(nj))/(theta0(nj+1)-theta0(nj));
401 if (isflag(nk) .eq. 0)
then
402 phi00 = phi0(ni ,nj ,nk)+
403 . phi1(ni ,nj ,nk)*cos(angle)+
404 . phi2(ni ,nj ,nk)*cos(2*angle);
405 phi10 = phi0(ni+1,nj ,nk)+
406 . phi1(ni+1,nj ,nk)*cos(angle)+
407 . phi2(ni+1,nj ,nk)*cos(2*angle);
408 phi01 = phi0(ni ,nj+1,nk)+
409 . phi1(ni ,nj+1,nk)*cos(angle)+
410 . phi2(ni ,nj+1,nk)*cos(2*angle);
411 phi11 = phi0(ni+1,nj+1,nk)+
412 . phi1(ni+1,nj+1,nk)*cos(angle)+
413 . phi2(ni+1,nj+1,nk)*cos(2*angle);
414 phi21 = phi00*(1-fsun)+phi01*fsun;
415 phi23 = phi10*(1-fsun)+phi11*fsun;
416 phicof(nk) = phi21*(1.-fsat)+phi23*fsat;
439 rayly(1) = phicof(1)*f1ln(1)*exp(-to(1)*c00);
440 rayly(2) = phicof(2)*f1ln(2)*exp(-to(2)*c00);
444 call hmf8(sngl(thesat),thesun,angle,1.,1.,aercof);
445 aersol(1) = aercof*f1ln(1)*exp(-to(1)*c00);
446 aersol(2) = aercof*f1ln(2)*exp(-to(2)*c00);
453 call getglint(satz, solz, delphi, 6.0, 0.0, aglint);