NCEPLIBS-g2  3.4.5
getfield.f
Go to the documentation of this file.
1 
6 
92 
93  subroutine getfield(cgrib,lcgrib,ifldnum,igds,igdstmpl,igdslen,
94  & ideflist,idefnum,ipdsnum,ipdstmpl,ipdslen,
95  & coordlist,numcoord,ndpts,idrsnum,idrstmpl,
96  & idrslen,ibmap,bmap,fld,ierr)
97 
98  character(len=1),intent(in) :: cgrib(lcgrib)
99  integer,intent(in) :: lcgrib,ifldnum
100  integer,intent(out) :: igds(*),igdstmpl(*),ideflist(*)
101  integer,intent(out) :: ipdsnum,ipdstmpl(*)
102  integer,intent(out) :: idrsnum,idrstmpl(*)
103  integer,intent(out) :: ndpts,ibmap,idefnum,numcoord
104  integer,intent(out) :: ierr
105  logical*1,intent(out) :: bmap(*)
106  real,intent(out) :: fld(*),coordlist(*)
107 
108  character(len=4),parameter :: grib='GRIB',c7777='7777'
109  character(len=4) :: ctemp
110  integer:: listsec0(2)
111  integer iofst,ibeg,istart
112  integer(4) :: ieee
113  logical have3,have4,have5,have6,have7
114 
115  have3=.false.
116  have4=.false.
117  have5=.false.
118  have6=.false.
119  have7=.false.
120  ierr=0
121  numfld=0
122 !
123 ! Check for valid request number
124 !
125  if (ifldnum.le.0) then
126  print *,'getfield: Request for field number must be positive.'
127  ierr=3
128  return
129  endif
130 !
131 ! Check for beginning of GRIB message in the first 100 bytes
132 !
133  istart=0
134  do j=1,100
135  ctemp=cgrib(j)//cgrib(j+1)//cgrib(j+2)//cgrib(j+3)
136  if (ctemp.eq.grib ) then
137  istart=j
138  exit
139  endif
140  enddo
141  if (istart.eq.0) then
142  print *,'getfield: Beginning characters GRIB not found.'
143  ierr=1
144  return
145  endif
146 !
147 ! Unpack Section 0 - Indicator Section
148 !
149  iofst=8*(istart+5)
150  call g2_gbytec(cgrib,listsec0(1),iofst,8) ! Discipline
151  iofst=iofst+8
152  call g2_gbytec(cgrib,listsec0(2),iofst,8) ! GRIB edition number
153  iofst=iofst+8
154  iofst=iofst+32
155  call g2_gbytec(cgrib,lengrib,iofst,32) ! Length of GRIB message
156  iofst=iofst+32
157  lensec0=16
158  ipos=istart+lensec0
159 !
160 ! Currently handles only GRIB Edition 2.
161 !
162  if (listsec0(2).ne.2) then
163  print *,'getfield: can only decode GRIB edition 2.'
164  ierr=2
165  return
166  endif
167 !
168 ! Loop through the remaining sections keeping track of the
169 ! length of each. Also keep the latest Grid Definition Section info.
170 ! Unpack the requested field number.
171 !
172  do
173  ! Check to see if we are at end of GRIB message
174  ctemp=cgrib(ipos)//cgrib(ipos+1)//cgrib(ipos+2)//cgrib(ipos+3)
175  if (ctemp.eq.c7777 ) then
176  ipos=ipos+4
177  ! If end of GRIB message not where expected, issue error
178  if (ipos.ne.(istart+lengrib)) then
179  print *,'getfield: "7777" found, but not where expected.'
180  ierr=4
181  return
182  endif
183  exit
184  endif
185  ! Get length of Section and Section number
186  iofst=(ipos-1)*8
187  call g2_gbytec(cgrib,lensec,iofst,32) ! Get Length of Section
188  iofst=iofst+32
189  call g2_gbytec(cgrib,isecnum,iofst,8) ! Get Section number
190  iofst=iofst+8
191  !print *,' lensec= ',lensec,' secnum= ',isecnum
192  !
193  ! If found Section 3, unpack the GDS info using the
194  ! appropriate template. Save in case this is the latest
195  ! grid before the requested field.
196  !
197  if (isecnum.eq.3) then
198  iofst=iofst-40 ! reset offset to beginning of section
199  call unpack3(cgrib,lcgrib,iofst,igds,igdstmpl,igdslen,
200  & ideflist,idefnum,jerr)
201  if (jerr.eq.0) then
202  have3=.true.
203  else
204  ierr=10
205  return
206  endif
207  endif
208  !
209  ! If found Section 4, check to see if this field is the
210  ! one requested.
211  !
212  if (isecnum.eq.4) then
213  numfld=numfld+1
214  if (numfld.eq.ifldnum) then
215  iofst=iofst-40 ! reset offset to beginning of section
216  call unpack4(cgrib,lcgrib,iofst,ipdsnum,ipdstmpl,ipdslen,
217  & coordlist,numcoord,jerr)
218  if (jerr.eq.0) then
219  have4=.true.
220  else
221  ierr=11
222  return
223  endif
224  endif
225  endif
226  !
227  ! If found Section 5, check to see if this field is the
228  ! one requested.
229  !
230  if ((isecnum.eq.5).and.(numfld.eq.ifldnum)) then
231  iofst=iofst-40 ! reset offset to beginning of section
232  call unpack5(cgrib,lcgrib,iofst,ndpts,idrsnum,idrstmpl,
233  & idrslen,jerr)
234  if (jerr.eq.0) then
235  have5=.true.
236  else
237  ierr=12
238  return
239  endif
240  endif
241  !
242  ! If found Section 6, Unpack bitmap.
243  ! Save in case this is the latest
244  ! bitmap before the requested field.
245  !
246  if (isecnum.eq.6) then
247  iofst=iofst-40 ! reset offset to beginning of section
248  call unpack6(cgrib,lcgrib,iofst,igds(2),ibmap,bmap,jerr)
249  if (jerr.eq.0) then
250  have6=.true.
251  else
252  ierr=13
253  return
254  endif
255  endif
256  !
257  ! If found Section 7, check to see if this field is the
258  ! one requested.
259  !
260  if ((isecnum.eq.7).and.(numfld.eq.ifldnum)) then
261  if (idrsnum.eq.0) then
262  call simunpack(cgrib(ipos+5),lensec-6,idrstmpl,ndpts,fld)
263  have7=.true.
264  elseif (idrsnum.eq.2.or.idrsnum.eq.3) then
265  call comunpack(cgrib(ipos+5),lensec-6,lensec,idrsnum,
266  & idrstmpl,ndpts,fld,ier)
267  if ( ier .ne. 0 ) then
268  ierr=14
269  return
270  endif
271  have7=.true.
272  elseif (idrsnum.eq.50) then
273  call simunpack(cgrib(ipos+5),lensec-6,idrstmpl,ndpts-1,
274  & fld(2))
275  ieee=idrstmpl(5)
276  call rdieee(ieee,fld(1),1)
277  have7=.true.
278  elseif (idrsnum.eq.40 .OR. idrsnum.eq.40000) then
279  call jpcunpack(cgrib(ipos+5),lensec-5,idrstmpl,ndpts,fld)
280  have7=.true.
281  elseif (idrsnum.eq.41 .OR. idrsnum.eq.40010) then
282  call pngunpack(cgrib(ipos+5),lensec-5,idrstmpl,ndpts,fld)
283  have7=.true.
284  else
285  print *,'getfield: Data Representation Template ',idrsnum,
286  & ' not yet implemented.'
287  ierr=9
288  return
289  endif
290  endif
291  !
292  ! Check to see if we read pass the end of the GRIB
293  ! message and missed the terminator string '7777'.
294  !
295  ipos=ipos+lensec ! Update beginning of section pointer
296  if (ipos.gt.(istart+lengrib)) then
297  print *,'getfield: "7777" not found at end of GRIB message.'
298  ierr=7
299  return
300  endif
301 
302  if (have3.and.have4.and.have5.and.have6.and.have7) return
303 
304  enddo
305 
306 !
307 ! If exited from above loop, the end of the GRIB message was reached
308 ! before the requested field was found.
309 !
310  print *,'getfield: GRIB message contained ',numlocal,
311  & ' different fields.'
312  print *,'getfield: The request was for the ',ifldnum,
313  & ' field.'
314  ierr=6
315 
316  return
317  end
318 
351  subroutine unpack3(cgrib,lcgrib,iofst,igds,igdstmpl,
352  & mapgridlen,ideflist,idefnum,ierr)
353 
354  use gridtemplates
355 
356  character(len=1),intent(in) :: cgrib(lcgrib)
357  integer,intent(in) :: lcgrib
358  integer,intent(inout) :: iofst
359  integer,intent(out) :: igds(*),igdstmpl(*),ideflist(*)
360  integer,intent(out) :: ierr,idefnum
361 
362  integer,allocatable :: mapgrid(:)
363  integer :: mapgridlen,ibyttem
364  logical needext
365 
366  ierr=0
367 
368  call g2_gbytec(cgrib,lensec,iofst,32) ! Get Length of Section
369  iofst=iofst+32
370  iofst=iofst+8 ! skip section number
371 
372  call g2_gbytec(cgrib,igds(1),iofst,8) ! Get source of Grid def.
373  iofst=iofst+8
374  call g2_gbytec(cgrib,igds(2),iofst,32) ! Get number of grid pts.
375  iofst=iofst+32
376  call g2_gbytec(cgrib,igds(3),iofst,8) ! Get num octets for opt. list
377  iofst=iofst+8
378  call g2_gbytec(cgrib,igds(4),iofst,8) ! Get interpret. for opt. list
379  iofst=iofst+8
380  call g2_gbytec(cgrib,igds(5),iofst,16) ! Get Grid Def Template num.
381  iofst=iofst+16
382  if (igds(1).eq.0) then
383 ! if (igds(1).eq.0.OR.igds(1).eq.255) then ! FOR ECMWF TEST ONLY
384  allocate(mapgrid(lensec))
385  ! Get Grid Definition Template
386  call getgridtemplate(igds(5),mapgridlen,mapgrid,needext,
387  & iret)
388  if (iret.ne.0) then
389  ierr=5
390  return
391  endif
392  else
393 ! igdstmpl=-1
394  mapgridlen=0
395  needext=.false.
396  endif
397  !
398  ! Unpack each value into array igdstmpl from the
399  ! the appropriate number of octets, which are specified in
400  ! corresponding entries in array mapgrid.
401  !
402  ibyttem=0
403  do i=1,mapgridlen
404  nbits=iabs(mapgrid(i))*8
405  if ( mapgrid(i).ge.0 ) then
406  call g2_gbytec(cgrib,igdstmpl(i),iofst,nbits)
407  else
408  call g2_gbytec(cgrib,isign,iofst,1)
409  call g2_gbytec(cgrib,igdstmpl(i),iofst+1,nbits-1)
410  if (isign.eq.1) igdstmpl(i)=-igdstmpl(i)
411  endif
412  iofst=iofst+nbits
413  ibyttem=ibyttem+iabs(mapgrid(i))
414  enddo
415  !
416  ! Check to see if the Grid Definition Template needs to be
417  ! extended.
418  ! The number of values in a specific template may vary
419  ! depending on data specified in the "static" part of the
420  ! template.
421  !
422  if ( needext ) then
423  call extgridtemplate(igds(5),igdstmpl,newmapgridlen,mapgrid)
424  ! Unpack the rest of the Grid Definition Template
425  do i=mapgridlen+1,newmapgridlen
426  nbits=iabs(mapgrid(i))*8
427  if ( mapgrid(i).ge.0 ) then
428  call g2_gbytec(cgrib,igdstmpl(i),iofst,nbits)
429  else
430  call g2_gbytec(cgrib,isign,iofst,1)
431  call g2_gbytec(cgrib,igdstmpl(i),iofst+1,nbits-1)
432  if (isign.eq.1) igdstmpl(i)=-igdstmpl(i)
433  endif
434  iofst=iofst+nbits
435  ibyttem=ibyttem+iabs(mapgrid(i))
436  enddo
437  mapgridlen=newmapgridlen
438  endif
439  !
440  ! Unpack optional list of numbers defining number of points
441  ! in each row or column, if included. This is used for non regular
442  ! grids.
443  !
444  if ( igds(3).ne.0 ) then
445  nbits=igds(3)*8
446  idefnum=(lensec-14-ibyttem)/igds(3)
447  call g2_gbytesc(cgrib,ideflist,iofst,nbits,0,idefnum)
448  iofst=iofst+(nbits*idefnum)
449  else
450  idefnum=0
451  endif
452  if( allocated(mapgrid) ) deallocate(mapgrid)
453  return ! End of Section 3 processing
454  end
455 
480  subroutine unpack4(cgrib,lcgrib,iofst,ipdsnum,ipdstmpl,mappdslen,
481  & coordlist,numcoord,ierr)
482 
483  use pdstemplates
484 
485  character(len=1),intent(in) :: cgrib(lcgrib)
486  integer,intent(in) :: lcgrib
487  integer,intent(inout) :: iofst
488  real,intent(out) :: coordlist(*)
489  integer,intent(out) :: ipdsnum,ipdstmpl(*)
490  integer,intent(out) :: ierr,numcoord
491 
492  real(4),allocatable :: coordieee(:)
493  integer,allocatable :: mappds(:)
494  integer :: mappdslen
495  logical needext
496 
497  ierr=0
498 
499  call g2_gbytec(cgrib,lensec,iofst,32) ! Get Length of Section
500  iofst=iofst+32
501  iofst=iofst+8 ! skip section number
502  allocate(mappds(lensec))
503 
504  call g2_gbytec(cgrib,numcoord,iofst,16) ! Get num of coordinate values
505  iofst=iofst+16
506  call g2_gbytec(cgrib,ipdsnum,iofst,16) ! Get Prod. Def Template num.
507  iofst=iofst+16
508  ! Get Product Definition Template
509  call getpdstemplate(ipdsnum,mappdslen,mappds,needext,iret)
510  if (iret.ne.0) then
511  ierr=5
512  return
513  endif
514  !
515  ! Unpack each value into array ipdstmpl from the
516  ! the appropriate number of octets, which are specified in
517  ! corresponding entries in array mappds.
518  !
519  do i=1,mappdslen
520  nbits=iabs(mappds(i))*8
521  if ( mappds(i).ge.0 ) then
522  call g2_gbytec(cgrib,ipdstmpl(i),iofst,nbits)
523  else
524  call g2_gbytec(cgrib,isign,iofst,1)
525  call g2_gbytec(cgrib,ipdstmpl(i),iofst+1,nbits-1)
526  if (isign.eq.1) ipdstmpl(i)=-ipdstmpl(i)
527  endif
528  iofst=iofst+nbits
529  enddo
530  !
531  ! Check to see if the Product Definition Template needs to be
532  ! extended.
533  ! The number of values in a specific template may vary
534  ! depending on data specified in the "static" part of the
535  ! template.
536  !
537  if ( needext ) then
538  call extpdstemplate(ipdsnum,ipdstmpl,newmappdslen,mappds)
539  ! Unpack the rest of the Product Definition Template
540  do i=mappdslen+1,newmappdslen
541  nbits=iabs(mappds(i))*8
542  if ( mappds(i).ge.0 ) then
543  call g2_gbytec(cgrib,ipdstmpl(i),iofst,nbits)
544  else
545  call g2_gbytec(cgrib,isign,iofst,1)
546  call g2_gbytec(cgrib,ipdstmpl(i),iofst+1,nbits-1)
547  if (isign.eq.1) ipdstmpl(i)=-ipdstmpl(i)
548  endif
549  iofst=iofst+nbits
550  enddo
551  mappdslen=newmappdslen
552  endif
553  !
554  ! Get Optional list of vertical coordinate values
555  ! after the Product Definition Template, if necessary.
556  !
557  if ( numcoord .ne. 0 ) then
558  allocate (coordieee(numcoord))
559  call g2_gbytesc(cgrib,coordieee,iofst,32,0,numcoord)
560  call rdieee(coordieee,coordlist,numcoord)
561  deallocate (coordieee)
562  iofst=iofst+(32*numcoord)
563  endif
564  if( allocated(mappds) ) deallocate(mappds)
565  return ! End of Section 4 processing
566  end
567 
587 
588  subroutine unpack5(cgrib,lcgrib,iofst,ndpts,idrsnum,idrstmpl,
589  & mapdrslen,ierr)
590 
591  use drstemplates
592 
593  character(len=1),intent(in) :: cgrib(lcgrib)
594  integer,intent(in) :: lcgrib
595  integer,intent(inout) :: iofst
596  integer,intent(out) :: ndpts,idrsnum,idrstmpl(*)
597  integer,intent(out) :: ierr
598 
599 ! integer,allocatable :: mapdrs(:)
600  integer,allocatable :: mapdrs(:)
601  integer :: mapdrslen
602  logical needext
603 
604  ierr=0
605 
606  call g2_gbytec(cgrib,lensec,iofst,32) ! Get Length of Section
607  iofst=iofst+32
608  iofst=iofst+8 ! skip section number
609  allocate(mapdrs(lensec))
610 
611  call g2_gbytec(cgrib,ndpts,iofst,32) ! Get num of data points
612  iofst=iofst+32
613  call g2_gbytec(cgrib,idrsnum,iofst,16) ! Get Data Rep Template Num.
614  iofst=iofst+16
615  ! Gen Data Representation Template
616  call getdrstemplate(idrsnum,mapdrslen,mapdrs,needext,iret)
617  if (iret.ne.0) then
618  ierr=7
619  return
620  endif
621  !
622  ! Unpack each value into array ipdstmpl from the
623  ! the appropriate number of octets, which are specified in
624  ! corresponding entries in array mappds.
625  !
626  do i=1,mapdrslen
627  nbits=iabs(mapdrs(i))*8
628  if ( mapdrs(i).ge.0 ) then
629  call g2_gbytec(cgrib,idrstmpl(i),iofst,nbits)
630  else
631  call g2_gbytec(cgrib,isign,iofst,1)
632  call g2_gbytec(cgrib,idrstmpl(i),iofst+1,nbits-1)
633  if (isign.eq.1) idrstmpl(i)=-idrstmpl(i)
634  endif
635  iofst=iofst+nbits
636  enddo
637  !
638  ! Check to see if the Data Representation Template needs to be
639  ! extended.
640  ! The number of values in a specific template may vary
641  ! depending on data specified in the "static" part of the
642  ! template.
643  !
644  if ( needext ) then
645  call extdrstemplate(idrsnum,idrstmpl,newmapdrslen,mapdrs)
646  ! Unpack the rest of the Data Representation Template
647  do i=mapdrslen+1,newmapdrslen
648  nbits=iabs(mapdrs(i))*8
649  if ( mapdrs(i).ge.0 ) then
650  call g2_gbytec(cgrib,idrstmpl(i),iofst,nbits)
651  else
652  call g2_gbytec(cgrib,isign,iofst,1)
653  call g2_gbytec(cgrib,idrstmpl(i),iofst+1,nbits-1)
654  if (isign.eq.1) idrstmpl(i)=-idrstmpl(i)
655  endif
656  iofst=iofst+nbits
657  enddo
658  mapdrslen=newmapdrslen
659  endif
660  if( allocated(mapdrs) ) deallocate(mapdrs)
661  return ! End of Section 5 processing
662  end
663 
683  subroutine unpack6(cgrib,lcgrib,iofst,ngpts,ibmap,bmap,ierr)
684 
685  character(len=1),intent(in) :: cgrib(lcgrib)
686  integer,intent(in) :: lcgrib,ngpts
687  integer,intent(inout) :: iofst
688  integer,intent(out) :: ibmap
689  integer,intent(out) :: ierr
690  logical*1,intent(out) :: bmap(ngpts)
691 
692  integer :: intbmap(ngpts)
693 
694  ierr=0
695 
696  iofst=iofst+32 ! skip Length of Section
697  iofst=iofst+8 ! skip section number
698 
699  call g2_gbytec(cgrib,ibmap,iofst,8) ! Get bit-map indicator
700  iofst=iofst+8
701 
702  if (ibmap.eq.0) then ! Unpack bitmap
703  call g2_gbytesc(cgrib,intbmap,iofst,1,0,ngpts)
704  iofst=iofst+ngpts
705  do j=1,ngpts
706  bmap(j)=.true.
707  if (intbmap(j).eq.0) bmap(j)=.false.
708  enddo
709  elseif (ibmap.eq.254) then ! Use previous bitmap
710  return
711  elseif (ibmap.eq.255) then ! No bitmap in message
712  bmap(1:ngpts)=.true.
713  else
714  print *,'unpack6: Predefined bitmap ',ibmap,' not recognized.'
715  ierr=4
716  endif
717 
718  return ! End of Section 6 processing
719  end
720 
pdstemplates::extpdstemplate
subroutine extpdstemplate(number, list, nummap, map)
This subroutine generates the remaining octet map for a given Product Definition Template,...
Definition: pdstemplates.f:459
drstemplates
This Fortran Module contains info on all the available GRIB2 Data Representation Templates used in Se...
Definition: drstemplates.f:37
drstemplates::getdrstemplate
subroutine getdrstemplate(number, nummap, map, needext, iret)
This subroutine returns DRS template information for a .
Definition: drstemplates.f:165
pdstemplates::getpdstemplate
subroutine getpdstemplate(number, nummap, map, needext, iret)
This subroutine returns PDS template information for a specified Product Definition Template 4....
Definition: pdstemplates.f:412
rdieee
subroutine rdieee(rieee, a, num)
This subroutine reads a list of real values in 32-bit IEEE floating point format.
Definition: rdieee.f:16
unpack5
subroutine unpack5(cgrib, lcgrib, iofst, ndpts, idrsnum, idrstmpl, mapdrslen, ierr)
This subroutine unpacks Section 5 (Data Representation Section) starting at octet 6 of that Section.
Definition: getfield.f:590
gridtemplates::extgridtemplate
subroutine extgridtemplate(number, list, nummap, map)
This subroutine generates the remaining octet map for a given Grid Definition Template,...
Definition: gridtemplates.f:341
getfield
subroutine getfield(cgrib, lcgrib, ifldnum, igds, igdstmpl, igdslen, ideflist, idefnum, ipdsnum, ipdstmpl, ipdslen, coordlist, numcoord, ndpts, idrsnum, idrstmpl, idrslen, ibmap, bmap, fld, ierr)
This subroutine returns the Grid Definition, Product Definition, Bit-map (if applicable),...
Definition: getfield.f:97
gridtemplates::getgridtemplate
subroutine getgridtemplate(number, nummap, map, needext, iret)
This subroutine grid template information for a specified Grid Definition Template 3....
Definition: gridtemplates.f:296
unpack3
subroutine unpack3(cgrib, lcgrib, iofst, igds, igdstmpl, mapgridlen, ideflist, idefnum, ierr)
This subroutine unpacks Section 3 (Grid Definition Section) starting at octet 6 of that Section.
Definition: getfield.f:353
jpcunpack
subroutine jpcunpack(cpack, len, idrstmpl, ndpts, fld)
This subroutine unpacks a data field that was packed into a JPEG2000 code stream using info from the ...
Definition: jpcunpack.f:21
drstemplates::extdrstemplate
subroutine extdrstemplate(number, list, nummap, map)
This subroutine generates the remaining octet map for a given Data Representation Template,...
Definition: drstemplates.f:207
comunpack
subroutine comunpack(cpack, len, lensec, idrsnum, idrstmpl, ndpts, fld, ier)
This subroutine unpacks a data field that was packed using a complex packing algorithm as defined in ...
Definition: comunpack.f:37
pdstemplates
This Fortran Module contains info on all the available GRIB2 Product Definition Templates used in Sec...
Definition: pdstemplates.f:54
gridtemplates
This Fortran Module contains info on all the available GRIB2 Grid Definition Templates used in Sectio...
Definition: gridtemplates.f:45
unpack6
subroutine unpack6(cgrib, lcgrib, iofst, ngpts, ibmap, bmap, ierr)
This subroutine unpacks Section 6 (Bit-Map Section) starting at octet 6 of that Section.
Definition: getfield.f:684
pngunpack
subroutine pngunpack(cpack, len, idrstmpl, ndpts, fld)
This subroutine unpacks a data field that was packed into a PNG image format using info from the GRIB...
Definition: pngunpack.f:22
g2_gbytec
subroutine g2_gbytec(IN, IOUT, ISKIP, NBYTE)
This subrountine is to extract arbitrary size values from a packed bit string, right justifying each ...
Definition: g2_gbytesc.f:20
unpack4
subroutine unpack4(cgrib, lcgrib, iofst, ipdsnum, ipdstmpl, mappdslen, coordlist, numcoord, ierr)
This subroutine unpacks Section 4 (Product Definition Section) starting at octet 6 of that Section.
Definition: getfield.f:482
g2_gbytesc
subroutine g2_gbytesc(IN, IOUT, ISKIP, NBYTE, NSKIP, N)
This subrountine is to extract arbitrary size values from a packed bit string, right justifying each ...
Definition: g2_gbytesc.f:60
simunpack
subroutine simunpack(cpack, len, idrstmpl, ndpts, fld)
This subroutine unpacks a data field that was packed using a simple packing algorithm as defined in t...
Definition: simunpack.f:21