2 * wlon,wlat,nump,nill,nilp)
5 real*4 xlon(1000),xlat(1000),wlon(1000),wlat(1000)
6 real*4 nav_orb_vec(3), nav_sun_ref(3), nav_sen_mat(3,3),
8 real*4 plat(1285),plon(1285),sena(1285),senz(1285)
9 real*4 sola(1285),solz(1285)
10 real*4 b2(1285),b8(1285),b2p(1285),b82p(1285)
12 integer*4 ill(30000),ilp(2,30000),ilf(30000)
13 integer*4 jll(1000),jlp(2,1000)
14 integer*4 irec,prod_ID(2)
15 integer*4 nump(1000),nill(1000),nilp(1000)
16 byte lflag(1285,16000)
17 logical land,end,first,west
18 data b82_ice_min/20.0/
19 data b2_cloud_min/18./
22 data b2_valid_min/6.0/
23 data b82_valid_min/-20.0/
24 data b82_valid_max/8.0/
25 data b82_water_max/-3.0/
27 data a2/0.02/,a8/0.15/,tc/1400./
28 data lp_maxg/15/,lp_maxl/40/
33 common /gconst/
pi,radeg,
re,rem,
f,
omf2,omegae
35 #include "navblk_s.fin"
52 tr2 = a2*exp(-prod_id(2)/tc) + (1. - a2)
53 tr8 = a8*exp(-prod_id(2)/tc) + (1. - a8)
71 1 nav_sun_ref, nav_sen_mat, nav_scan_ell, iret)
82 if (iret.ne.0)
go to 990
88 navblk(iline)%orb_vec(i) = nav_orb_vec(i)
89 navblk(iline)%sun_ref(i) = nav_sun_ref(i)
90 navblk(iline)%scan_ell(i) = nav_scan_ell(i)
91 navblk(iline)%scan_ell(i+3) = nav_scan_ell(i+3)
92 navblk(iline)%sen_mat(i,1) = nav_sen_mat(i,1)
93 navblk(iline)%sen_mat(i,2) = nav_sen_mat(i,2)
94 navblk(iline)%sen_mat(i,3) = nav_sen_mat(i,3)
101 ik = ip + jp*(npix-1)
102 call geonav(navblk(iline)%orb_vec,navblk(iline)%sen_mat,
103 * navblk(iline)%scan_ell,navblk(iline)%sun_ref,ik,1,1,
104 * plat,plon,solz,sola,senz,sena)
105 if (plon(1).lt.0.0) west = .true.
109 call geonav(navblk(iline)%orb_vec,navblk(iline)%sen_mat,
110 * navblk(iline)%scan_ell,navblk(iline)%sun_ref,ip,jp,npix,
111 * plat,plon,solz,sola,senz,sena)
122 csz = cos(solz(i)/radeg)
123 cnz = cos(senz(i)/radeg)
124 ssz = sin(solz(i)/radeg)
125 snz = sin(senz(i)/radeg)
126 ca = cos((sena(i)-sola(i))/radeg)
128 fac2 = 2./(1.+csz/cnz)
134 b82p(i) = b8(i)*fac2-b82_fac*b2(i)*fac2
138 if ((b2p(i).lt.b2_valid_min).or.
139 * (b82p(i).lt.b82_valid_min).or.
140 * (b82p(i).gt.b82_valid_max))
then
154 else if (b2p(i).gt.b2_cloud_min)
then
169 else if (b82p(i).lt.b82_water_max)
then
178 if ((lw.gt.0).and.((i-lw).lt.lp_max))
then
184 ilp(1,nsegs) = lw + 1
206 nipix = 100*nipix/ntpix
207 ncpix = 100*ncpix/ntpix
208 nwpix = 100*nwpix/ntpix
209 nlpix = 100*nlpix/ntpix
210 nbpix = 100*nbpix/ntpix
212 write(*,*)
'Cloud pixels',ncpix,
'%'
213 write(*,*)
'Water pixels',nwpix,
'%'
214 write(*,*)
'Land pixels ',nlpix,
'%'
215 write(*,*)
'Corrupted pixels ',nbpix,
'%'
217 if (nsegs.lt.1)
go to 998
226 dowhile(ill(il).lt.2)
228 if (il.gt.nsegs)
go to 998
231 dowhile(ill(nsegs).ge.iline)
233 if (nsegs.lt.il)
go to 998
241 if (ilf(il).ne.0)
then
247 do j=ilp(1,il)-1,ilp(2,il)+1
248 if (lflag(j,ill(il)-1).ge.1)
then
263 if (nj.gt.1000)
go to 997
270 jl = jll(i) - jll(1) + 1
277 if (jlp(1,i).lt.jlp(1,jl)) jlp(1,jl) = jlp(1,i)
278 if (jlp(2,i).gt.jlp(2,jl)) jlp(2,jl) = jlp(2,i)
283 do j=jlp(1,1)-1,jlp(2,1)+1
284 if (lflag(j,jll(1)-1).ge.1)
go to 997
289 call check_segs(jll,jlp,j,j+1,lflag(1,jll(j)),
290 * lflag(1,jll(j)+1),igood)
291 if (igood.ne.0)
go to 997
299 do j=jlp(1,nl)-1,jlp(2,nl)+1
300 if (lflag(j,jll(nl)+1).ge.1)
go to 997
317 ik = ip + jp*(jlp(1,i)-1)
318 np = jlp(2,i) - jlp(1,i) + 1
319 call geonav(navblk(k)%orb_vec,navblk(k)%sen_mat,
320 * navblk(k)%scan_ell,navblk(k)%sun_ref,ik,jp,np,
321 * plat,plon,solz,sola,senz,sena)
323 if (lflag((j+jlp(1,i)-1),k).eq.1)
then
324 xlati = xlati + plat(j)
325 if (west.and.(plon(j).lt.0.0)) plon(j) = plon(j) + 360.0
326 xloni = xloni + plon(j)
328 if (plon(j).lt.xlomin) xlomin = plon(j)
329 if (plon(j).gt.xlomax) xlomax = plon(j)
330 if (plat(j).lt.xlamin) xlamin = plat(j)
331 if (plat(j).gt.xlamax) xlamax = plat(j)
337 nilp(numi) = jlp(1,1)
338 xlat(numi) = xlati/ni
339 xlon(numi) = xloni/ni
340 wlat(numi) = xlamax - xlamin
341 wlon(numi) = xlomax - xlomin
342 write(*,*)ni,xlat(numi),xlon(numi),wlat(numi),wlon(numi)
343 write (51,1100) ni,xlat(numi),xlon(numi),jll(1),jlp(1,1),
344 * wlat(numi),wlon(numi)
345 1100
format (i10,2f12.5,2i10,2f10.5)
349 if (numi.ge.1000)
go to 998