OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
inusr.f
Go to the documentation of this file.
1  subroutine inusr
2 c
3 c the subroutine reads upper and lower indices for wavelength,
4 c size distribution and optical thickness. also, flags for
5 c wind speed, foam, water leaving radiances and chlorophyll conc.
6 c*******************************************************************
7 c.....include the common and declaration statemnets.....................
8  implicit real*8 (a-h,o-z)
9 c
10  include 'common_all.cmn'
11 c***********************************************************************
12 c
13  character*80 temp
14 c
15  data root /'$RTDATA'/
16  call getenv('RTDATA',root)
17  lenr = index(root,' ')-1
18 c
19 c write(*,*)'welcome to subroutine inusr'
20 c
21  open(2,file='rt2.dir',status='old')
22 c
23  read(2,'(a)')infile
24  read(2,'(a)')dir1
25  read(2,'(a)')dir2
26  read(2,'(a)')dir3
27  read(2,'(a)')dir4
28  read(2,'(a)')dir5
29  close (2)
30 c
31  len0=index(infile,' ')-1
32 c
33  open(29,file=infile(1:len0),status='old')
34 c
35 c set default values for some of the input parameters
36  iprin=0
37  ipol=1
38  npass1=19
39  npass2=20
40  icrft=0
41  iactflx=0
42  isurf=0
43 c iglint=1 !apply gint correction
44  iocn=1
45  ifoam=0
46  iwatr=0
47  iconc=0
48  dphi=12.0 !this value should be same as in module 'ocn'
49  hcrft=11.0 !hcrft is ignored when icrft=0
50 c
51  if(iref.eq.0)isurf=0
52  do i=1,20
53  albwat(i)=0.0
54  enddo
55 c
56  nrh=1
57  iset=0
58  itrans=0
59 c
60  read(29,130)temp
61  read(29,135)iref,itrans,iset,irh1,irh2,dtheta
62  read(29,130)temp
63  read(29,140)ilm1,ilm2,isd1,isd2,itau1,itau2,ithe01,ithe02,
64  1 iwnd1,iwnd2
65  read(29,130)temp
66  read(29,140)(iww(i),i=1,8) !8 wind speed. should be same as in module 'ocn'
67  read(29,130)temp
68  read(29,155)nx,(rx(i),i=1,nx) !boundaries of polar angle. should be same as in module 'ocn'
69  read(29,130)temp
70  read(29,160)nthe0,(the0in(i),i=1,nthe0)
71  read(29,130)temp
72  read(29,165)nwl,(wwl(i),i=1,nwl)
73  read(29,130)temp
74  read(29,170)nrh,(krhum(i),i=1,nrh)
75  close (29)
76 c
77 c
78 130 format(a)
79 135 format(5i8,f8.1)
80 140 format(10i8)
81 150 format(3f8.2)
82 155 format(i5,26f5.1)
83 160 format(i5,25f5.1)
84 165 format(i5,200f10.7)
85 170 format(16i5)
86 c
87  return
88  end
89 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 inusr
Definition: inusr.f:2