*IF DEF,C80_1A,OR,DEF,C91_2A,OR,DEF,UTILIO,OR,DEF,RECON,OR,DEF,FLDIO UIE3F404.23
C ******************************COPYRIGHT****************************** IEEEPK1A.3
C (c) CROWN COPYRIGHT 1997, METEOROLOGICAL OFFICE, All Rights Reserved. IEEEPK1A.4
C IEEEPK1A.5
C Use, duplication or disclosure of this code is subject to the IEEEPK1A.6
C restrictions as set forth in the contract. IEEEPK1A.7
C IEEEPK1A.8
C Meteorological Office IEEEPK1A.9
C London Road IEEEPK1A.10
C BRACKNELL IEEEPK1A.11
C Berkshire UK IEEEPK1A.12
C RG12 2SZ IEEEPK1A.13
C IEEEPK1A.14
C If no contract has been raised with this copy of the code, the use, IEEEPK1A.15
C duplication or disclosure of it is strictly prohibited. Permission IEEEPK1A.16
C to do so must first be obtained in writing from the Head of Numerical IEEEPK1A.17
C Modelling at the above address. IEEEPK1A.18
C ******************************COPYRIGHT****************************** IEEEPK1A.19
C IEEEPK1A.20
PXPACK.1
!LL SUBROUTINE PACK21 PXPACK.2
!LL PXPACK.3
!LL Purpose: Packs IEEE 64-bit data into IEEE 32-bit data. PXPACK.4
!LL PXPACK.5
!LL Original author: Bob Carruthers, Cray Research PXPACK.6
!LL Revised by : Paul Burton PXPACK.7
!LL PXPACK.8
!LL Model Date Modification history PXPACK.9
!LL version PXPACK.10
!LL PXPACK.11
!LL 4.3 18/03/97 Original version PXPACK.12
!LL 4.5 07/09/98 Make pack21 only have four arguments, PXPACK.13
!LL with pack21_stride having the previously PXPACK.14
!LL optional fifth argument. PXPACK.15
!LL Similarly for expand21. PXPACK.16
!LL Portable error message removed. PXPACK.17
!LL P.Burton PXPACK.18
PXPACK.19
SUBROUTINE PACK21(N,IN,OUT,NEXP) 7,1PXPACK.20
PXPACK.21
! Compress input array 'in' from 64-bit into 'out' in PXPACK.22
! 32 bit PXPACK.23
PXPACK.24
IMPLICIT NONE PXPACK.25
PXPACK.26
! Arguments: PXPACK.27
PXPACK.28
INTEGER PXPACK.29
& N ! IN: number of floating point words to convert PXPACK.30
&, NEXP ! IN: present for compatibility - ignored PXPACK.31
PXPACK.32
! The types of the argument are in Fortran 90 format. PXPACK.33
! Fortran 77 format is included in comments after it, so can PXPACK.34
! be selected by writing a simple modset PXPACK.35
PXPACK.36
REAL (KIND=8) PXPACK.37
! REAL*8 - Fortran 77 version PXPACK.38
& IN(N) ! IN: input array of 64 bit numbers PXPACK.39
PXPACK.40
REAL (KIND=4) PXPACK.41
! REAL*4 - Fortran 77 version PXPACK.42
& OUT(N) ! OUT: output array of 32 bit numbers PXPACK.43
PXPACK.44
! Local variables PXPACK.45
PXPACK.46
INTEGER PXPACK.47
& INC ! increment=1 to be passed to PACK21_STRIDE PXPACK.48
PXPACK.49
PARAMETER PXPACK.50
& (INC=1) PXPACK.51
PXPACK.52
CALL PACK21_STRIDE
(N,IN,OUT,NEXP,INC) PXPACK.53
PXPACK.54
RETURN PXPACK.55
PXPACK.56
END PXPACK.57
PXPACK.58
SUBROUTINE PACK21_STRIDE(N,IN,OUT,NEXP,INC) 1PXPACK.59
PXPACK.60
! Compress input array 'in' from 64-bit into 'out' in PXPACK.61
! 32 bit PXPACK.62
PXPACK.63
IMPLICIT NONE PXPACK.64
PXPACK.65
! Arguments: PXPACK.66
PXPACK.67
INTEGER PXPACK.68
& N ! IN: number of floating point words to convert PXPACK.69
&, NEXP ! IN: present for compatibility - ignored PXPACK.70
&, INC ! IN: stride through input array PXPACK.71
PXPACK.72
! The types of the argument are in Fortran 90 format. PXPACK.73
! Fortran 77 format is included in comments after it, so can PXPACK.74
! be selected by writing a simple modset PXPACK.75
PXPACK.76
REAL (KIND=8) PXPACK.77
! REAL*8 - Fortran 77 version PXPACK.78
& IN(N) ! IN: input array of 64 bit numbers PXPACK.79
PXPACK.80
REAL (KIND=4) PXPACK.81
! REAL*4 - Fortran 77 version PXPACK.82
& OUT(N) ! OUT: output array of 32 bit numbers PXPACK.83
PXPACK.84
! Local variables PXPACK.85
PXPACK.86
INTEGER PXPACK.87
& I,J ! loop indexes to output and input arrays PXPACK.88
PXPACK.89
PXPACK.90
J=1 PXPACK.91
DO I=1,N PXPACK.92
OUT(I)=IN(J) PXPACK.93
J=J+INC PXPACK.94
ENDDO PXPACK.95
PXPACK.96
RETURN PXPACK.97
END PXPACK.98
PXPACK.99
PXPACK.100
SUBROUTINE EXPAND21(N,IN,OUT,NEXP) 8,1PXPACK.101
PXPACK.102
! Expands input array 'in' from 32-bit into 'out' in PXPACK.103
! 64 bit PXPACK.104
PXPACK.105
IMPLICIT NONE PXPACK.106
PXPACK.107
! Arguments: PXPACK.108
PXPACK.109
INTEGER PXPACK.110
& N ! IN: number of floating point words to convert PXPACK.111
&, NEXP ! IN: present for compatibility - ignored PXPACK.112
PXPACK.113
! The types of the argument are in Fortran 90 format. PXPACK.114
! Fortran 77 format is included in comments after it, so can PXPACK.115
! be selected by writing a simple modset PXPACK.116
PXPACK.117
REAL (KIND=4) PXPACK.118
! REAL*4 - Fortran 77 version PXPACK.119
& IN(N) ! IN: input array of 32 bit numbers PXPACK.120
PXPACK.121
REAL (KIND=8) PXPACK.122
! REAL*8 - Fortran 77 version PXPACK.123
& OUT(N) ! OUT: output array of 64 bit numbers PXPACK.124
PXPACK.125
! Local variables PXPACK.126
PXPACK.127
INTEGER PXPACK.128
& INC ! increment=1 to be passed to EXPAND21_STRIDE PXPACK.129
PXPACK.130
PARAMETER PXPACK.131
& (INC=1) PXPACK.132
PXPACK.133
CALL EXPAND21_STRIDE
(N,IN,OUT,NEXP,INC) PXPACK.134
PXPACK.135
RETURN PXPACK.136
PXPACK.137
END PXPACK.138
PXPACK.139
SUBROUTINE EXPAND21_STRIDE(N,IN,OUT,NEXP,INC) 1PXPACK.140
PXPACK.141
! Compress input array 'in' from 32-bit into 'out' in PXPACK.142
! 64 bit PXPACK.143
PXPACK.144
IMPLICIT NONE PXPACK.145
PXPACK.146
! Arguments: PXPACK.147
PXPACK.148
INTEGER PXPACK.149
& N ! IN: number of floating point words to convert PXPACK.150
&, NEXP ! IN: present for compatibility - ignored PXPACK.151
&, INC ! IN: stride through output array PXPACK.152
PXPACK.153
! The types of the argument are in Fortran 90 format. PXPACK.154
! Fortran 77 format is included in comments after it, so can PXPACK.155
! be selected by writing a simple modset PXPACK.156
PXPACK.157
REAL (KIND=4) PXPACK.158
! REAL*4 - Fortran 77 version PXPACK.159
& IN(N) ! IN: input array of 32 bit numbers PXPACK.160
PXPACK.161
REAL (KIND=8) PXPACK.162
! REAL*8 - Fortran 77 version PXPACK.163
& OUT(N) ! OUT: output array of 64 bit numbers PXPACK.164
PXPACK.165
! Local variables PXPACK.166
PXPACK.167
INTEGER PXPACK.168
& I,J ! loop indexes to input and output arrays PXPACK.169
PXPACK.170
PXPACK.171
J=1 PXPACK.172
DO I=1,N PXPACK.173
OUT(J)=IN(I) PXPACK.174
J=J+INC PXPACK.175
ENDDO PXPACK.176
PXPACK.177
RETURN PXPACK.178
END PXPACK.179
*ENDIF IEEEPK1A.130