-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdmword.f
29 lines (29 loc) · 956 Bytes
/
dmword.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
SUBROUTINE DM_WORD ( iword, irec, isword, iret )
C************************************************************************
C* DM_WORD *
C* *
C* This subroutine finds the record and start word within the record *
C* for any word within a DM file. *
C* *
C* DM_WORD ( IWORD, IREC, ISWORD, IRET ) *
C* *
C* Input parameters: *
C* IWORD INTEGER Word number from start of file *
C* *
C* Output parameters: *
C* IREC INTEGER Record number *
C* ISWORD INTEGER Start word within record *
C* IRET INTEGER Return code *
C* 0 = normal return *
C** *
C* Log: *
C* M. desJardins/GSFC 6/86 *
C************************************************************************
INCLUDE 'GEMPRM.PRM'
C------------------------------------------------------------------------
iret = 0
irec = ( iword - 1 ) / MBLKSZ + 1
isword = iword - ( irec - 1 ) * MBLKSZ
C*
RETURN
END