OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
fget_ancillary.f
Go to the documentation of this file.
1 c ------------------------------------------------------------------
2 c function fget_ancillary
3 c
4 c F77 wrapper for the SeaWiFS ancillary hdf file reader,
5 c get_ancillary. Calling sequence is identical. Relies
6 c on the companion C-wrapper get_ancillary_, which was
7 c added to getanc.c.
8 c
9 c BA Franz, GSC/NASA SeaWiFS, 1/97
10 c ------------------------------------------------------------------
11 
12  integer*4 function fget_ancillary(
13  . lat,lon,nsamp,syear,sday,eday,msec,
14  . file1,file2,file3,parmID,
15  . outval, qcflag)
16 c
17  implicit none
18 c
19 #define FLEN 255
20 c
21  integer*2 nsamp
22  real*4 lat(nsamp)
23  real*4 lon(nsamp)
24  integer*2 syear
25  integer*2 sday
26  integer*2 eday
27  integer*4 msec
28  character*flen file1
29  character*flen file2
30  character*flen file3
31  integer*2 parmid
32  real*4 outval(nsamp)
33  integer*2 qcflag(nsamp)
34  integer*4 status
35 c
36  integer*2 i
37  integer*4 n1, n2, n3
38  integer*4 lenstr
39  byte bfile1(flen+1)
40  byte bfile2(flen+1)
41  byte bfile3(flen+1)
42 c
43  integer*4 get_ancillary
44  external get_ancillary
45 c
46 c !
47 c ! Make C-style string from f77 string
48 c !
49  n1 = lenstr(file1)
50  do i=1,n1
51  bfile1(i) = ichar(file1(i:i))
52  enddo
53  bfile1(n1+1) = 0
54 c
55  n2 = lenstr(file2)
56  do i=1,n2
57  bfile2(i) = ichar(file2(i:i))
58  enddo
59  bfile2(n2+1) = 0
60 c
61  n3 = lenstr(file3)
62  do i=1,n3
63  bfile3(i) = ichar(file3(i:i))
64  enddo
65  bfile3(n3+1) = 0
66 c
67  status = get_ancillary(lat,lon,%val(nsamp),
68  . %val(syear),%val(sday),%val(eday),%val(msec),
69  . bfile1,bfile2,bfile3,
70  . %val(parmid),outval,qcflag)
71 c
72  fget_ancillary = status
73  return
74 c
75  end
integer *4 function lenstr(string)
Definition: lenstr.f:2
#define real
Definition: DbAlgOcean.cpp:26
int get_ancillary(float *in_lat, float *in_lon, int16_t cnt, int16_t syear, int16_t sday, int16_t eday, int32_t time, char *filename1, char *filename2, char *filename3, char *anc_cor_file, int16_t parm_flag, float *interp, float *anc_unc, int16_t *qcflag)
Definition: getanc.c:297
integer *4 function fget_ancillary(lat, lon, nsamp, syear, sday, eday, msec, file1, file2, file3, parmID, outval, qcflag)
#define byte
Definition: input_s.h:5