OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
read_long.f
Go to the documentation of this file.
1  subroutine read_long(data,loc,con,raw)
2 
3 c $header$
4 c $log$
5 c
6 c this subroutine converts the floating point value data from a signed 4-byte
7 c integer using the conversion specification CON and the location specified
8 c by loc in the array raw
9 c
10 c april 3, 1995 by frederick s. patt, gsc
11 c
12 c modification history
13 c
14 c changed integer*1 to byte for Sun OS compatibility, B. A. Franz,
15 c gac, november 14, 1997.
16 
17 
18  real*4 con(2)
19  integer*4 loc(2)
20  integer*4 itmp4
21  byte temp4(4)
22  byte raw(*)
23  equivalence(itmp4,temp4)
24 
25  data = 0.0
26 #ifdef LINUX
27  do j=1,4
28  temp4(j) = raw(loc(1)+4-j)
29  end do
30 #else
31  do j=1,4
32  temp4(j) = raw(loc(1)+j-1)
33  end do
34 #endif
35  data = itmp4*con(1) + con(2)
36  return
37  end
@ floating
#define real
Definition: DbAlgOcean.cpp:26
subroutine read_long(data, loc, con, raw)
Definition: read_long.f:2