1 SUBROUTINE PACK (Z,IDA,STAND,AMP,NGRID)
3 REAL*8 Z(NGRID), DMAX, DMIN
4 Crizvi INTEGER*2 IDA(NGRID)
9 * ******* SCALING PART *******
20 AMP =(DMAX-STAND)/CMAX
22 * ***** PACKING PART *******
31 WORK=(Z(I)-STAND)*RAMP
42 C*********************************************************************
43 SUBROUTINE CR4I2V(RDATA,BASE,AMP,IDATA,LM)
44 ************************************************************************
45 * ( IN ) RDATA R*4(LM) : ŽÀ�””z—ñ
46 * ( OUT) BASE R*4 : Šî�€’l
47 * ( OUT) AMP R*4 : ŒW�”
48 * ( OUT) IDATA I*2(LM) : �®�””z—ñ
49 * ( IN ) LM I*4 : ƒf�[ƒ^�”
51 ************************************************************************
53 Crizvi REAL*4 RDATA(LM),RMAX,RMIN,DIST,DBASE,EXPV
54 REAL RDATA(LM),RMAX,RMIN,DIST,DBASE,EXPV
56 Crizvi REAL*4 DVAL/32760.E0/
58 Crizvi INTEGER*2 HZERO/0/,HWORK
59 INTEGER HZERO/0/,HWORK
66 IF (RDATA(I).GT.RMAX) RMAX=RDATA(I)
67 IF (RDATA(I).LT.RMIN) RMIN=RDATA(I)
76 IF (DIST.EQ.0) THEN ! ALL SAME
80 IF ((LM/2)*2.NE.LM) THEN ! LM ODD
81 Crizvi CALL MOVEC(IDATA(LM/2+1),1,HZERO,1,2)
82 IDATA(LM/2+1) = HZERO * 65536
89 IWORK=NINT((RDATA(I)-DBASE)*EXPV) ! EVEN PART
91 IDATA(I/2)=NINT((RDATA(I-1)-DBASE)*EXPV)*65536+IWORK
93 IDATA(I/2)=(NINT((RDATA(I-1)-DBASE)*EXPV)+1)*65536+IWORK
96 IF ((LM/2)*2.NE.LM) THEN ! LM ODD
97 HWORK=NINT((RDATA(LM)-DBASE)*EXPV)
98 Crizvi CALL MOVEC(IDATA(LM/2+1),1,HWORK,1,2)
99 IDATA(LM/2+1) = HWORK * 65536
104 END SUBROUTINE CR4I2V
106 C*********************************************************************
107 C >>> ƒf�[ƒ^‚ðƒAƒ“ƒpƒbƒN‚·‚é�iƒxƒNƒgƒ‹”Å�j <<<
108 C*********************************************************************
109 SUBROUTINE CI2R4V(RDATA,BASE,AMP,IDATA,LM)
110 ************************************************************************
112 * �”’l—\•ñ‰Û—¬‚QƒoƒCƒg�®�”Œ^ƒf�[ƒ^”z—ñ‚ð‚SƒoƒCƒgŽÀ�”‚É•ÏŠ·‚·‚é�B
113 * �i‚r‚R‚W‚O‚OƒxƒNƒgƒ‹�ˆ—�—p�j
116 * ( OUT) RDATA R*4(LM) : ŽÀ�””z—ñ
117 * ( IN ) BASE R*4 : Šî�€’l
118 * ( IN ) AMP R*4 : ŒW�”
119 * ( IN ) IDATA I*2(LM) : �®�””z—ñ
120 * ( IN ) LM I*4 : ƒf�[ƒ^�”
122 * •K—v‚ȃTƒuƒ‹�[ƒ`ƒ“ –³‚µ
123 * ’�ˆÓ�F‚h‚c‚`‚s‚`‚͌ꋫŠE‚É‚ ‚邱‚Æ�B
125 ************************************************************************
127 Crizvi REAL*4 RDATA(LM)
137 IWRK=IDATA(I/2)/65536
138 IRMN=IDATA(I/2)-IWRK*65536
139 IF (IRMN.EQ.0) THEN ! LOWER-HALF=0
140 RDATA(I-1)=BASE+AMP*IWRK
142 ELSE IF (IRMN.GT.0) THEN
143 RDATA(I-1)=BASE+AMP*IWRK
144 IF (IRMN.LT.32768) THEN
145 RDATA(I)=BASE+AMP*IRMN
147 RDATA(I)=BASE+AMP*(IRMN-65536)
150 RDATA(I-1)=BASE+AMP*(IWRK-1)
151 IF (IRMN.LT.-32768) THEN
152 RDATA(I)=BASE+AMP*(IRMN+65536)
154 RDATA(I)=BASE+AMP*IRMN
158 IF ((LM/2)*2.NE.LM) THEN ! LM ODD
159 Crizvi CALL MOVEC(HWORK,1,IDATA(LM/2+1),1,2)
160 HWORK=IDATA(LM/2+1)/65536
161 RDATA(LM)=BASE+AMP*HWORK
165 END SUBROUTINE CI2R4V
167 C*********************************************************************
168 C >>> ƒf�[ƒ^‚ðƒAƒ“ƒpƒbƒN‚·‚é�iƒxƒNƒgƒ‹”Å�j <<<
169 C*********************************************************************
170 SUBROUTINE CI2R8V(RDATA,BASE,AMP,IDATA,LM)
171 ************************************************************************
173 * �”’l—\•ñ‰Û—¬‚QƒoƒCƒg�®�”Œ^ƒf�[ƒ^”z—ñ‚ð‚WƒoƒCƒgŽÀ�”‚É•ÏŠ·‚·‚é�B
174 * �i‚r‚R‚W‚O‚OƒxƒNƒgƒ‹�ˆ—�—p�j
177 * ( OUT) RDATA R*8(LM) : ŽÀ�””z—ñ
178 * ( IN ) BASE R*4 : Šî�€’l
179 * ( IN ) AMP R*4 : ŒW�”
180 * ( IN ) IDATA I*2(LM) : �®�””z—ñ
181 * ( IN ) LM I*4 : ƒf�[ƒ^�”
183 * •K—v‚ȃTƒuƒ‹�[ƒ`ƒ“ –³‚µ
184 * ’�ˆÓ�F‚q‚c‚`‚s‚`‚Í‚QŒê‹«ŠE�A‚h‚c‚`‚s‚`‚͌ꋫŠE‚É‚ ‚邱‚Æ�B
186 ************************************************************************
194 IWRK=IDATA(I/2)/65536
195 IRMN=IDATA(I/2)-IWRK*65536
196 IF (IRMN.EQ.0) THEN ! LOWER-HALF=0
197 RDATA(I-1)=BASE+AMP*IWRK
199 ELSE IF (IRMN.GT.0) THEN
200 RDATA(I-1)=BASE+AMP*IWRK
201 IF (IRMN.LT.32768) THEN
202 RDATA(I)=BASE+AMP*IRMN
204 RDATA(I)=BASE+AMP*(IRMN-65536)
207 RDATA(I-1)=BASE+AMP*(IWRK-1)
208 IF (IRMN.LT.-32768) THEN
209 RDATA(I)=BASE+AMP*(IRMN+65536)
211 RDATA(I)=BASE+AMP*IRMN
215 IF ((LM/2)*2.NE.LM) THEN ! LM ODD
216 Crizvi CALL MOVEC(HWORK,1,IDATA(LM/2+1),1,2)
217 HWORK=IDATA(LM/2+1)/65536
218 RDATA(LM)=BASE+AMP*HWORK
222 END SUBROUTINE CI2R8V
224 C*********************************************************************
225 SUBROUTINE MOVERD(DATIN,DATOUT,N)
234 END SUBROUTINE MOVERD
236 C*********************************************************************
237 SUBROUTINE GETTYP(NFL,IOTYP)
241 READ(NFL,'(2A4)',ERR=10) GVSD, GVSD
243 IF( GVSD.EQ.'GVD1' ) THEN
248 READ(NFL,ERR=20) GVSD
250 IF( GVSD.EQ.'GVS1' ) THEN
258 END SUBROUTINE GETTYP