1 subroutine getpoly
(csec3
,lcsec3
,jj
,kk
,mm
)
2 !$$$ SUBPROGRAM DOCUMENTATION BLOCK
5 ! PRGMMR
: Gilbert ORG
: W
/NP11
DATE: 2002-12-11
7 ! ABSTRACT
: This
subroutine returns the J
, K
, and M pentagonal resolution
8 ! parameters specified in a GRIB Grid Definition Section used
9 ! spherical harmonic coefficients using GDT
5.50 through
5.53
11 ! PROGRAM HISTORY LOG
:
14 ! USAGE
: CALL getpoly
(csec3
,lcsec3
,jj
,kk
,mm
)
15 ! INPUT ARGUMENT LIST
:
16 ! csec3
- Character array that contains the packed GRIB2 GDS
17 ! lcsec3
- Length
(in octets
) of section
3
19 ! OUTPUT ARGUMENT LIST
:
20 ! JJ
= J
- pentagonal resolution
parameter
21 ! KK
= K
- pentagonal resolution
parameter
22 ! MM
= M
- pentagonal resolution
parameter
24 ! REMARKS
: Returns JJ
, KK
, and MM set
to zero
, if grid template
28 ! LANGUAGE
: Fortran
90
34 character(len
=1),intent
(in
) :: csec3
(*)
35 integer,intent
(in
) :: lcsec3
36 integer,intent
(out
) :: jj
,kk
,mm
38 integer,pointer
,dimension(:) :: igdstmpl
,list_opt
40 integer iofst
,igdtlen
,num_opt
,jerr
43 subroutine gf_unpack3
(cgrib
,lcgrib
,iofst
,igds
,igdstmpl
,
44 & mapgridlen
,ideflist
,idefnum
,ierr
)
45 character(len
=1),intent
(in
) :: cgrib
(lcgrib
)
46 integer,intent
(in
) :: lcgrib
47 integer,intent
(inout
) :: iofst
48 integer,pointer
,dimension(:) :: igdstmpl
,ideflist
49 integer,intent
(out
) :: igds
(5)
50 integer,intent
(out
) :: ierr
,idefnum
51 end subroutine gf_unpack3
54 nullify
(igdstmpl
,list_opt
)
56 iofst
=0 ! set offset
to beginning of section
57 call gf_unpack3
(csec3
,lcsec3
,iofst
,igds
,igdstmpl
,
58 & igdtlen
,list_opt
,num_opt
,jerr
)
60 selectcase
( igds
(5) ) ! Template number
61 case
(50:53) ! Spherical harmonic coefficients
76 if (associated
(igdstmpl
)) deallocate
(igdstmpl
)
77 if (associated
(list_opt
)) deallocate
(list_opt
)