1 subroutine find_v_veg(month,season,realbuf,tmpvg,
2 1 r412sv,r470sv,gzflg,outbufvg,tau_x470_flag)
28 include
'newaottbl.inc'
32 logical dflag, debug, do_sv, do_nir
35 integer month, season, gzflg
37 real realbuf(26), tmpvg(7), outbufvg(21), xnvalm6(6)
41 real nval(10,46,30), yy(10), yyw(8)
44 real tau_x470_1, tau_x470_2, tau_x470_3
45 real tau_x470sv_1, tau_x470sv_2, tau_x470sv_3
46 integer tau_x470_flag, tau_x650_flag, tau_ini_flag, tau_x470_flag_ini
47 integer tau_x470_flag1, tau_x470_flag2, tau_x470_flag3
48 integer tau_x470sv_flag1, tau_x470sv_flag2, tau_x470sv_flag3
52 real*4 r412db,r470db,r650db,cl_flag
53 real xtau(3),ssa(3),qa_flag(4),aot_mod(6)
54 character*4 w0_name470(4)
55 character*12 aer_tab(10)
62 common /fname_node/ aer_tab, w0_name470
80 data w0_name470 /
'0.91',
'0.94',
'0.96',
'0.99'/
140 r412db =realbuf(24)*100.
141 r470db =realbuf(25)*100.
142 r650db =realbuf(26)*100.
150 psi = acos(cos(sza*cc)*cos(xthet*cc) +
151 1 sin(sza*cc)*sin(xthet*cc)*cos(xphi*cc))
158 psi = acos(cos(sza*cc)*cos(xthet*cc) -
159 1 sin(sza*cc)*sin(xthet*cc)*cos(xphi*cc))
160 scat_ang = 180. - psi/cc
169 idx=int((xlong-xlonbeg)/xyintv2) + 1
170 idy=int((xlat-xlatbeg)/xyintv2) + 1
172 if(idx.ge.1.and.idx.le.nx2.and.idy.ge.1.and.idy.le.ny2)
then
173 sfc_typ = xlcvr_2(idx,idy)
174 xreg_id = regid_2(idx,idy)
177 print *,
'lcvr data out of bound: idx,nx2,idy,ny2: ',idx,nx2,idy
197 if (xphi.gt.179.99) xphi=179.99
198 if (xphi.lt.6.0) xphi = 6.
212 refln21 = xnvalm6(4)*3.14159/cos(sza*cc)
213 refln865 = xnvalm6(5)*3.14159/cos(sza*cc)
221 sirndvi=(xnvalm6(6)-xnvalm6(4))/(xnvalm6(6)+xnvalm6(4))
222 rc_ndvi =(refn865_rc-refn672_rc)/(refn865_rc+refn672_rc)
223 toa_ndvi = (refl865-refl6)/(refl865+refl6)
224 airmass = 1.0/cos(sza*cc)*1.0/cos(vza*cc)
275 if (gzflg.eq.15.or.gzflg.eq.19)
then
278 elseif (lcvr.eq.12.and.rc_ndvi.lt.0.4.and.(ioprg.eq.1.or.ioprg.eq.
then
294 if (xeas_b1.lt.xmnsfc1.and.xeas_b1.gt.-900.0) xeas_b1=xmnsfc1
295 if (xeas_b3.lt.xmnsfc3.and.xeas_b3.gt.-900.0) xeas_b3=xmnsfc3
301 call aero_650(dflag,refl,x1,x2,x3,mm,nn,ll,ma,
302 1 r650,tau_ini,tau_ini_flag,0,0.0,0.0,0,trflg)
315 if (tau_ini.gt.0.3)
then
319 rc_ndvi_c = rc_ndvi+0.257*tau_ini*rc_ndvi
320 1 +0.172*(airmass-1.0)*tau_ini*rc_ndvi
322 if (scat_ang.lt.120)
then
323 rc_ndvi_c = rc_ndvi+0.257*tau_ini*rc_ndvi
324 1 +0.172*(airmass-1.0)*tau_ini*rc_ndvi
325 2 +0.025*(30.0-(scat_ang-90.0))*tau_ini*rc_ndvi
348 if (xeas_b1.lt.xmnsfc1.and.xeas_b1.gt.-900.0) xeas_b1=xmnsfc1
349 if (xeas_b3.lt.xmnsfc3.and.xeas_b3.gt.-900.0) xeas_b3=xmnsfc3
352 if (xeas_b3.gt.24.0)
return
388 if (season.eq.1)
then
406 elseif(ioprg.eq.2)
then
407 if (season.eq.3)
then
425 elseif(ioprg.eq.9)
then
426 if (season.eq.3)
then
444 elseif(ioprg.eq.3)
then
445 if (season.eq.1.)
then
462 elseif(ioprg.eq.4)
then
463 if (season.eq.3)
then
481 elseif(ioprg.eq.5)
then
490 elseif(ioprg.eq.6)
then
491 if (season.eq.3.or.season.eq.4)
then
499 elseif (season.eq.1)
then
517 elseif(ioprg.eq.7)
then
518 if (season.eq.1)
then
536 elseif(ioprg.eq.8.or.ioprg.eq.10)
then
537 if (season.eq.3)
then
555 elseif(ioprg.eq.13)
then
579 if (refl1.gt.0.0.and.refl1.lt.0.09.and.
580 1 refl6.gt.0.0.and.refl6.lt.0.14)
go to 11
581 if (toa_ndvi.gt.0.1.and.
582 1 refln21.gt.0.01.and.refln21.le.0.25)
go to 11
620 call aero_470(dflag,refl,x1,x2,x3,mm,nn,ll,ma,
621 1 imod,r470,tau_x470_1,tau_x470_flag1,trflg,0.0,debug)
631 tau_x4701_00=tau_x470_1
635 aot21est=tau_x470_1*(466.0/2110.)**alpest
636 if(aot21est.lt.0.0.or.aot21est.gt.0.5)
return
637 if(aot21est.ge.0.0.and.aot21est.lt.0.06)
go to 333
640 call calc_sfc21(x1,x2,x3,tref21in,aot21est,as_21)
645 if(refl21r.lt.0)
return
648 if(xeas_b1.lt.xmnsfc1.or.xeas_b1.gt.xmxsfc1.or.
649 1 xeas_b3.lt.xmnsfc3.or.xeas_b3.gt.xmxsfc3)
return
653 call aero_470(dflag,refl,x1,x2,x3,mm,nn,ll,ma,
654 1 imod,r470,tau_x470_1,tau_x470_flag1,trflg,0.0,debug)
664 if(xeas_b1.lt.xmnsfc1.or.xeas_b1.gt.xmxsfc1.or.
665 1 xeas_b3.lt.xmnsfc3.or.xeas_b3.gt.xmxsfc3)
return
670 call aero_470(dflag,refl,x1,x2,x3,mm,nn,ll,ma,
671 1 imodarr(1),r470,tau_x470_1,tau_x470_flag1,trflg,modfrac
672 call aero_470(dflag,refl,x1,x2,x3,mm,nn,ll,ma,
673 1 imodarr(2),r470,tau_x470_2,tau_x470_flag2,trflg,modfrac
674 call aero_470(dflag,refl,x1,x2,x3,mm,nn,ll,ma,
675 1 imodarr(3),r470,tau_x470_3,tau_x470_flag3,trflg,modfrac
677 tau_x470 = tau_x470_1
678 tau_x470_flag = tau_x470_flag1
680 if(tau_x470_1.ge.cth0.and.tau_x470_1.lt.cth1)
then
681 f_1=(tau_x470_1-cth0)/(cth1-cth0)
682 tau_x470=(1.0-f_1)*tau_x470_1+f_1*tau_x470_2
683 tau_x470_flag=tau_x470_flag2
686 if(tau_x470_1.ge.cth1.and.tau_x470_1.lt.cth2)
then
687 f_1=(tau_x470_2-cth1)/(cth2-cth1)
688 tau_x470=(1.0-f_1)*tau_x470_2+f_1*tau_x470_3
689 tau_x470_flag=tau_x470_flag3
692 if(tau_x470_1.ge.cth2)
then
694 tau_x470_flag=tau_x470_flag3
698 if (do_sv.and.r470sv.gt.0.0.and.r470sv.lt.24.0)
then
699 if (r470sv.lt.1.0) r470sv = 1.0
700 call aero_470(dflag,refl,x1,x2,x3,mm,nn,ll,ma,
701 1 imodarr(1),r470sv,tau_x470sv_1,tau_x470sv_flag1,trflg,modfrac
702 call aero_470(dflag,refl,x1,x2,x3,mm,nn,ll,ma,
703 1 imodarr(2),r470sv,tau_x470sv_2,tau_x470sv_flag2,trflg,modfrac
704 call aero_470(dflag,refl,x1,x2,x3,mm,nn,ll,ma,
705 1 imodarr(3),r470sv,tau_x470sv_3,tau_x470sv_flag3,trflg,modfrac
707 tau_x470sv = tau_x470sv_1
708 tau_x470sv_flag = tau_x470sv_flag1
710 if(tau_x470sv_1.ge.cth0.and.tau_x470sv_1.lt.cth1)
then
711 f_1=(tau_x470sv_1-cth0)/(cth1-cth0)
712 tau_x470sv=(1.0-f_1)*tau_x470sv_1+f_1*tau_x470sv_2
713 tau_x470sv_flag=tau_x470sv_flag2
716 if(tau_x470sv_1.ge.cth1.and.tau_x470sv_1.lt.cth2)
then
717 f_1=(tau_x470sv_2-cth1)/(cth2-cth1)
718 tau_x470sv=(1.0-f_1)*tau_x470sv_2+f_1*tau_x470sv_3
719 tau_x470sv_flag=tau_x470sv_flag3
722 if(tau_x470sv_1.ge.cth2)
then
723 tau_x470sv=tau_x470sv_3
724 tau_x470sv_flag=tau_x470sv_flag3
768 if(tau_x470.gt.5.or.tau_x470.lt.0)
then
806 call aero_650(dflag,refl,x1,x2,x3,mm,nn,ll,ma,
807 1 r650,tau_x650,tau_x650_flag,0,0.0,0.0,0,trflg)
817 if(tau_x650.gt.5.or.tau_x650.lt.0)
then
825 if (ioprg .eq. 1 .and. lcvr .eq. 12)
then
826 if (xeas_b1.gt.17.or.xeas_b3.gt.17)
then
834 if (ioprg .eq. 6)
then
835 if (season .
eq .3)
then
836 tau_x470 = tau_x470 * 1.25
837 tau_x650 = tau_x650 * 1.25
846 if (ioprg .eq. 7)
then
870 alpha=alog10(tau_x470/tau_x650)/alog10(672./488.)
878 if (tau_x470.lt.1.0)
then
879 if(alpha.ge.-0.5.and.alpha.le.3.5)
then
880 tau550=tau_x470*(488.0/500.0)**alpha
883 if((tau_x470_flag.eq.1.or.tau_x470_flag.eq.-10).and.
884 1 (tau_x650_flag.eq.1.or.tau_x650_flag.eq.-10))
then
886 tau550=(tau_x470+tau_x650)/2.0
887 tau_x470=tau550*(500./488.)**alpha
888 tau_x650=tau550*(500./672.)**alpha
889 elseif((tau_x470_flag.eq.1.or.tau_x470_flag.eq.-10).and.
890 1 tau_x650_flag.eq.0)
then
892 tau550=tau_x650*(672./500.)**alpha
893 tau_x470=tau_x650*(672./488.)**alpha
894 elseif(tau_x470_flag.eq.0.and.
895 1 (tau_x650_flag.eq.1.or.tau_x650_flag.eq.-10))
then
897 tau550=tau_x470*(488./500.)**alpha
898 tau_x650=tau_x470*(488./672.)**alpha
901 tau550=(tau_x470+tau_x650)/2.0
902 tau_x470=tau550*(500./488.)**alpha
903 tau_x650=tau550*(500./672.)**alpha
907 if(alpha.ge.-0.5.and.alpha.le.3.5.and.
908 1 tau_x470_flag.eq.0.and.tau_x650_flag.eq.0)
then
909 tau550=tau_x470*(488.0/500.0)**alpha
912 if((tau_x470_flag.eq.1.or.tau_x470_flag.eq.-10).and.
913 1 (tau_x650_flag.eq.1.or.tau_x650_flag.eq.-10))
then
915 tau550=(tau_x470+tau_x650)/2.0
916 tau_x470=tau550*(500./488.)**alpha
917 tau_x650=tau550*(500./672.)**alpha
918 elseif(tau_x470_flag.eq.-10.and.tau_x650_flag.eq.0)
then
920 tau550=tau_x650*(672./500.)**alpha
921 tau_x470=tau_x650*(672./488.)**alpha
922 elseif((tau_x470_flag.eq.1.or.tau_x470_flag.eq.0).and.
923 1 tau_x650_flag.eq.0)
then
926 tau_x470=tau550*(500./488.)**alpha
927 tau_x650=tau550*(500./672.)**alpha
928 elseif(tau_x470_flag.eq.0.and.
929 1 (tau_x650_flag.eq.1.or.tau_x650_flag.eq.-10))
then
931 tau550=tau_x470*(488./500.)**alpha
932 tau_x650=tau_x470*(488./672.)**alpha
935 tau550=(tau_x470+tau_x650)/2.0
936 tau_x470=tau550*(500./488.)**alpha
937 tau_x650=tau550*(500./672.)**alpha
943 tau550=tau_x470sv*(488./500.)**alpha
944 tau_x470 = tau_x470sv
945 tau_x470_flag = tau_x470sv_flag
967 outbufvg(i) = xtau(i)
968 outbufvg(i+3) = ssa(i)
972 outbufvg(9) = 1.0*tau_x470_flag
973 outbufvg(10) = 1.0*tau_x650_flag
977 outbufvg(14) = scat_ang
978 outbufvg(15) = sfc_typ
982 outbufvg(18) = sirndvi
983 outbufvg(19) = rc_ndvi
984 outbufvg(20) = xreg_id
1020 if(season.eq.2)
then
1022 if((lcvr.gt.0.and.lcvr.le.12).or.lcvr.eq.14)
then
1023 xeas_b1 = 0.283 + 0.509*sb7 + 0.0038*sb7**2.0
1025 xeas_b3 = 0.810 + 0.535*sb1
1026 elseif(lcvr.eq.13)
then
1034 elseif(season.eq.3)
then
1036 if((lcvr.gt.0.and.lcvr.le.12).or.lcvr.eq.14)
then
1037 xeas_b1 = 0.295 + 0.405*sb7 + 0.0095*sb7**2.0
1039 xeas_b3 = 0.605 + 0.507*sb1
1040 elseif(lcvr.eq.13)
then
1048 elseif(season.eq.4)
then
1050 if((lcvr.gt.0.and.lcvr.le.12).or.lcvr.eq.14)
then
1051 xeas_b1 = 0.298 + 0.430*sb7 + 0.0084*sb7**2.0
1053 xeas_b3 = 0.494 + 0.524*sb1
1054 elseif(lcvr.eq.13)
then
1062 elseif(season.eq.1)
then
1064 if((lcvr.gt.0.and.lcvr.le.12).or.lcvr.eq.14)
then
1065 xeas_b1 = 0.283 + 0.509*sb7 + 0.0038*sb7**2.0
1067 xeas_b3 = 0.810 + 0.535*sb1
1068 elseif(lcvr.eq.13)
then
1109 if(season.eq.2)
then
1111 if((lcvr.gt.0.and.lcvr.le.12).or.lcvr.eq.14)
then
1112 xeas_b1 = -0.542 +0.575*sb7 +0.0022*sb7**2
1114 xeas_b3 = +0.342 +0.598*sb1
1115 elseif(lcvr.eq.13)
then
1116 xeas_b1 = -1.201 +0.785*sb7
1118 xeas_b3 = +0.401 +0.679*sb1
1123 elseif(season.eq.3)
then
1125 if((lcvr.gt.0.and.lcvr.le.12).or.lcvr.eq.14)
then
1126 xeas_b1 = -0.039 +0.401*sb7 +0.0108*sb7**2
1128 xeas_b3 = +0.568 +0.572*sb1
1129 elseif(lcvr.eq.13)
then
1130 xeas_b1 = -2.147 +0.976*sb7
1132 xeas_b3 = +0.713 +0.620*sb1
1137 elseif(season.eq.4)
then
1139 if((lcvr.gt.0.and.lcvr.le.12).or.lcvr.eq.14)
then
1140 xeas_b1 = -0.125 +0.466*sb7 +0.0076*sb7**2
1142 xeas_b3 = +0.438 +0.518*sb1
1143 elseif(lcvr.eq.13)
then
1144 xeas_b1 = -1.428 +0.839*sb7
1146 xeas_b3 = +0.233 +0.648*sb1
1151 elseif(season.eq.1)
then
1153 if((lcvr.gt.0.and.lcvr.le.12).or.lcvr.eq.14)
then
1154 xeas_b1 = -0.542 +0.575*sb7 +0.0022*sb7**2
1156 xeas_b3 = +0.342 +0.598*sb1
1157 elseif(lcvr.eq.13)
then
1158 xeas_b1 = -1.201 +0.785*sb7
1160 xeas_b3 = +0.401 +0.679*sb1
1195 real,
dimension(20) :: coeff0_red
1196 real,
dimension(20) :: coeff1_red
1197 real,
dimension(20) :: coeff0_blue
1198 real,
dimension(20) :: coeff1_blue
1200 rc_ndvi =
max(rc_ndvi, 0.1)
1201 rc_ndvi =
min(rc_ndvi, 1.0)
1204 if(season.eq.1.or.season.eq.2)
then
1206 if(lcvr.gt.0.and.lcvr.ne.7.and.lcvr.ne.13)
then
1207 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1208 1 0.000, 0.000, 0.000, 0.000, 0.000,
1209 1 0.000, 0.000, 0.000, 0.000, 0.000,
1210 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1211 coeff1_red(1:20) = (/ 0.688, 0.688, 0.688, 0.679, 0.632,
1212 1 0.604, 0.592, 0.578, 0.561, 0.538,
1213 1 0.519, 0.508, 0.502, 0.491, 0.468,
1214 1 0.426, 0.382, 0.337, 0.000, 0.000/)
1215 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1216 1 0.000, 0.000, 0.000, 0.000, 0.000,
1217 1 0.000, 0.000, 0.000, 0.000, 0.000,
1218 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1219 coeff1_blue(1:20) =(/ 0.522, 0.522, 0.522, 0.534, 0.530,
1220 1 0.551, 0.567, 0.596, 0.618, 0.633,
1221 1 0.651, 0.676, 0.703, 0.734, 0.771,
1222 1 0.818, 0.885, 0.906, 0.000, 0.000/)
1224 ndvi_idx =
min(floor(rc_ndvi*20)+1, 18)
1226 xeas_b1 = coeff0_red(ndvi_idx) + coeff1_red(ndvi_idx)*sb7
1228 xeas_b3 = coeff0_blue(ndvi_idx) + coeff1_blue(ndvi_idx)*sb1
1248 elseif(lcvr.eq.7)
then
1249 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1250 1 0.000, 0.000, 0.000, 0.000, 0.000,
1251 1 0.000, 0.000, 0.000, 0.000, 0.000,
1252 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1253 coeff1_red(1:20) = (/ 0.735, 0.735, 0.735, 0.724, 0.716,
1254 1 0.709, 0.692, 0.647, 0.601, 0.565,
1255 1 0.555, 0.535, 0.537, 0.513, 0.498,
1256 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1257 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1258 1 0.000, 0.000, 0.000, 0.000, 0.000,
1259 1 0.000, 0.000, 0.000, 0.000, 0.000,
1260 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1261 coeff1_blue(1:20) =(/ 0.527, 0.527, 0.527, 0.508, 0.526,
1262 1 0.540, 0.555, 0.555, 0.606, 0.631,
1263 1 0.744, 0.800, 0.809, 0.810, 0.813,
1264 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1266 ndvi_idx =
min(floor(rc_ndvi*20)+1, 15)
1268 xeas_b1 = coeff0_red(ndvi_idx) + coeff1_red(ndvi_idx)*sb7
1270 xeas_b3 = coeff0_blue(ndvi_idx) + coeff1_blue(ndvi_idx)*sb1
1272 elseif(lcvr.eq.13)
then
1273 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1274 1 0.000, 0.000, 0.000, 0.000, 0.000,
1275 1 0.000, 0.000, 0.000, 0.000, 0.000,
1276 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1277 coeff1_red(1:20) = (/ 0.903, 0.903, 0.903, 0.860, 0.818,
1278 1 0.751, 0.721, 0.677, 0.642, 0.627,
1279 1 0.604, 0.581, 0.561, 0.530, 0.483,
1280 1 0.436, 0.404, 0.000, 0.000, 0.000/)
1281 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1282 1 0.000, 0.000, 0.000, 0.000, 0.000,
1283 1 0.000, 0.000, 0.000, 0.000, 0.000,
1284 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1285 coeff1_blue(1:20) =(/ 0.693, 0.693, 0.693, 0.729, 0.735,
1286 1 0.725, 0.728, 0.725, 0.729, 0.738,
1287 1 0.749, 0.768, 0.793, 0.805, 0.818,
1288 1 0.838, 0.862, 0.000, 0.000, 0.000/)
1290 ndvi_idx =
min(floor(rc_ndvi*20)+1, 17)
1292 xeas_b1 = coeff0_red(ndvi_idx) + coeff1_red(ndvi_idx)*sb7
1294 xeas_b3 = coeff0_blue(ndvi_idx) + coeff1_blue(ndvi_idx)*sb1
1300 elseif(season.eq.3)
then
1302 if(lcvr.gt.0.and.lcvr.ne.7.and.lcvr.ne.13)
then
1303 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1304 1 0.000, 0.000, 0.000, 0.000, 0.000,
1305 1 0.000, 0.000, 0.000, 0.000, 0.000,
1306 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1307 coeff1_red(1:20) = (/ 0.692, 0.692, 0.692, 0.681, 0.684,
1308 1 0.653, 0.626, 0.602, 0.593, 0.580,
1309 1 0.564, 0.540, 0.519, 0.496, 0.471,
1310 1 0.441, 0.395, 0.332, 0.260, 0.000/)
1311 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1312 1 0.000, 0.000, 0.000, 0.000, 0.000,
1313 1 0.000, 0.000, 0.000, 0.000, 0.000,
1314 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1315 coeff1_blue(1:20) =(/ 0.522, 0.522, 0.522, 0.516, 0.490,
1316 1 0.487, 0.499, 0.516, 0.530, 0.541,
1317 1 0.556, 0.583, 0.620, 0.676, 0.767,
1318 1 0.827, 0.899, 0.926, 0.665, 0.000/)
1320 ndvi_idx =
min(floor(rc_ndvi*20)+1, 18)
1322 xeas_b1 = coeff0_red(ndvi_idx) + coeff1_red(ndvi_idx)*sb7
1324 xeas_b3 = coeff0_blue(ndvi_idx) + coeff1_blue(ndvi_idx)*sb1
1326 elseif(lcvr.eq.7)
then
1327 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1328 1 0.000, 0.000, 0.000, 0.000, 0.000,
1329 1 0.000, 0.000, 0.000, 0.000, 0.000,
1330 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1331 coeff1_red(1:20) = (/ 0.735, 0.735, 0.735, 0.724, 0.716,
1332 1 0.709, 0.692, 0.647, 0.601, 0.565,
1333 1 0.555, 0.535, 0.537, 0.513, 0.498,
1334 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1335 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1336 1 0.000, 0.000, 0.000, 0.000, 0.000,
1337 1 0.000, 0.000, 0.000, 0.000, 0.000,
1338 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1339 coeff1_blue(1:20) =(/ 0.527, 0.527, 0.527, 0.508, 0.526,
1340 1 0.540, 0.555, 0.555, 0.606, 0.631,
1341 1 0.744, 0.800, 0.809, 0.810, 0.813,
1342 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1344 ndvi_idx =
min(floor(rc_ndvi*20)+1, 15)
1346 xeas_b1 = coeff0_red(ndvi_idx) + coeff1_red(ndvi_idx)*sb7
1348 xeas_b3 = coeff0_blue(ndvi_idx) + coeff1_blue(ndvi_idx)*sb1
1350 elseif(lcvr.eq.13)
then
1351 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1352 1 0.000, 0.000, 0.000, 0.000, 0.000,
1353 1 0.000, 0.000, 0.000, 0.000, 0.000,
1354 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1355 coeff1_red(1:20) = (/ 0.901, 0.901, 0.901, 0.874, 0.844,
1356 1 0.811, 0.802, 0.778, 0.742, 0.708,
1357 1 0.677, 0.646, 0.615, 0.574, 0.526,
1358 1 0.481, 0.427, 0.362, 0.000, 0.000/)
1359 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1360 1 0.000, 0.000, 0.000, 0.000, 0.000,
1361 1 0.000, 0.000, 0.000, 0.000, 0.000,
1362 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1363 coeff1_blue(1:20) =(/ 0.653, 0.653, 0.653, 0.688, 0.698,
1364 1 0.692, 0.699, 0.700, 0.701, 0.695,
1365 1 0.710, 0.770, 0.819, 0.847, 0.865,
1366 1 0.895, 0.951, 1.045, 0.000, 0.000/)
1368 ndvi_idx =
min(floor(rc_ndvi*20)+1, 18)
1370 xeas_b1 = coeff0_red(ndvi_idx) + coeff1_red(ndvi_idx)*sb7
1372 xeas_b3 = coeff0_blue(ndvi_idx) + coeff1_blue(ndvi_idx)*sb1
1378 elseif(season.eq.4)
then
1380 if(lcvr.gt.0.and.lcvr.ne.7.and.lcvr.ne.13)
then
1381 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1382 1 0.000, 0.000, 0.000, 0.000, 0.000,
1383 1 0.000, 0.000, 0.000, 0.000, 0.000,
1384 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1385 coeff1_red(1:20) = (/ 0.686, 0.686, 0.686, 0.677, 0.610,
1386 1 0.572, 0.564, 0.559, 0.549, 0.534,
1387 1 0.526, 0.517, 0.511, 0.500, 0.475,
1388 1 0.439, 0.397, 0.337, 0.238, 0.000/)
1389 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1390 1 0.000, 0.000, 0.000, 0.000, 0.000,
1391 1 0.000, 0.000, 0.000, 0.000, 0.000,
1392 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1393 coeff1_blue(1:20) =(/ 0.506, 0.506, 0.506, 0.489, 0.485,
1394 1 0.490, 0.497, 0.519, 0.560, 0.587,
1395 1 0.605, 0.634, 0.668, 0.703, 0.736,
1396 1 0.782, 0.843, 0.859, 0.622, 0.000/)
1398 ndvi_idx =
min(floor(rc_ndvi*20)+1, 18)
1400 xeas_b1 = coeff0_red(ndvi_idx) + coeff1_red(ndvi_idx)*sb7
1402 xeas_b3 = coeff0_blue(ndvi_idx) + coeff1_blue(ndvi_idx)*sb1
1404 elseif(lcvr.eq.7)
then
1405 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1406 1 0.000, 0.000, 0.000, 0.000, 0.000,
1407 1 0.000, 0.000, 0.000, 0.000, 0.000,
1408 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1409 coeff1_red(1:20) = (/ 0.735, 0.735, 0.735, 0.724, 0.716,
1410 1 0.709, 0.692, 0.647, 0.601, 0.565,
1411 1 0.555, 0.535, 0.537, 0.513, 0.498,
1412 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1413 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1414 1 0.000, 0.000, 0.000, 0.000, 0.000,
1415 1 0.000, 0.000, 0.000, 0.000, 0.000,
1416 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1417 coeff1_blue(1:20) =(/ 0.527, 0.527, 0.527, 0.508, 0.526,
1418 1 0.540, 0.555, 0.555, 0.606, 0.631,
1419 1 0.744, 0.800, 0.809, 0.810, 0.813,
1420 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1422 ndvi_idx =
min(floor(rc_ndvi*20)+1, 15)
1424 xeas_b1 = coeff0_red(ndvi_idx) + coeff1_red(ndvi_idx)*sb7
1426 xeas_b3 = coeff0_blue(ndvi_idx) + coeff1_blue(ndvi_idx)*sb1
1428 elseif(lcvr.eq.13)
then
1429 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1430 1 0.000, 0.000, 0.000, 0.000, 0.000,
1431 1 0.000, 0.000, 0.000, 0.000, 0.000,
1432 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1433 coeff1_red(1:20) = (/ 0.854, 0.854, 0.854, 0.846, 0.824,
1434 1 0.780, 0.746, 0.699, 0.664, 0.647,
1435 1 0.632, 0.606, 0.576, 0.540, 0.510,
1436 1 0.481, 0.425, 0.000, 0.000, 0.000/)
1437 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1438 1 0.000, 0.000, 0.000, 0.000, 0.000,
1439 1 0.000, 0.000, 0.000, 0.000, 0.000,
1440 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1441 coeff1_blue(1:20) =(/ 0.700, 0.700, 0.700, 0.729, 0.722,
1442 1 0.709, 0.709, 0.711, 0.711, 0.732,
1443 1 0.751, 0.769, 0.789, 0.808, 0.829,
1444 1 0.858, 0.917, 0.000, 0.000, 0.000/)
1446 ndvi_idx =
min(floor(rc_ndvi*20)+1, 17)
1448 xeas_b1 = coeff0_red(ndvi_idx) + coeff1_red(ndvi_idx)*sb7
1450 xeas_b3 = coeff0_blue(ndvi_idx) + coeff1_blue(ndvi_idx)*sb1
1488 real,
dimension(20) :: coeff0_red
1489 real,
dimension(20) :: coeff1_red
1490 real,
dimension(20) :: coeff0_blue
1491 real,
dimension(20) :: coeff1_blue
1493 rc_ndvi =
max(rc_ndvi, 0.1)
1494 rc_ndvi =
min(rc_ndvi, 1.0)
1495 sb2=100.0*refn865_rc
1497 if(season.eq.1.or.season.eq.2)
then
1499 if(lcvr.gt.0.and.lcvr.ne.13)
then
1500 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1501 1 0.000, 0.000, 0.000, 0.000, 0.000,
1502 1 0.000, 0.000, 0.000, 0.000, 0.000,
1503 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1504 coeff1_red(1:20) = (/ 0.770, 0.770, 0.770, 0.681, 0.617,
1505 1 0.548, 0.487, 0.430, 0.378, 0.330,
1506 1 0.286, 0.244, 0.207, 0.171, 0.135,
1507 1 0.102, 0.075, 0.056, 0.000, 0.000/)
1508 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1509 1 0.000, 0.000, 0.000, 0.000, 0.000,
1510 1 0.000, 0.000, 0.000, 0.000, 0.000,
1511 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1512 coeff1_blue(1:20) =(/ 0.406, 0.406, 0.406, 0.379, 0.344,
1513 1 0.308, 0.277, 0.251, 0.226, 0.204,
1514 1 0.183, 0.163, 0.144, 0.124, 0.102,
1515 1 0.081, 0.064, 0.050, 0.000, 0.000/)
1517 ndvi_idx =
min(floor((rc_ndvi-0.025)*20+1), 18)
1518 coeff0_red_fin = coeff0_red(ndvi_idx)
1519 1 +(coeff0_red(ndvi_idx+1)-coeff0_red(ndvi_idx))/0.05
1520 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1521 coeff1_red_fin = coeff1_red(ndvi_idx)
1522 1 +(coeff1_red(ndvi_idx+1)-coeff1_red(ndvi_idx))/0.05
1523 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1524 coeff0_blue_fin = coeff0_blue(ndvi_idx)
1525 1 +(coeff0_blue(ndvi_idx+1)-coeff0_blue(ndvi_idx))/0.05
1526 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1527 coeff1_blue_fin = coeff1_blue(ndvi_idx)
1528 1 +(coeff1_blue(ndvi_idx+1)-coeff1_blue(ndvi_idx))/0.05
1529 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1531 xeas_b1 = coeff0_red_fin + coeff1_red_fin*sb2
1532 xeas_b3 = coeff0_blue_fin + coeff1_blue_fin*sb2
1533 elseif(lcvr.eq.13)
then
1534 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1535 1 0.000, 0.000, 0.000, 0.000, 0.000,
1536 1 0.000, 0.000, 0.000, 0.000, 0.000,
1537 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1538 coeff1_red(1:20) = (/ 0.739, 0.739, 0.739, 0.673, 0.604,
1539 1 0.537, 0.478, 0.422, 0.372, 0.326,
1540 1 0.282, 0.236, 0.197, 0.162, 0.129,
1541 1 0.094, 0.000, 0.000, 0.000, 0.000/)
1542 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1543 1 0.000, 0.000, 0.000, 0.000, 0.000,
1544 1 0.000, 0.000, 0.000, 0.000, 0.000,
1545 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1546 coeff1_blue(1:20) =(/ 0.516, 0.516, 0.516, 0.482, 0.438,
1547 1 0.386, 0.344, 0.304, 0.269, 0.240,
1548 1 0.212, 0.184, 0.157, 0.130, 0.103,
1549 1 0.080, 0.000, 0.000, 0.000, 0.000/)
1551 ndvi_idx =
min(floor((rc_ndvi-0.025)*20+1), 16)
1552 coeff0_red_fin = coeff0_red(ndvi_idx)
1553 1 +(coeff0_red(ndvi_idx+1)-coeff0_red(ndvi_idx))/0.05
1554 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1555 coeff1_red_fin = coeff1_red(ndvi_idx)
1556 1 +(coeff1_red(ndvi_idx+1)-coeff1_red(ndvi_idx))/0.05
1557 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1558 coeff0_blue_fin = coeff0_blue(ndvi_idx)
1559 1 +(coeff0_blue(ndvi_idx+1)-coeff0_blue(ndvi_idx))/0.05
1560 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1561 coeff1_blue_fin = coeff1_blue(ndvi_idx)
1562 1 +(coeff1_blue(ndvi_idx+1)-coeff1_blue(ndvi_idx))/0.05
1563 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1565 xeas_b1 = coeff0_red_fin + coeff1_red_fin*sb2
1566 xeas_b3 = coeff0_blue_fin + coeff1_blue_fin*sb2
1571 elseif(season.eq.3)
then
1573 if(lcvr.gt.0.and.lcvr.ne.13)
then
1574 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1575 1 0.000, 0.000, 0.000, 0.000, 0.000,
1576 1 0.000, 0.000, 0.000, 0.000, 0.000,
1577 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1578 coeff1_red(1:20) = (/ 0.764, 0.764, 0.764, 0.703, 0.619,
1579 1 0.552, 0.489, 0.431, 0.380, 0.331,
1580 1 0.288, 0.247, 0.207, 0.171, 0.137,
1581 1 0.107, 0.080, 0.058, 0.041, 0.000/)
1582 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1583 1 0.000, 0.000, 0.000, 0.000, 0.000,
1584 1 0.000, 0.000, 0.000, 0.000, 0.000,
1585 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1586 coeff1_blue(1:20) =(/ 0.398, 0.398, 0.398, 0.358, 0.300,
1587 1 0.269, 0.245, 0.223, 0.202, 0.180,
1588 1 0.161, 0.144, 0.128, 0.113, 0.099,
1589 1 0.084, 0.069, 0.052, 0.037, 0.000/)
1591 ndvi_idx =
min(floor((rc_ndvi-0.025)*20+1), 19)
1592 coeff0_red_fin = coeff0_red(ndvi_idx)
1593 1 +(coeff0_red(ndvi_idx+1)-coeff0_red(ndvi_idx))/0.05
1594 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1595 coeff1_red_fin = coeff1_red(ndvi_idx)
1596 1 +(coeff1_red(ndvi_idx+1)-coeff1_red(ndvi_idx))/0.05
1597 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1598 coeff0_blue_fin = coeff0_blue(ndvi_idx)
1599 1 +(coeff0_blue(ndvi_idx+1)-coeff0_blue(ndvi_idx))/0.05
1600 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1601 coeff1_blue_fin = coeff1_blue(ndvi_idx)
1602 1 +(coeff1_blue(ndvi_idx+1)-coeff1_blue(ndvi_idx))/0.05
1603 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1605 xeas_b1 = coeff0_red_fin + coeff1_red_fin*sb2
1606 xeas_b3 = coeff0_blue_fin + coeff1_blue_fin*sb2
1607 elseif(lcvr.eq.13)
then
1608 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1609 1 0.000, 0.000, 0.000, 0.000, 0.000,
1610 1 0.000, 0.000, 0.000, 0.000, 0.000,
1611 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1612 coeff1_red(1:20) = (/ 0.745, 0.745, 0.745, 0.681, 0.610,
1613 1 0.546, 0.485, 0.429, 0.373, 0.325,
1614 1 0.281, 0.241, 0.204, 0.170, 0.139,
1615 1 0.111, 0.087, 0.000, 0.000, 0.000/)
1616 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1617 1 0.000, 0.000, 0.000, 0.000, 0.000,
1618 1 0.000, 0.000, 0.000, 0.000, 0.000,
1619 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1620 coeff1_blue(1:20) =(/ 0.492, 0.492, 0.492, 0.471, 0.422,
1621 1 0.376, 0.338, 0.300, 0.260, 0.226,
1622 1 0.197, 0.183, 0.169, 0.144, 0.121,
1623 1 0.100, 0.083, 0.000, 0.000, 0.000/)
1625 ndvi_idx =
min(floor((rc_ndvi-0.025)*20+1), 17)
1626 coeff0_red_fin = coeff0_red(ndvi_idx)
1627 1 +(coeff0_red(ndvi_idx+1)-coeff0_red(ndvi_idx))/0.05
1628 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1629 coeff1_red_fin = coeff1_red(ndvi_idx)
1630 1 +(coeff1_red(ndvi_idx+1)-coeff1_red(ndvi_idx))/0.05
1631 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1632 coeff0_blue_fin = coeff0_blue(ndvi_idx)
1633 1 +(coeff0_blue(ndvi_idx+1)-coeff0_blue(ndvi_idx))/0.05
1634 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1635 coeff1_blue_fin = coeff1_blue(ndvi_idx)
1636 1 +(coeff1_blue(ndvi_idx+1)-coeff1_blue(ndvi_idx))/0.05
1637 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1639 xeas_b1 = coeff0_red_fin + coeff1_red_fin*sb2
1640 xeas_b3 = coeff0_blue_fin + coeff1_blue_fin*sb2
1645 elseif(season.eq.4)
then
1647 if(lcvr.gt.0.and.lcvr.ne.13)
then
1648 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1649 1 0.000, 0.000, 0.000, 0.000, 0.000,
1650 1 0.000, 0.000, 0.000, 0.000, 0.000,
1651 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1652 coeff1_red(1:20) = (/ 0.762, 0.762, 0.762, 0.691, 0.617,
1653 1 0.549, 0.488, 0.432, 0.380, 0.332,
1654 1 0.288, 0.248, 0.210, 0.175, 0.141,
1655 1 0.110, 0.083, 0.063, 0.043, 0.000/)
1656 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1657 1 0.000, 0.000, 0.000, 0.000, 0.000,
1658 1 0.000, 0.000, 0.000, 0.000, 0.000,
1659 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1660 coeff1_blue(1:20) =(/ 0.395, 0.395, 0.395, 0.342, 0.309,
1661 1 0.276, 0.247, 0.223, 0.204, 0.185,
1662 1 0.166, 0.150, 0.136, 0.119, 0.101,
1663 1 0.085, 0.070, 0.054, 0.028, 0.000/)
1665 ndvi_idx =
min(floor((rc_ndvi-0.025)*20+1), 19)
1666 coeff0_red_fin = coeff0_red(ndvi_idx)
1667 1 +(coeff0_red(ndvi_idx+1)-coeff0_red(ndvi_idx))/0.05
1668 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1669 coeff1_red_fin = coeff1_red(ndvi_idx)
1670 1 +(coeff1_red(ndvi_idx+1)-coeff1_red(ndvi_idx))/0.05
1671 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1672 coeff0_blue_fin = coeff0_blue(ndvi_idx)
1673 1 +(coeff0_blue(ndvi_idx+1)-coeff0_blue(ndvi_idx))/0.05
1674 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1675 coeff1_blue_fin = coeff1_blue(ndvi_idx)
1676 1 +(coeff1_blue(ndvi_idx+1)-coeff1_blue(ndvi_idx))/0.05
1677 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1679 xeas_b1 = coeff0_red_fin + coeff1_red_fin*sb2
1680 xeas_b3 = coeff0_blue_fin + coeff1_blue_fin*sb2
1681 elseif(lcvr.eq.13)
then
1682 coeff0_red(1:20) = (/ 0.000, 0.000, 0.000, 0.000, 0.000,
1683 1 0.000, 0.000, 0.000, 0.000, 0.000,
1684 1 0.000, 0.000, 0.000, 0.000, 0.000,
1685 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1686 coeff1_red(1:20) = (/ 0.735, 0.735, 0.735, 0.672, 0.601,
1687 1 0.532, 0.473, 0.419, 0.369, 0.324,
1688 1 0.283, 0.243, 0.204, 0.169, 0.141,
1689 1 0.119, 0.093, 0.000, 0.000, 0.000/)
1690 coeff0_blue(1:20) =(/ 0.000, 0.000, 0.000, 0.000, 0.000,
1691 1 0.000, 0.000, 0.000, 0.000, 0.000,
1692 1 0.000, 0.000, 0.000, 0.000, 0.000,
1693 1 0.000, 0.000, 0.000, 0.000, 0.000/)
1694 coeff1_blue(1:20) =(/ 0.492, 0.492, 0.492, 0.482, 0.429,
1695 1 0.371, 0.330, 0.293, 0.258, 0.232,
1696 1 0.209, 0.185, 0.159, 0.136, 0.119,
1697 1 0.103, 0.083, 0.000, 0.000, 0.000/)
1699 ndvi_idx =
min(floor((rc_ndvi-0.025)*20+1), 17)
1700 coeff0_red_fin = coeff0_red(ndvi_idx)
1701 1 +(coeff0_red(ndvi_idx+1)-coeff0_red(ndvi_idx))/0.05
1702 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1703 coeff1_red_fin = coeff1_red(ndvi_idx)
1704 1 +(coeff1_red(ndvi_idx+1)-coeff1_red(ndvi_idx))/0.05
1705 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1706 coeff0_blue_fin = coeff0_blue(ndvi_idx)
1707 1 +(coeff0_blue(ndvi_idx+1)-coeff0_blue(ndvi_idx))/0.05
1708 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1709 coeff1_blue_fin = coeff1_blue(ndvi_idx)
1710 1 +(coeff1_blue(ndvi_idx+1)-coeff1_blue(ndvi_idx))/0.05
1711 1 *(rc_ndvi-(ndvi_idx*0.05-0.025))
1713 xeas_b1 = coeff0_red_fin + coeff1_red_fin*sb2
1714 xeas_b3 = coeff0_blue_fin + coeff1_blue_fin*sb2
1731 1 imod,r470,tau_x470,tau_x470_flag)
1735 include
'aottbl.inc'
1736 include
'newaottbl.inc'
1742 real nnvalx(4,4,2,10), yy(10), yy2(8)
1744 integer tau_x470_flag, imod
1750 if (index_ii.lt.0)
return
1752 frac = (r470-sfc_ref470(index_ii))/
1753 1 (sfc_ref470(index_ii+1)-sfc_ref470(index_ii))
1755 if (index_ii.lt.1.or.index_ii.gt.24)
1756 1 print *,
'index_iir470 = ', index_ii,xlat,xlong
1757 if (frac.lt.0.0.or.frac.gt.1.0)
1758 1 print *,
'frac on sfc470=', frac
1759 if (index_ii.lt.1.or.index_ii.gt.24)
then
1766 call search(dflag2,x3,phi,ll,ii)
1767 xfrac = (x3-phi(ii))/(phi(ii+1)-phi(ii))
1773 if (dift.gt.0. .and. dift.lt.dif)
then
1781 else if (mbeg.gt.mm-4)
then
1789 if (dift.gt.0. .and. dift.lt.dif)
then
1797 else if (nbeg.gt.nn-4)
then
1805 nnvalx(i,j,1,ia) = nvalx470(mbeg+i,nbeg+j,ii,ia,imod,index_ii)*
1806 1 (1.-frac) + nvalx470(mbeg+i,nbeg+j,ii,ia,imod,index_ii+1)*frac
1807 nnvalx(i,j,2,ia) = nvalx470(mbeg+i,nbeg+j,ii+1,ia,imod,index_ii)*
1808 1 (1.-frac) + nvalx470(mbeg+i,nbeg+j,ii+1,ia,imod,index_ii+1)*frac
1817 call new_intep(theta0, theta, phi, nnvalx, mm, nn, ll, ia,
1818 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
1823 if (refl.le.yy(1))
then
1829 if (refl.ge.yy(10))
then
1840 if (yy(1).lt.yy(2))
go to 650
1842 if (refl.lt.yy(4))
return
1848 if (yy2(2).lt.yy2(1))
return
1849 call search2(dflag2,refl,yy2,7,index_ii,frac)
1852 tau_x = frac*tau(index_ii+1+3) + (1.-frac)*tau(index_ii+3)
1860 call search2(dflag2,refl,yy,10,index_ii,frac)
1862 tau_x = frac*tau(index_ii+1) + (1.-frac)*tau(index_ii)
1879 1 r650,tau_x650,tau_x650_flag,
1880 2 tau_x470_flag,tau_x470)
1884 include
'aottbl.inc'
1885 include
'newaottbl.inc'
1892 real nnvalx(4,4,2,10), yy(10), yy2(8), yy3(3), yy5(6)
1893 real tau_x650, tau_x412, tau_x470
1894 real refl,x1,x2,x3,r650
1896 integer tau_x470_flag, tau_x650_flag, tau_x412_flag_91
1901 index_ii = (r650+1.)/2.
1903 frac = (r650-sfc_ref650(index_ii))/
1904 1 (sfc_ref650(index_ii+1)-sfc_ref650(index_ii))
1915 if(index_ii.lt.1.or.index_ii.gt.23)
then
1922 if (index_ii.lt.1)
then
1927 call search(dflag2,x3,phi,ll,ii)
1928 xfrac = (x3-phi(ii))/(phi(ii+1)-phi(ii))
1934 if (dift.gt.0. .and. dift.lt.dif)
then
1942 else if (mbeg.gt.mm-4)
then
1950 if (dift.gt.0. .and. dift.lt.dif)
then
1958 else if (nbeg.gt.nn-4)
then
1966 nnvalx(i,j,1,ia) = nvalx650(mbeg+i,nbeg+j,ii,ia,index_ii)*
1967 1 (1.-frac) + nvalx650(mbeg+i,nbeg+j,ii,ia,index_ii+1)*frac
1968 nnvalx(i,j,2,ia) = nvalx650(mbeg+i,nbeg+j,ii+1,ia,index_ii)*
1969 1 (1.-frac) + nvalx650(mbeg+i,nbeg+j,ii+1,ia,index_ii+1)*frac
1978 call new_intep(theta0, theta, phi, nnvalx, mm, nn, ll, ia,
1979 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
1986 if (refl.le.yy(1).and.yy(1).lt.yy(2))
then
1992 if (refl.ge.yy(10))
then
2005 if (yy(1).lt.yy(2))
go to 650
2019 if (refl.lt.yy(4))
return
2025 if (yy2(2).lt.yy2(1))
return
2026 call search2(dflag2,refl,yy2,7,index_ii,frac)
2029 tau_x = frac*tau(index_ii+1+3) + (1.-frac)*tau(index_ii+3)
2034 if (refl.lt.yy(8))
return
2040 if (yy3(2).lt.yy3(1))
return
2041 call search2(dflag2,refl,yy3,3,index_ii,frac)
2044 tau_x = frac*tau(index_ii+1+7) + (1.-frac)*tau(index_ii+7)
2049 if (refl.lt.yy(5))
return
2055 if (yy5(2).lt.yy5(1))
return
2056 call search2(dflag2,refl,yy5,6,index_ii,frac)
2059 tau_x = frac*tau(index_ii+1+4) + (1.-frac)*tau(index_ii+4)
2067 call search2(dflag2,refl,yy,10,index_ii,frac)
2069 tau_x = frac*tau(index_ii+1) + (1.-frac)*tau(index_ii)
2103 real outbuf(20), outbufvg(20), tmpvg(6)
2104 real outbuftmp(20), xfrdb
2105 real c_ndsir1,c_ndvi1,c_rf21_1,c_rf21_2,c_rf21_3
2119 outbuftmp(i)=outbuf(i)
2183 outbuf(i)=outbuftmp(i)
2195 subroutine calc_sfc21(sza,xthet,xphi,refl21,aot21,As_21)
2217 include
'aottbl.inc'
2218 include
'sfc21tbl.inc'
2222 real nnvalx(4,4,2), rr0x(4,4,2)
2223 real ttx(4,4,2), ssx(4,4,2)
2227 data tau2 /0.0, 0.1, 0.3, 0.5/
2257 if (dift.gt.0. .and. dift.lt.dif)
then
2265 else if (mbeg.gt.mm-4)
then
2273 if (dift.gt.0. .and. dift.lt.dif)
then
2281 else if (nbeg.gt.nn-4)
then
2286 call search(dflag3,aot2,tau2,ma2,index_ii)
2287 frac = (aot2-tau2(index_ii))
2288 1 /(tau2(index_ii+1)-tau2(index_ii))
2289 if(frac.lt.0.or.frac.gt.1)
2290 1 print *,
'aot2, frac, index_ii=',aot2, frac, index_ii
2292 call search(dflag3,x3,phi,ll,ii)
2293 xfrac = (x3-phi(ii))/(phi(ii+1)-phi(ii))
2299 nnvalx(i,j,1) = nvalx21(mbeg+i,nbeg+j,ii,index_ii)*
2300 1 (1.-frac) + nvalx21(mbeg+i,nbeg+j,ii,index_ii+1)*frac
2301 nnvalx(i,j,2) = nvalx21(mbeg+i,nbeg+j,ii+1,index_ii)*
2302 1 (1.-frac) + nvalx21(mbeg+i,nbeg+j,ii+1,index_ii+1)*frac
2304 rr0x(i,j,1) = r0x_21(mbeg+i,nbeg+j,ii,index_ii)*
2305 1 (1.-frac) + r0x_21(mbeg+i,nbeg+j,ii,index_ii+1)*frac
2306 rr0x(i,j,2) = r0x_21(mbeg+i,nbeg+j,ii+1,index_ii)*
2307 1 (1.-frac) + r0x_21(mbeg+i,nbeg+j,ii+1,index_ii+1)*frac
2309 ttx(i,j,1) = tx_21(mbeg+i,nbeg+j,ii,index_ii)*
2310 1 (1.-frac) + tx_21(mbeg+i,nbeg+j,ii,index_ii+1)*frac
2311 ttx(i,j,2) = tx_21(mbeg+i,nbeg+j,ii+1,index_ii)*
2312 1 (1.-frac) + tx_21(mbeg+i,nbeg+j,ii+1,index_ii+1)*frac
2314 ssx(i,j,1) = sx_21(mbeg+i,nbeg+j,ii,index_ii)*
2315 1 (1.-frac) + sx_21(mbeg+i,nbeg+j,ii,index_ii+1)*frac
2316 ssx(i,j,2) = sx_21(mbeg+i,nbeg+j,ii+1,index_ii)*
2317 1 (1.-frac) + sx_21(mbeg+i,nbeg+j,ii+1,index_ii+1)*frac
2326 call new_intepsf(theta0, theta, phi, nnvalx, mm, nn, ll,
2327 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2331 call new_intepsf(theta0, theta, phi, rr0x, mm, nn, ll,
2332 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2336 call new_intepsf(theta0, theta, phi, ttx, mm, nn, ll,
2337 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2341 call new_intepsf(theta0, theta, phi, ssx, mm, nn, ll,
2342 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2348 as_21 = 100.* dff / (
tt + ss*dff)
2382 include
'aottbl.inc'
2383 include
'sfc21tbl.inc'
2387 real nnvalx(4,4,2), rr0x(4,4,2)
2388 real ttx(4,4,2), ssx(4,4,2)
2408 if (dift.gt.0. .and. dift.lt.dif)
then
2416 else if (mbeg.gt.mm-4)
then
2424 if (dift.gt.0. .and. dift.lt.dif)
then
2432 else if (nbeg.gt.nn-4)
then
2436 call search(dflag3,x3,phi,ll,ii)
2437 xfrac = (x3-phi(ii))/(phi(ii+1)-phi(ii))
2441 nnvalx(i,j,1) = nvalx672(mbeg+i,nbeg+j,ii,1)
2442 nnvalx(i,j,2) = nvalx672(mbeg+i,nbeg+j,ii+1,1)
2444 rr0x(i,j,1) = r0x_672(mbeg+i,nbeg+j,ii,1)
2445 rr0x(i,j,2) = r0x_672(mbeg+i,nbeg+j,ii+1,1)
2447 ttx(i,j,1) = tx_672(mbeg+i,nbeg+j,ii,1)
2448 ttx(i,j,2) = tx_672(mbeg+i,nbeg+j,ii+1,1)
2450 ssx(i,j,1) = sx_672(mbeg+i,nbeg+j,ii,1)
2451 ssx(i,j,2) = sx_672(mbeg+i,nbeg+j,ii+1,1)
2456 call new_intepsf(theta0, theta, phi, nnvalx, mm, nn, ll,
2457 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2461 call new_intepsf(theta0, theta, phi, rr0x, mm, nn, ll,
2462 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2466 call new_intepsf(theta0, theta, phi, ttx, mm, nn, ll,
2467 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2471 call new_intepsf(theta0, theta, phi, ssx, mm, nn, ll,
2472 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2477 ref_rc = dff / (
tt + ss*dff)
2507 include
'aottbl.inc'
2508 include
'sfc21tbl.inc'
2512 real nnvalx(4,4,2), rr0x(4,4,2)
2513 real ttx(4,4,2), ssx(4,4,2)
2533 if (dift.gt.0. .and. dift.lt.dif)
then
2541 else if (mbeg.gt.mm-4)
then
2549 if (dift.gt.0. .and. dift.lt.dif)
then
2557 else if (nbeg.gt.nn-4)
then
2561 call search(dflag3,x3,phi,ll,ii)
2562 xfrac = (x3-phi(ii))/(phi(ii+1)-phi(ii))
2566 nnvalx(i,j,1) = nvalx865(mbeg+i,nbeg+j,ii,1)
2567 nnvalx(i,j,2) = nvalx865(mbeg+i,nbeg+j,ii+1,1)
2569 rr0x(i,j,1) = r0x_865(mbeg+i,nbeg+j,ii,1)
2570 rr0x(i,j,2) = r0x_865(mbeg+i,nbeg+j,ii+1,1)
2572 ttx(i,j,1) = tx_865(mbeg+i,nbeg+j,ii,1)
2573 ttx(i,j,2) = tx_865(mbeg+i,nbeg+j,ii+1,1)
2575 ssx(i,j,1) = sx_865(mbeg+i,nbeg+j,ii,1)
2576 ssx(i,j,2) = sx_865(mbeg+i,nbeg+j,ii+1,1)
2581 call new_intepsf(theta0, theta, phi, nnvalx, mm, nn, ll,
2582 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2586 call new_intepsf(theta0, theta, phi, rr0x, mm, nn, ll,
2587 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2591 call new_intepsf(theta0, theta, phi, ttx, mm, nn, ll,
2592 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2596 call new_intepsf(theta0, theta, phi, ssx, mm, nn, ll,
2597 1 x1,x2,x3,y,dy,mbeg,nbeg,xfrac)
2602 ref_rc = dff / (
tt + ss*dff)
2611 subroutine new_intepsf(x1a,x2a,x3a,ya,m,n,l,x1,x2,x3,y,dy,
2617 dimension x1a(m),x2a(n),x3a(l),ya(4,4,2)
2618 dimension xx2a(4), xx1a(4)
2619 dimension yntmp(4),ymtmp(4),yltmp(2)
2625 yntmp(k) = yltmp(1)*(1.-frac) + yltmp(2)*frac
2626 xx2a(k) = x2a(k+nbeg)
2628 call polint(xx2a,yntmp,4,x2,ymtmp(j),dy)
2629 xx1a(j) = x1a(j+mbeg)
2631 call polint(xx1a,ymtmp,4,x1,y,dy)