OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
main_navassess.f
Go to the documentation of this file.
1 c
2  program nav_assess
3 
4  real*8 dangtl,dmagtl,pangtl,tangtl,tminco
5  real*8 dmagtg,pangtg,tangtg,tmincg
6  integer*4 prod_id(2), irec, ind, gaclac
7  integer sffattr, sfrattr
8  real*4 xlat(1000),xlon(1000)
9  real*4 wlat(1000),wlon(1000)
10  integer*4 nump(1000),nill(1000),nilp(1000)
11  character*80 infile,parmfile
12  character*32 statfile
13  character*1 bytefile(32), isl(3)
14  logical west
15 
16  real*8 pi,radeg,re,rem,f,omf2,omegae
17  common /gconst/pi,radeg,re,rem,f,omf2,omegae
18 
19  integer*4 levdbg(8),ludbug
20  common /cmdebg/levdbg,ludbug
21  common /idparm/dangtl,dmagtl,pangtl,tangtl,tminco,
22  * dmagtg,pangtg,tangtg,tmincg,imatch
23  namelist /idnl/imatch,dangtl,dmagtl,pangtl,tangtl,tminco,
24  * dmagtg,pangtg,tangtg,tmincg,levdbg,ludbug
25  data imatch/3/,dangtl/0.2/
26  data dmagtl/0.025/,pangtl/0.01/,tangtl/0.01/,tminco/30.0/
27  data dmagtg/0.1/,pangtg/0.04/,tangtg/0.03/,tmincg/15.0/
28  data levdbg/8*0/,ludbug/99/,nllun/50/
29  data isl/'I','S','L'/
30  equivalence(statfile,bytefile)
31 
32 
33  parmfile = '$IDPARMS/idparms.nl'
34  call filenv(parmfile,parmfile)
35  open(file=parmfile,unit=nllun,status='old',iostat=istat)
36  read(nllun,idnl)
37  write(*,idnl)
38  close(nllun)
39 
40 c write( 6, 100 )
41 c 100 format( ' Enter the name of the HDF file to open' )
42 c read( 5, 200 ) infile
43 c 200 format( a )
44  call getarg(1,infile)
45  write( 6, 300 ) infile
46  300 format( ' nav_assess.f: input file =',/,a,/ )
47 
48 c call the open routine
49  call get_l1a_open( infile, prod_id, npix, nlin, iret )
50 c
51  write( 6, 400 ) prod_id(1), npix, nlin, iret
52  400 format( ' test, open: prod_ID = ', i7, ' npix = ',i7,/,
53  1 ' nlin = ',i7, ' iret = ',i7 )
54 c
55  if (iret.eq.-1) go to 999
56 
57  gaclac = 0
58  if (npix.eq.248) gaclac = 1
59 
60 c Get file name to use for output stats file
61 
62  ind = sffattr(prod_id, 'Product Name')
63  iret = sfrattr(prod_id, ind, statfile)
64  do i=1,3
65  bytefile(i+15) = isl(i)
66  end do
67 
68  call cdata
69 
70  call find_islands(prod_id,npix,west,numi,xlon,xlat,wlon,wlat,
71  * nump,nill,nilp)
72 
73  call get_l1a_close( prod_id, iret )
74  write( 6,600) iret
75  600 format(' test, close: iret = ', i7)
76 
77  if (numi.gt.0) then
78  open(55, file=statfile)
79 
80  call id_drv(gaclac,west,numi,xlon,xlat,wlon,wlat,nilp,nump)
81  end if
82 
83  stop
84 
85  999 write(*,*) 'Invalid file name'
86 
87  stop
88 
89  end
subroutine id_drv(gaclac, west, numi, xlon, xlat, wlon, wlat, nilp, nump)
Definition: id_drv.f:2
subroutine find_islands(prod_ID, npix, west, numi, xlon, xlat, wlon, wlat, nump, nill, nilp)
Definition: find_islands.f:3
integer function sffattr(id, name)
Definition: mfsdff.f:319
#define real
Definition: DbAlgOcean.cpp:26
subroutine filenv(infil, outfil)
Definition: filenv.f:2
subroutine cdata
Definition: cdata.f:2
#define re
Definition: l1_czcs_hdf.c:701
#define pi
Definition: vincenty.c:23
subroutine get_l1a_close(prod_ID, iret)
Definition: get_l1a_close.f:2
program nav_assess
Definition: main_navassess.f:2
#define omf2
Definition: l1_czcs_hdf.c:703
subroutine get_l1a_open(infile, amode, prod_ID, isday, nlin, iret)
Definition: get_l1a_open.f:3
#define f
Definition: l1_czcs_hdf.c:702