OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
read_float.f
Go to the documentation of this file.
1  subroutine read_float(data,loc,con,raw)
2 
3 c $Header$
4 c $Log$
5 c
6 c This subroutine retrieves a 4-byte floating point value from a specified
7 c location in the raw data array
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*4 con(2)
18  integer*4 loc(2)
19  byte raw(*),temp(4)
20  equivalence(temp,rtmp4)
21 
22  rtmp4 = 0.0
23 #ifdef LINUX
24  do i=1,4
25  temp(i) = raw(loc(1)+4-i)
26  end do
27 #else
28  do i=1,4
29  temp(i) = raw(i+loc(1)-1)
30  end do
31 #endif
32  data = rtmp4*con(1)
33  return
34  end
subroutine read_float(data, loc, con, raw)
Definition: read_float.f:2
#define real
Definition: DbAlgOcean.cpp:26