191subroutine getgb2i2(lugb, lugi, j, jdisc, jids, jpdtn, jpdt, jgdtn, jgdt, &
192 unpack, idxver, k, gfld, iret)
197 integer,
intent(in) :: lugb, lugi, j, jdisc
198 integer,
dimension(:) :: jids(*)
199 integer,
intent(in) :: jpdtn
200 integer,
dimension(:) :: jpdt(*)
201 integer,
intent(in) :: jgdtn
202 integer,
dimension(:) :: jgdt(*)
203 logical,
intent(in) :: unpack
204 integer,
intent(in) :: idxver
205 integer,
intent(out) :: k
207 integer,
intent(out) ::iret
208 character(len = 1),
pointer,
dimension(:) :: cbuf
209 integer :: nnum, nlen, lpos, jk, irgi, irgs
213 subroutine getidx2(lugb, lugi, idxver, cindex, nlen, nnum, iret)
214 integer,
intent(in) :: lugb, lugi, idxver
215 character(len = 1),
pointer,
dimension(:) :: cindex
216 integer,
intent(out) :: nlen, nnum, iret
218 subroutine getgb2s2(cbuf, idxver, nlen, nnum, j, jdisc, jids, jpdtn, jpdt, jgdtn, &
219 jgdt, k, gfld, lpos, iret)
221 character(len = 1),
intent(in) :: cbuf(nlen)
222 integer,
intent(in) :: idxver, nlen, nnum, j, jdisc
223 integer,
dimension(:) :: jids(*)
224 integer,
intent(in) :: jpdtn
225 integer,
dimension(:) :: jpdt(*)
226 integer,
intent(in) :: jgdtn
227 integer,
dimension(:) :: jgdt(*)
228 integer,
intent(out) :: k
230 integer,
intent(out) :: lpos, iret
232 subroutine getgb2l2(lugb, idxver, cindex, gfld, iret)
234 integer,
intent(in) :: lugb, idxver
235 character(len = 1),
intent(in) :: cindex(*)
237 integer,
intent(out) :: iret
239 subroutine getgb2r2(lugb, idxver, cindex, gfld, iret)
242 integer,
intent(in) :: lugb, idxver
243 character(len=1),
intent(in) :: cindex(*)
245 integer,
intent(out) :: iret
250 write(
g2_log_msg,
'(a, i2, a, i2, a, i5, a, i5, a, l, a, i1)')
'getgb2i2: lugb ', lugb,
' lugi ', lugi, &
251 ' j ', j,
' jdisc ', jdisc,
' unpack ', unpack,
' idxver ', idxver
259 call getidx2(lugb, lugi, idxver, cbuf, nlen, nnum, irgi)
260 if (irgi .gt. 1)
then
267 call getgb2s2(cbuf, idxver, nlen, nnum, j, jdisc, jids, jpdtn, jpdt, jgdtn, jgdt, jk, &
269 if (irgs .ne. 0)
then
276 call getgb2l2(lugb, idxver, cbuf(lpos), gfld, iret)
280 call getgb2r2(lugb, idxver, cbuf(lpos), gfld, iret)
357subroutine getgb2l2(lugb, idxver, cindex, gfld, iret)
362 integer,
intent(in) :: lugb, idxver
363 character(len = 1),
intent(in) :: cindex(*)
365 integer,
intent(out) :: iret
367 integer :: lskip, skip2
368 integer (kind = 8) :: lskip8, iskip8, lread8, ilen8, skip28
369 character(len = 1):: csize(4)
370 character(len = 1),
allocatable :: ctemp(:)
371 integer :: ilen, iofst, ierr
372 integer :: INT1_BITS, INT2_BITS, INT4_BITS, INT8_BITS
373 parameter(int1_bits = 8, int2_bits = 16, int4_bits = 32, int8_bits = 64)
377 subroutine g2_gbytec1(in, siout, iskip, nbits)
378 character*1,
intent(in) :: in(*)
379 integer,
intent(inout) :: siout
380 integer,
intent(in) :: iskip, nbits
383 character*1,
intent(in) :: in(*)
384 integer (kind = 8),
intent(inout) :: siout
385 integer,
intent(in) :: iskip, nbits
386 integer (kind = 8) :: iout(1)
388 subroutine gf_unpack2(cgrib, lcgrib, iofst, lencsec2, csec2, ierr)
389 character(len = 1),
intent(in) :: cgrib(lcgrib)
390 integer,
intent(in) :: lcgrib
391 integer,
intent(inout) :: iofst
392 integer,
intent(out) :: lencsec2
393 integer,
intent(out) :: ierr
394 character(len = 1),
pointer,
dimension(:) :: csec2
400 write(
g2_log_msg,
'(a, i2, a, i1)')
'getgb2l2: lugb ', lugb,
' idxver ', idxver
411 if (idxver .eq. 1)
then
413 call g2_gbytec1(cindex, lskip, mypos, int4_bits)
414 mypos = mypos + int4_bits
417 call g2_gbytec1(cindex, skip2, mypos, int4_bits)
422 mypos = mypos + int8_bits
425 mypos = mypos + int8_bits
429 if (skip28 .ne. 0)
then
430 iskip8 = lskip8 + skip28
433 call bareadl(lugb, iskip8, 4_8, lread8, csize)
435 allocate(ctemp(ilen))
439 call bareadl(lugb, iskip8, ilen8, lread8, ctemp)
440 if (ilen8 .ne. lread8)
then
446 call gf_unpack2(ctemp, ilen, iofst, gfld%locallen, gfld%local, ierr)
447 if (ierr .ne. 0)
then
520subroutine getgb2p(lugb, lugi, j, jdisc, jids, jpdtn, jpdt, jgdtn, jgdt, &
521 extract, k, gribm, leng, iret)
525 integer,
intent(in) :: lugb, lugi, j, jdisc
526 integer,
dimension(:) :: jids(*)
527 integer,
intent(in) :: jpdtn
528 integer,
dimension(:) :: jpdt(*)
529 integer,
intent(in) :: jgdtn
530 integer,
dimension(:) :: jgdt(*)
531 logical,
intent(in) :: extract
532 integer,
intent(out) :: k
533 character(len = 1),
pointer,
dimension(:) :: gribm
534 integer,
intent(out) :: leng, iret
537 integer (kind = 8) :: leng8
540 subroutine getgb2p2(lugb, lugi, j, jdisc, jids, jpdtn, jpdt, jgdtn, jgdt, &
541 extract, idxver, k, gribm, leng8, iret)
542 integer,
intent(in) :: lugb, lugi, j, jdisc
543 integer,
dimension(:) :: jids(*)
544 integer,
intent(in) :: jpdtn
545 integer,
dimension(:) :: jpdt(*)
546 integer,
intent(in) :: jgdtn
547 integer,
dimension(:) :: jgdt(*)
548 logical,
intent(in) :: extract
549 integer,
intent(inout) :: idxver
550 integer,
intent(out) :: k
551 character(len = 1),
pointer,
dimension(:) :: gribm
552 integer (kind = 8),
intent(out) :: leng8
553 integer,
intent(out) :: iret
559 call getgb2p2(lugb, lugi, j, jdisc, jids, jpdtn, jpdt, jgdtn, jgdt, &
560 extract, idxver, k, gribm, leng8, iret)
561 leng = int(leng8, kind(4))
654subroutine getgb2p2(lugb, lugi, j, jdisc, jids, jpdtn, jpdt, jgdtn, jgdt, &
655 extract, idxver, k, gribm, leng8, iret)
659 integer,
intent(in) :: lugb, lugi, j, jdisc
660 integer,
dimension(:) :: jids(*)
661 integer,
intent(in) :: jpdtn
662 integer,
dimension(:) :: jpdt(*)
663 integer,
intent(in) :: jgdtn
664 integer,
dimension(:) :: jgdt(*)
665 logical,
intent(in) :: extract
666 integer,
intent(inout) :: idxver
667 integer,
intent(out) :: k
668 character(len = 1),
pointer,
dimension(:) :: gribm
669 integer (kind = 8),
intent(out) :: leng8
670 integer,
intent(out) :: iret
673 integer :: irgi, irgs, jk, lpos, mskp, nlen, nmess, nnum
674 character(len = 1),
pointer,
dimension(:) :: cbuf
675 integer (kind = 8) :: msk1, msk2
676 parameter(msk1 = 32000, msk2 = 4000)
679 subroutine getg2i(lugi, cbuf, nlen, nnum, iret)
680 character(len = 1),
pointer,
dimension(:) :: cbuf
681 integer,
intent(in) :: lugi
682 integer,
intent(out) :: nlen, nnum, iret
684 subroutine getg2ir(lugb, msk1, msk2, mnum, cbuf, nlen, nnum, &
686 character(len = 1),
pointer,
dimension(:) :: cbuf
687 integer,
intent(in) :: lugb, msk1, msk2, mnum
688 integer,
intent(out) :: nlen, nnum, nmess, iret
690 subroutine getg2i2(lugi, cbuf, idxver, nlen, nnum, iret)
691 integer,
intent(in) :: lugi
692 character(len=1),
pointer,
dimension(:) :: cbuf
693 integer,
intent(out) :: idxver, nlen, nnum, iret
695 subroutine getg2i2r(lugb, msk1, msk2, mnum, idxver, cbuf, &
696 nlen, nnum, nmess, iret)
697 integer,
intent(in) :: lugb
698 integer (kind = 8),
intent(in) :: msk1, msk2
699 integer,
intent(in) :: mnum, idxver
700 character(len = 1),
pointer,
dimension(:) :: cbuf
701 integer,
intent(out) :: nlen, nnum, nmess, iret
703 subroutine getgb2rp2(lugb, idxver, cindex, extract, gribm, leng8, iret)
704 integer,
intent(in) :: lugb
705 integer,
intent(inout) :: idxver
706 character(len = 1),
intent(in) :: cindex(*)
707 logical,
intent(in) :: extract
708 character(len = 1),
pointer,
dimension(:) :: gribm
709 integer (kind = 8),
intent(out) :: leng8
710 integer,
intent(out) :: iret
712 subroutine getgb2s2(cbuf, idxver, nlen, nnum, j, jdisc, jids, jpdtn, jpdt, jgdtn, &
713 jgdt, k, gfld, lpos, iret)
715 character(len = 1),
intent(in) :: cbuf(nlen)
716 integer,
intent(in) :: idxver, nlen, nnum, j, jdisc
717 integer,
dimension(:) :: jids(*)
718 integer,
intent(in) :: jpdtn
719 integer,
dimension(:) :: jpdt(*)
720 integer,
intent(in) :: jgdtn
721 integer,
dimension(:) :: jgdt(*)
722 integer,
intent(out) :: k
724 integer,
intent(out) :: lpos, iret
732 if (lugi .gt. 0)
then
733 call getg2i2(lugi, cbuf, idxver, nlen, nnum, irgi)
734 elseif (lugi .le. 0)
then
736 call getg2i2r(lugb, msk1, msk2, mskp, idxver, cbuf, nlen, nnum, nmess, irgi)
738 if (irgi .gt. 1)
then
744 call getgb2s2(cbuf, idxver, nlen, nnum, j, jdisc, jids, jpdtn, jpdt, jgdtn, jgdt, &
745 jk, gfld, lpos, irgs)
746 if (irgs .ne. 0)
then
753 call getgb2rp2(lugb, idxver, cbuf(lpos:), extract, gribm, leng8, iret)
758 if (
associated(cbuf))
deallocate(cbuf)
856subroutine getgb2r2(lugb, idxver, cindex, gfld, iret)
861 integer,
intent(in) :: lugb, idxver
862 character(len=1),
intent(in) :: cindex(*)
864 integer,
intent(out) :: iret
866 integer :: lskip, skip6, skip7
867 integer (kind = 8) :: skip68, skip78
868 character(len=1):: csize(4)
869 character(len=1),
allocatable :: ctemp(:)
870 real,
pointer,
dimension(:) :: newfld
871 integer :: n, j, iofst, ilen, ierr, idum
872 integer (kind = 8) :: lskip8, lread8, ilen8, iskip8
874 integer :: IXBMS1, IXBMS2
875 parameter(ixbms1 = 24, ixbms2 = 44)
877 integer :: IXDS1, IXDS2
878 parameter(ixds1 = 28, ixds2 = 52)
879 integer :: INT1_BITS, INT2_BITS, INT4_BITS, INT8_BITS
880 parameter(int1_bits = 8, int2_bits = 16, int4_bits = 32, int8_bits = 64)
883 subroutine gf_unpack6(cgrib, lcgrib, iofst, ngpts, ibmap, bmap, ierr)
884 character(len=1),
intent(in) :: cgrib(lcgrib)
885 integer,
intent(in) :: lcgrib, ngpts
886 integer,
intent(inout) :: iofst
887 integer,
intent(out) :: ibmap
888 integer,
intent(out) :: ierr
889 logical*1,
pointer,
dimension(:) :: bmap
891 subroutine gf_unpack7(cgrib, lcgrib, iofst, igdsnum, igdstmpl, &
892 idrsnum, idrstmpl, ndpts, fld, ierr)
893 character(len=1),
intent(in) :: cgrib(lcgrib)
894 integer,
intent(in) :: lcgrib, ndpts, idrsnum, igdsnum
895 integer,
intent(inout) :: iofst
896 integer,
pointer,
dimension(:) :: idrstmpl, igdstmpl
897 integer,
intent(out) :: ierr
898 real,
pointer,
dimension(:) :: fld
900 subroutine g2_gbytec(in, iout, iskip, nbits)
901 character*1,
intent(in) :: in(*)
902 integer,
intent(inout) :: iout(*)
903 integer,
intent(in) :: iskip, nbits
905 subroutine g2_gbytec1(in, siout, iskip, nbits)
906 character*1,
intent(in) :: in(*)
907 integer,
intent(inout) :: siout
908 integer,
intent(in) :: iskip, nbits
909 integer (kind = 4) :: iout(1)
912 character*1,
intent(in) :: in(*)
913 integer (kind = 8),
intent(inout) :: siout
914 integer,
intent(in) :: iskip, nbits
915 integer (kind = 8) :: iout(1)
920 write(
g2_log_msg, *)
'getgb2r2: lugb ', lugb,
' idxver ', idxver
925 nullify(gfld%bmap, gfld%fld)
933 if (idxver .eq. 1)
then
934 call g2_gbytec1(cindex, lskip, int4_bits, int4_bits)
937 call g2_gbytec81(cindex, lskip8, int4_bits, int8_bits)
938 lskip = int(lskip8, kind(4))
942 if (idxver .eq. 1)
then
943 call g2_gbytec1(cindex, skip6, ixbms1 * int1_bits, int4_bits)
946 call g2_gbytec81(cindex, skip68, ixbms2 * int1_bits, int8_bits)
950 write(
g2_log_msg, *)
' getgb2r2: skip68', skip68
955 if (idxver .eq. 1)
then
956 call g2_gbytec1(cindex, skip7, ixds1 * int1_bits, int4_bits)
958 call g2_gbytec81(cindex, skip78, ixds2 * int1_bits, int8_bits)
959 skip7 = int(skip78, kind(4))
963 write(
g2_log_msg, *)
' getgb2r2: skip7', skip7
968 if (gfld%ibmap .eq. 0 .or. gfld%ibmap .eq. 254)
then
969 iskip8 = lskip8 + skip68
972 call bareadl(lugb, iskip8, 4_8, lread8, csize)
974 allocate(ctemp(ilen))
978 call bareadl(lugb, iskip8, ilen8, lread8, ctemp)
979 if (ilen8 .ne. lread8)
then
987 call gf_unpack6(ctemp, ilen, iofst, gfld%ngrdpts, idum, gfld%bmap, ierr)
988 if (ierr .ne. 0)
then
997 iskip8 = lskip8 + skip7
1000 call bareadl(lugb, iskip8, 4_8, lread8, csize)
1002 if (ilen .lt. 6) ilen = 6
1003 allocate(ctemp(ilen))
1007 call bareadl(lugb, iskip8, ilen8, lread8, ctemp)
1008 if (ilen8 .ne. lread8)
then
1016 call gf_unpack7(ctemp, ilen, iofst, gfld%igdtnum, gfld%igdtmpl, &
1017 gfld%idrtnum, gfld%idrtmpl, gfld%ndpts, gfld%fld, ierr)
1018 if (ierr .ne. 0)
then
1027 if (gfld%ibmap .ne. 255 .AND.
associated(gfld%bmap))
then
1028 allocate(newfld(gfld%ngrdpts))
1030 do j = 1, gfld%ngrdpts
1031 if (gfld%bmap(j))
then
1032 newfld(j) = gfld%fld(n)
1038 deallocate(gfld%fld);
1040 gfld%expanded = .true.
1042 gfld%expanded = .true.
1144subroutine getgb2rp2(lugb, idxver, cindex, extract, gribm, leng8, iret)
1148 integer,
intent(in) :: lugb
1149 integer,
intent(inout) :: idxver
1150 character(len = 1),
intent(in) :: cindex(*)
1151 logical,
intent(in) :: extract
1152 character(len = 1),
pointer,
dimension(:) :: gribm
1153 integer (kind = 8),
intent(out) :: leng8
1154 integer,
intent(out) :: iret
1156 integer,
parameter :: zero = 0
1157 character(len = 1),
allocatable,
dimension(:) :: csec2, csec6, csec7
1158 character(len = 4) :: ctemp
1159 integer :: lencur, len0, ibmap = 0, ipos, iskip
1160 integer :: len7 = 0, len8 = 0, len3 = 0, len4 = 0, len5 = 0, len6 = 0, len1 = 0, len2 = 0
1161 integer :: iskp2, iskp6, iskp7
1162 integer (kind = 8) :: iskp2_8
1164 integer :: IXBMS1, IXBMS2
1165 parameter(ixbms1 = 24, ixbms2 = 44)
1167 integer :: IXDS1, IXDS2
1168 parameter(ixds1 = 28, ixds2 = 52)
1169 integer :: INT1_BITS, INT2_BITS, INT4_BITS, INT8_BITS
1170 parameter(int1_bits = 8, int2_bits = 16, int4_bits = 32, int8_bits = 64)
1171 integer :: mypos, inc = 0
1172 integer (kind = 8) :: lread8, iskip8, len2_8, len7_8, len6_8, iskp68, iskp78
1176 character*1,
intent(inout) :: out(*)
1177 integer (kind = 8),
intent(in) :: sin
1178 integer,
intent(in) :: iskip, nbits
1180 subroutine g2_gbytec1(in, siout, iskip, nbits)
1181 character*1,
intent(in) :: in(*)
1182 integer,
intent(inout) :: siout
1183 integer,
intent(in) :: iskip, nbits
1186 character*1,
intent(in) :: in(*)
1187 integer (kind = 8),
intent(inout) :: siout
1188 integer,
intent(in) :: iskip, nbits
1193 write(
g2_log_msg, *)
'getgb2rp2: lugb ', lugb,
' idxver ', idxver,
' extract ', extract
1204 if (idxver .eq. 1)
then
1205 call g2_gbytec1(cindex, iskip, mypos, int4_bits)
1206 mypos = mypos + int4_bits
1208 call g2_gbytec1(cindex, iskp2, mypos, int4_bits)
1209 mypos = mypos + int4_bits
1211 mypos = mypos + 32 * int1_bits
1214 call g2_gbytec81(cindex, iskip8, mypos, int8_bits)
1215 mypos = mypos + int8_bits
1216 call g2_gbytec81(cindex, iskp2_8, mypos, int8_bits)
1217 mypos = mypos + int8_bits
1219 mypos = mypos + 52 * int1_bits
1222 write(
g2_log_msg, *)
'iskip8', iskip8,
'iskip', iskip,
'mypos/8', mypos/8
1227 if (iskp2_8 .gt. 0)
then
1228 call bareadl(lugb, iskip8 + iskp2_8, 4_8, lread8, ctemp)
1230 allocate(csec2(len2))
1232 call bareadl(lugb, iskip8 + iskp2_8, len2_8, lread8, csec2)
1237 write(
g2_log_msg, *)
'iskip8 ', iskip8,
' iskp2_8 ', iskp2_8,
'len2', len2,
'mypos/8', mypos/8
1242 call g2_gbytec1(cindex, len1, mypos, int4_bits)
1243 mypos = mypos + len1 * int1_bits
1244 call g2_gbytec1(cindex, len3, mypos, int4_bits)
1245 mypos = mypos + len3 * int1_bits
1246 call g2_gbytec1(cindex, len4, mypos, int4_bits)
1247 mypos = mypos + len4 * int1_bits
1248 call g2_gbytec1(cindex, len5, mypos, int4_bits)
1249 mypos = mypos + len5 * int1_bits
1250 call g2_gbytec1(cindex, len6, mypos, int4_bits)
1251 mypos = mypos + len6 * int1_bits
1253 write(
g2_log_msg, *)
'len1', len1,
'len3', len3,
'len4', len4,
'len5', len5,
'len6', len6
1258 call g2_gbytec1(cindex, ibmap, mypos, int1_bits)
1259 if (ibmap .eq. 254)
then
1261 if (idxver .eq. 1)
then
1262 call g2_gbytec1(cindex, iskp6, ixbms1 * int1_bits, int4_bits)
1264 call g2_gbytec81(cindex, iskp68, ixbms2 * int1_bits, int8_bits)
1265 iskp6 = int(iskp68, kind(4))
1268 write(
g2_log_msg, *)
'getgb2rp2: iskp6', iskp6
1274 call bareadl(lugb, iskip8 + iskp6, 4_8, lread8, ctemp)
1283 if (idxver .eq. 1)
then
1284 call g2_gbytec1(cindex, iskp7, ixds1 * int1_bits, int4_bits)
1287 call g2_gbytec81(cindex, iskp78, ixds2 * int1_bits, int8_bits)
1290 write(
g2_log_msg, *)
'getgb2rp2: iskp78', iskp78,
'IXDS2', ixds2
1295 call bareadl(lugb, iskip8 + iskp78, 4_8, lread8, ctemp)
1299 allocate(csec7(len7))
1301 call bareadl(lugb, iskip8 + iskp78, len7_8, lread8, csec7)
1304 write(
g2_log_msg, *)
'getgb2rp2: len0 ', len0,
'len1', len1,
'len2', len2 ,
'len3', len3
1306 write(
g2_log_msg, *)
'getgb2rp2: len4', len4,
'len5', len5,
'len5', len5,
'len6', len6,
'len7', len7,
'len8', len8
1311 leng8 = len0 + len1 + len2 + len3 + len4 + len5 + len6 + len7 + len8
1314 write(
g2_log_msg, *)
'getgb2rp2: len7 ', len7,
'lread8', lread8,
'calculated leng8', leng8
1319 if (.not.
associated(gribm))
allocate(gribm(leng8))
1328 gribm(7) = cindex(42 + inc)
1329 gribm(8) = cindex(41 + inc)
1330 call g2_sbytec81(gribm, leng8, int8_bits, int8_bits)
1333 write(
g2_log_msg, *)
'getgb2rp2: gribm(7) (discipline)', ichar(gribm(7)), &
1334 'gibm(8) (GRIB version)', ichar(gribm(8))
1339 gribm(17:16 + len1) = cindex(45 + inc:44 + inc + len1)
1341 ipos = 44 + inc + len1
1344 if (iskp2_8 .gt. 0)
then
1345 gribm(lencur + 1:lencur + len2) = csec2(1:len2)
1346 lencur = lencur + len2
1350 write(
g2_log_msg, *)
'getgb2rp2: copied 1, 2'
1355 gribm(lencur + 1:lencur + len3 + len4 + len5) = cindex(ipos + 1:ipos + len3 + len4 + len5)
1356 lencur = lencur + len3 + len4 + len5
1357 ipos = ipos + len3 + len4 + len5
1360 write(
g2_log_msg, *)
'getgb2rp2: copied 3, 4, 5'
1365 if (len6 .eq. 6 .and. ibmap .ne. 254)
then
1366 gribm(lencur + 1:lencur + len6) = cindex(ipos + 1:ipos + len6)
1367 lencur = lencur + len6
1369 if (idxver .eq. 1)
then
1370 call g2_gbytec1(cindex, iskp6, ixbms1 * int1_bits, int4_bits)
1373 call g2_gbytec81(cindex, iskp68, ixbms2 * int1_bits, int8_bits)
1376 write(
g2_log_msg, *)
'getgb2rp2: iskp68', iskp68
1379 call bareadl(lugb, iskip8 + iskp68, 4_8, lread8, ctemp)
1385 allocate(csec6(len6))
1387 call bareadl(lugb, iskip8 + iskp68, len6_8, lread8, csec6)
1388 gribm(lencur + 1:lencur + len6) = csec6(1:len6)
1389 lencur = lencur + len6
1390 if (
allocated(csec6))
deallocate(csec6)
1394 write(
g2_log_msg, *)
'getgb2rp2: copied 6, len7', len7
1399 gribm(lencur + 1:lencur + len7) = csec7(1:len7)
1400 lencur = lencur + len7
1408 gribm(lencur + 1) =
'7'
1409 gribm(lencur + 2) =
'7'
1410 gribm(lencur + 3) =
'7'
1411 gribm(lencur + 4) =
'7'
1414 if (
allocated(csec2))
deallocate(csec2)
1415 if (
allocated(csec7))
deallocate(csec7)
1417 if (idxver .eq. 1)
then
1418 call g2_gbytec1(cindex, iskip, mypos, int4_bits)
1419 mypos = mypos + int4_bits
1420 mypos = mypos + 6 * int4_bits
1423 call g2_gbytec81(cindex, iskip8, mypos, int8_bits)
1424 mypos = mypos + int8_bits
1425 mypos = mypos + 6 * int8_bits
1429 call g2_gbytec8(cindex, leng8, mypos, int8_bits)
1431 write(
g2_log_msg, *)
' iskip8 ', iskip8,
' mypos/8 ', mypos/8,
'index leng8 ', leng8
1436 if (.not.
associated(gribm))
allocate(gribm(leng8))
1439 call bareadl(lugb, iskip8, leng8, lread8, gribm)
1440 if (leng8 .ne. lread8)
then
1447 write(
g2_log_msg, *)
' read message into gribm, lread8', lread8