OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
read_double.f
Go to the documentation of this file.
1  subroutine read_double(data,loc,con,raw)
2 
3 c $Header$
4 c $Log$
5 c
6 c This subroutine retrieves a 8-byte floating point value from a specified
7 c location in the raw data array and converts it to a 4-byte real variable.
8 c
9 c April 3, 1995 by Frederick S. Patt, GSC
10 c
11 c Modification History
12 c
13 c Changed integer*1 to byte for Sun OS compatibility, B. A. Franz,
14 c GAC, November 14, 1997.
15 
16 
17  real*8 dtmp8
18  real*4 con(2)
19  integer*4 loc(2)
20  byte raw(*),temp(8)
21  equivalence(temp,dtmp8)
22 
23  dtmp8 = 0.0
24 #ifdef LINUX
25  do i=1,8
26  temp(i) = raw(loc(1)+8-i)
27  end do
28 #else
29  do i=1,8
30  temp(i) = raw(i+loc(1)-1)
31  end do
32 #endif
33  data = dtmp8*con(1)
34  return
35  end
36 
#define real
Definition: DbAlgOcean.cpp:26
subroutine read_double(data, loc, con, raw)
Definition: read_double.f:2