-
Notifications
You must be signed in to change notification settings - Fork 0
/
dmwdmg.f
48 lines (48 loc) · 1.27 KB
/
dmwdmg.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
SUBROUTINE DM_WDMG ( iflno, iret )
C************************************************************************
C* DM_WDMG *
C* *
C* This subroutine writes the data management record to a DM file. *
C* *
C* DM_WDMG ( IFLNO, IRET ) *
C* *
C* Input parameters: *
C* IFLNO INTEGER File number *
C* *
C* Output parameters: *
C* IRET INTEGER Return code *
C* 0 = normal return *
C* -6 = write error *
C** *
C* Log: *
C* M. desJardins/GSFC 6/86 *
C************************************************************************
INCLUDE 'GEMPRM.PRM'
INCLUDE 'dmcmn.cmn'
C
INTEGER iarray ( 4 + 2 * MMFREE )
C------------------------------------------------------------------------
C* Get the pointer to the data management record.
C
isword = kpdmgt ( iflno )
length = kldmgt ( iflno )
C
C* Put the record into an array.
C
iarray ( 1 ) = kpnext ( iflno )
iarray ( 2 ) = kmfree ( iflno )
iarray ( 3 ) = knfree ( iflno )
iarray ( 4 ) = klstwd ( iflno )
next = 5
DO i = 1, kmfree ( iflno )
iarray ( next ) = kfreew ( 1, i, iflno )
iarray (next+1) = kfreew ( 2, i, iflno )
next = next + 2
END DO
C
C* Write the record.
C
CALL DM_WINT ( iflno, isword, length, iarray, iret )
C*
RETURN
END