OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
read_short.f
Go to the documentation of this file.
1  subroutine read_short(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 2-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*2 itmp2
21  byte temp2(2)
22  byte raw(*)
23  equivalence(itmp2,temp2)
24 
25  data = 0.0
26 #ifdef LINUX
27  do j=1,2
28  temp2(j) = raw(loc(1)+2-j)
29  end do
30 #else
31  do j=1,2
32  temp2(j) = raw(loc(1)+j-1)
33  end do
34 #endif
35  data = itmp2*con(1) + con(2)
36  return
37  end
@ floating
#define real
Definition: DbAlgOcean.cpp:26
subroutine read_short(data, loc, con, raw)
Definition: read_short.f:2