OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
afrt_rt2_input.f
Go to the documentation of this file.
1  subroutine af_rt2_input(infile,iref,itrans,iset,irh1,irh2,
2  1 ilm1,ilm2,isd1,isd2,itau1,itau2,ithe01,ithe02,iwnd1,iwnd2,
3  2 nx,nthe0,nwl,nrh,iww,krhum,iprin,ipol,npass1,npass2,
4  3 icrft,iactflx,isurf,iglint,iocn,ifoam,iwatr,iconc,dtheta,dphi,
5  4 hcrft,rx,the0in,wwl,albwat)
6 c
7 c the subroutine reads upper and lower indices for wavelength,
8 c size distribution and optical thickness. also, flags for
9 c wind speed, foam, water leaving radiances and chlorophyll conc.
10 c*******************************************************************
11 c.....include the common and declaration statements.....................
12  implicit real*8 (a-h,o-z)
13 c
14 c include 'toa_rt2.cmn'
15 c***********************************************************************
16 c
17  integer*4 iww(10),krhum(10)
18  integer*4 iref,iprin,ipol,npass1,npass2,ilm1,ilm2,iwl_rad,
19  1 itau1,itau2,ithe01,ithe02,iwind,ifoam,iwatr,iconc,
20  2 nx,nthe0,isza,ksza,icrft,iactflx,isurf,iglint,iocn,
21  3 iwnd1,iwnd2,itrans,nwl,nrh,iset,irh1,irh2
22  real*8 dtheta,dphi,hcrft
23  real*8 rx(26),the0in(25),wwl(200),albwat(20)
24  character*80 temp
25  character*255 infile
26 c
27 c
28  len0=index(infile,' ')-1
29 c
30  open(29,file=infile(1:len0),status='old')
31 c
32 c set default values for some of the input parameters
33  iprin=0
34  ipol=1
35  npass1=19
36  npass2=20
37  icrft=0
38  iactflx=0
39  isurf=0
40  iglint=0 !apply gint correction
41  iocn=1
42  ifoam=1
43  iwatr=0
44  iconc=0
45  dphi=12.0 !this value should be same as in module 'ocn'
46  hcrft=11.0 !hcrft is ignored when icrft=0
47 c
48  if(iref.eq.0)isurf=0
49  do i=1,20
50  albwat(i)=0.0
51  enddo
52 c
53  nrh=1
54  iset=0
55  itrans=0
56 c
57  read(29,130)temp
58  read(29,135)iref,itrans,iset,irh1,irh2,iwl_rad,dtheta
59  read(29,130)temp
60  read(29,140)ilm1,ilm2,isd1,isd2,itau1,itau2,ithe01,ithe02,
61  1 iwnd1,iwnd2
62  read(29,130)temp
63  read(29,140)(iww(i),i=1,8) !8 wind speed. should be same as in module 'ocn'
64  read(29,130)temp
65  read(29,155)nx,(rx(i),i=1,nx) !boundaries of polar angle. should be same as in module 'ocn'
66  read(29,130)temp
67  read(29,160)nthe0,(the0in(i),i=1,nthe0)
68  read(29,130)temp
69  read(29,165)nwl,(wwl(i),i=1,nwl)
70  read(29,130)temp
71  read(29,170)nrh,(krhum(i),i=1,nrh)
72  close (29)
73 c
74 c
75 130 format(a)
76 135 format(6i8,f8.1)
77 140 format(10i8)
78 150 format(3f8.2)
79 155 format(i5,26f5.1)
80 160 format(i5,25f5.1)
81 165 format(i5,200f10.7)
82 170 format(16i5)
83 c
84  return
85  end
86 c**************************************************************************
an array had not been initialized Several spelling and grammar corrections were which is read from the appropriate MCF the above metadata values were hard coded A problem calculating the average background DN for SWIR bands when the moon is in the space view port was corrected The new algorithm used to calculate the average background DN for all reflective bands when the moon is in the space view port is now the same as the algorithm employed by the thermal bands For non SWIR changes in the averages are typically less than Also for non SWIR the black body DNs remain a backup in case the SV DNs are not available For SWIR the changes in computed averages were larger because the old which used the black body suffered from contamination by the micron leak As a consequence of the if SV DNs are not available for the SWIR the EV pixels will not be the granule time is used to identify the appropriate tables within the set given for one LUT the first two or last two tables respectively will be used for the interpolation If there is only one LUT in the set of it will be treated as a constant LUT The manner in which Earth View data is checked for saturation was changed Previously the raw Earth View DNs and Space View DNs were checked against the lookup table values contained in the table dn_sat The change made is to check the raw Earth and Space View DNs to be sure they are less than the maximum saturation value and to check the Space View subtracted Earth View dns against a set of values contained in the new lookup table dn_sat_ev The metadata configuration and ASSOCIATEDINSTRUMENTSHORTNAME from the MOD02HKM product The same metatdata with extensions and were removed from the MOD021KM and MOD02OBC products ASSOCIATEDSENSORSHORTNAME was set to MODIS in all products These changes are reflected in new File Specification which users may consult for exact the pow functions were eliminated in Emissive_Cal and Emissive bands replaced by more efficient code Other calculations throughout the code were also made more efficient Aside from a few round off there was no difference to the product The CPU time decreased by about for a day case and for a night case A minor bug in calculating the uncertainty index for emissive bands was corrected The frame index(0-based) was previously being used the frame number(1-based) should have been used. There were only a few minor changes to the uncertainty index(maximum of 1 digit). 3. Some inefficient arrays(Sigma_RVS_norm_sq) were eliminated and some code lines in Preprocess_L1A_Data were moved into Process_OBCEng_Emiss. There were no changes to the product. Required RAM was reduced by 20 MB. Now
subroutine af_rt2_input(infile, iref, itrans, iset, irh1, irh2, ilm1, ilm2, isd1, isd2, itau1, itau2, ithe01, ithe02, iwnd1, iwnd2, nx, nthe0, nwl, nrh, iww, krhum, iprin, ipol, npass1, npass2, icrft, iactflx, isurf, iglint, iocn, ifoam, iwatr, iconc, dtheta, dphi, hcrft, rx, the0in, wwl, albwat)
Definition: afrt_rt2_input.f:6
#define real
Definition: DbAlgOcean.cpp:26