⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pdstemplates.f

📁 计算线性趋势 回归系数 主要用于气象站点值的线性趋势计算
💻 F
📖 第 1 页 / 共 2 页
字号:
         subroutine getpdstemplate(number,nummap,map,needext,iret)!$$$  SUBPROGRAM DOCUMENTATION BLOCK!                .      .    .                                       .! SUBPROGRAM:    getpdstemplate !   PRGMMR: Gilbert         ORG: W/NP11    DATE: 2000-05-11!! ABSTRACT: This subroutine returns PDS template information for a !   specified Product Definition Template 4.NN.!   The number of entries in the template is returned along with a map!   of the number of octets occupied by each entry.  Also, a flag is!   returned to indicate whether the template would need to be extended.!! PROGRAM HISTORY LOG:! 2000-05-11  Gilbert!! USAGE:    CALL getpdstemplate(number,nummap,map,needext,iret)!   INPUT ARGUMENT LIST:!     number   - NN, indicating the number of the Product Definition !                Template 4.NN that is being requested.!!   OUTPUT ARGUMENT LIST:      !     nummap   - Number of entries in the Template!     map()    - An array containing the number of octets that each !                template entry occupies when packed up into the PDS.!     needext  - Logical variable indicating whether the Product Defintion!                Template has to be extended.  !     ierr     - Error return code.!                0 = no error!                1 = Undefine Product Template number.!! REMARKS: None!! ATTRIBUTES:!   LANGUAGE: Fortran 90!   MACHINE:  IBM SP!!$$$           integer,intent(in) :: number           integer,intent(out) :: nummap,map(*),iret           logical,intent(out) :: needext           iret=0           index=getpdsindex(number)           if (index.ne.-1) then              nummap=templates(index)%mappdslen              needext=templates(index)%needext              map(1:nummap)=templates(index)%mappds(1:nummap)           else             nummap=0             needext=.false.             print *,'getpdstemplate: PDS Template ',number,     &               ' not defined.'             iret=1           endif         end subroutine         subroutine extpdstemplate(number,list,nummap,map)!$$$  SUBPROGRAM DOCUMENTATION BLOCK!                .      .    .                                       .! SUBPROGRAM:    extpdstemplate !   PRGMMR: Gilbert         ORG: W/NP11    DATE: 2000-05-11!! ABSTRACT: This subroutine generates the remaining octet map for a!   given Product Definition Template, if required.  Some Templates can!   vary depending on data values given in an earlier part of the !   Template, and it is necessary to know some of the earlier entry!   values to generate the full octet map of the Template.!! PROGRAM HISTORY LOG:! 2000-05-11  Gilbert!! USAGE:    CALL extpdstemplate(number,list,nummap,map)!   INPUT ARGUMENT LIST:!     number   - NN, indicating the number of the Product Definition !                Template 4.NN that is being requested.!     list()   - The list of values for each entry in the !                the Product Definition Template 4.NN.!!   OUTPUT ARGUMENT LIST:      !     nummap   - Number of entries in the Template!     map()    - An array containing the number of octets that each !                template entry occupies when packed up into the GDS.!! ATTRIBUTES:!   LANGUAGE: Fortran 90!   MACHINE:  IBM SP!!$$$           integer,intent(in) :: number,list(*)           integer,intent(out) :: nummap,map(*)           index=getpdsindex(number)           if (index.eq.-1) return           if ( .not. templates(index)%needext ) return           nummap=templates(index)%mappdslen           map(1:nummap)=templates(index)%mappds(1:nummap)           if ( number.eq.3 ) then              N=list(27)              do i=1,N                map(nummap+i)=1              enddo              nummap=nummap+N           elseif ( number.eq.4 ) then              N=list(26)              do i=1,N                map(nummap+i)=1              enddo              nummap=nummap+N           elseif ( number.eq.8 ) then              if ( list(22).gt.1 ) then                do j=2,list(22)                  do k=1,6                    map(nummap+k)=map(23+k)                  enddo                  nummap=nummap+6                enddo              endif           elseif ( number.eq.9 ) then              if ( list(29).gt.1 ) then                do j=2,list(29)                  do k=1,6                    map(nummap+k)=map(30+k)                  enddo                  nummap=nummap+6                enddo              endif           elseif ( number.eq.10 ) then              if ( list(23).gt.1 ) then                do j=2,list(23)                  do k=1,6                    map(nummap+k)=map(24+k)                  enddo                  nummap=nummap+6                enddo              endif           elseif ( number.eq.11 ) then              if ( list(25).gt.1 ) then                do j=2,list(25)                  do k=1,6                    map(nummap+k)=map(26+k)                  enddo                  nummap=nummap+6                enddo              endif           elseif ( number.eq.12 ) then              if ( list(24).gt.1 ) then                do j=2,list(24)                  do k=1,6                    map(nummap+k)=map(25+k)                  enddo                  nummap=nummap+6                enddo              endif           elseif ( number.eq.13 ) then              if ( list(38).gt.1 ) then                do j=2,list(38)                  do k=1,6                    map(nummap+k)=map(39+k)                  enddo                  nummap=nummap+6                enddo              endif              N=list(27)              do i=1,N                map(nummap+i)=1              enddo              nummap=nummap+N           elseif ( number.eq.14 ) then              if ( list(37).gt.1 ) then                do j=2,list(37)                  do k=1,6                    map(nummap+k)=map(38+k)                  enddo                  nummap=nummap+6                enddo              endif              N=list(26)              do i=1,N                map(nummap+i)=1              enddo              nummap=nummap+N           elseif ( number.eq.30 ) then              do j=1,list(5)                map(nummap+1)=2                map(nummap+2)=2                map(nummap+3)=1                map(nummap+4)=1                map(nummap+5)=4                nummap=nummap+5              enddo           endif         end subroutine         integer function getpdtlen(number)!$$$  SUBPROGRAM DOCUMENTATION BLOCK!                .      .    .                                       .! SUBPROGRAM:    getpdtlen!   PRGMMR: Gilbert         ORG: W/NP11    DATE: 2004-05-11!! ABSTRACT: This function returns the initial length (number of entries) in !   the "static" part of specified Product Definition Template 4.number.!! PROGRAM HISTORY LOG:! 2004-05-11  Gilbert!! USAGE:    CALL getpdtlen(number)!   INPUT ARGUMENT LIST:!     number   - NN, indicating the number of the Product Definition !                Template 4.NN that is being requested.!! RETURNS:     Number of entries in the "static" part of PDT 4.number!              OR returns 0, if requested template is not found.!! REMARKS: If user needs the full length of a specific template that!    contains additional entries based on values set in the "static" part!    of the PDT, subroutine extpdstemplate can be used.!! ATTRIBUTES:!   LANGUAGE: Fortran 90!   MACHINE:  IBM SP!!$$$           integer,intent(in) :: number           getpdtlen=0           index=getpdsindex(number)           if (index.ne.-1) then              getpdtlen=templates(index)%mappdslen           endif         end function      end module

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -