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

📄 grib2.doc

📁 计算线性趋势 回归系数 主要用于气象站点值的线性趋势计算
💻 DOC
📖 第 1 页 / 共 5 页
字号:
!   and "gribend" to create a complete GRIB2 message.  Subroutine!   gribcreate must be called first to initialize a new GRIB2 message.!! PROGRAM HISTORY LOG:! 2000-05-01  Gilbert!! USAGE:    CALL addlocal(cgrib,lcgrib,csec2,lcsec2,ierr)!   INPUT ARGUMENT LIST:!     cgrib    - Character array to contain the GRIB2 message!     lcgrib   - Maximum length (bytes) of array cgrib.!     csec2    - Character array containing information to be added to!                Section 2.!     lcsec2   - Number of bytes of character array csec2 to be added to!                Section 2.!!   OUTPUT ARGUMENT LIST:      !     cgrib    - Character array to contain the GRIB2 message!     ierr     - Error return code.!                0 = no error!                1 = GRIB message was not initialized.  Need to call!                    routine gribcreate first.!                2 = GRIB message already complete.  Cannot add new section.!                3 = Sum of Section byte counts doesn't add to total byte count.!                4 = Previous Section was not 1 or 7.!! REMARKS: Note that the Local Use Section ( Section 2 ) can only follow!          Section 1 or Section 7 in a GRIB2 message.!! ATTRIBUTES:!   LANGUAGE: Fortran 90!   MACHINE:  IBM SP!!$$$!$$$  SUBPROGRAM DOCUMENTATION BLOCK!                .      .    .                                       .! SUBPROGRAM:    addgrid !   PRGMMR: Gilbert         ORG: W/NP11    DATE: 2000-05-01!! ABSTRACT: This subroutine packs up a Grid Definition Section (Section 3) !   and adds it to a GRIB2 message.!   This routine is used with routines "gribcreate", "addlocal", "addfield",!   and "gribend" to create a complete GRIB2 message.  Subroutine!   gribcreate must be called first to initialize a new GRIB2 message.!! PROGRAM HISTORY LOG:! 2000-05-01  Gilbert!! USAGE:    CALL addgrid(cgrib,lcgrib,igds,igdstmpl,igdstmplen,!                        ideflist,idefnum,ierr)!   INPUT ARGUMENT LIST:!     cgrib    - Character array to contain the GRIB2 message!     lcgrib   - Maximum length (bytes) of array cgrib.!     igds     - Contains information needed for GRIB Grid Definition Section 3.!                Must be dimensioned >= 5.!                igds(1)=Source of grid definition (see Code Table 3.0)!                igds(2)=Number of grid points in the defined grid.!                igds(3)=Number of octets needed for each !                            additional grid points definition.  !                            Used to define number of!                            points in each row ( or column ) for!                            non-regular grids.  !                            = 0, if using regular grid.!                igds(4)=Interpretation of list for optional points !                            definition.  (Code Table 3.11)!                igds(5)=Grid Definition Template Number (Code Table 3.1)!     igdstmpl - Contains the data values for the specified Grid Definition!                Template ( NN=igds(5) ).  Each element of this integer !                array contains an entry (in the order specified) of Grid!                Defintion Template 3.NN!   igdstmplen - Max dimension of igdstmpl()!     ideflist - (Used if igds(3) .ne. 0)  This array contains the!                number of grid points contained in each row ( or column )!      idefnum - (Used if igds(3) .ne. 0)  The number of entries!                in array ideflist.  i.e. number of rows ( or columns )!                for which optional grid points are defined.!!   OUTPUT ARGUMENT LIST:      !     cgrib    - Character array to contain the GRIB2 message!     ierr     - Error return code.!                0 = no error!                1 = GRIB message was not initialized.  Need to call!                    routine gribcreate first.!                2 = GRIB message already complete.  Cannot add new section.!                3 = Sum of Section byte counts doesn't add to total byte count.!                4 = Previous Section was not 1, 2 or 7.!                5 = Could not find requested Grid Definition Template.!! REMARKS: Note that the Local Use Section ( Section 2 ) can only follow!          Section 1 or Section 7 in a GRIB2 message.!! ATTRIBUTES:!   LANGUAGE: Fortran 90!   MACHINE:  IBM SP!!$$$!$$$  SUBPROGRAM DOCUMENTATION BLOCK!                .      .    .                                       .! SUBPROGRAM:    addfield !   PRGMMR: Gilbert         ORG: W/NP11    DATE: 2000-05-02!! ABSTRACT: This subroutine packs up Sections 4 through 7 for a given field!   and adds them to a GRIB2 message.  They are Product Definition Section,!   Data Representation Section, Bit-Map Section and Data Section, !   respectively.!   This routine is used with routines "gribcreate", "addlocal", "addgrid",!   and "gribend" to create a complete GRIB2 message.  Subroutine!   gribcreate must be called first to initialize a new GRIB2 message.!   Also, subroutine addgrid must be called after gribcreate and!   before this routine to add the appropriate grid description to!   the GRIB2 message.   Also, a call to gribend is required to complete !   GRIB2 message after all fields have been added.!! PROGRAM HISTORY LOG:! 2000-05-02  Gilbert! 2002-12-17  Gilbert  - Added support for new templates using!                        PNG and JPEG2000 algorithms/templates.! 2004-06-22  Gilbert  - Added check to determine if packing algorithm failed.!! USAGE:    CALL addfield(cgrib,lcgrib,ipdsnum,ipdstmpl,ipdstmplen,!                         coordlist,numcoord,idrsnum,idrstmpl,!                         idrstmplen,fld,ngrdpts,ibmap,bmap,ierr)!   INPUT ARGUMENT LIST:!     cgrib    - Character array to contain the GRIB2 message!     lcgrib   - Maximum length (bytes) of array cgrib.!     ipdsnum  - Product Definition Template Number ( see Code Table 4.0)!     ipdstmpl - Contains the data values for the specified Product Definition!                Template ( N=ipdsnum ).  Each element of this integer !                array contains an entry (in the order specified) of Product!                Defintion Template 4.N!   ipdstmplen - Max dimension of ipdstmpl()!     coordlist- Array containg floating point values intended to document!                the vertical discretisation associated to model data!                on hybrid coordinate vertical levels.!     numcoord - number of values in array coordlist.!     idrsnum  - Data Representation Template Number ( see Code Table 5.0 )!     idrstmpl - Contains the data values for the specified Data Representation!                Template ( N=idrsnum ).  Each element of this integer !                array contains an entry (in the order specified) of Data!                Representation Template 5.N!                Note that some values in this template (eg. reference!                values, number of bits, etc...) may be changed by the!                data packing algorithms.!                Use this to specify scaling factors and order of!                spatial differencing, if desired.!   idrstmplen - Max dimension of idrstmpl()!     fld()    - Array of data points to pack.!     ngrdpts  - Number of data points in grid.!                i.e.  size of fld and bmap.!     ibmap    - Bitmap indicator ( see Code Table 6.0 )!                0 = bitmap applies and is included in Section 6.!                1-253 = Predefined bitmap applies!                254 = Previously defined bitmap applies to this field!                255 = Bit map does not apply to this product.!     bmap()   - Logical*1 array containing bitmap to be added. !                ( if ibmap=0 or ibmap=254)!!   OUTPUT ARGUMENT LIST:      !     cgrib    - Character array to contain the GRIB2 message!     ierr     - Error return code.!                0 = no error!                1 = GRIB message was not initialized.  Need to call!                    routine gribcreate first.!                2 = GRIB message already complete.  Cannot add new section.!                3 = Sum of Section byte counts doesn't add to total byte count.!                4 = Previous Section was not 3 or 7.!                5 = Could not find requested Product Definition Template.!                6 = Section 3 (GDS) not previously defined in message!                7 = Tried to use unsupported Data Representationi Template!                8 = Specified use of a previously defined bitmap, but one!                    does not exist in the GRIB message.!                9 = GDT of one of 5.50 through 5.53 required to pack!                    using DRT 5.51!               10 = Error packing data field.!! REMARKS: Note that the Local Use Section ( Section 2 ) can only follow!          Section 1 or Section 7 in a GRIB2 message.!! ATTRIBUTES:!   LANGUAGE: Fortran 90!   MACHINE:  IBM SP!!$$$!$$$  SUBPROGRAM DOCUMENTATION BLOCK!                .      .    .                                       .! SUBPROGRAM:    gribend !   PRGMMR: Gilbert         ORG: W/NP11    DATE: 2000-05-02!! ABSTRACT: This subroutine finalizes a GRIB message after all grids!   and fields have been added.  It adds the End Section ( "7777" )!   to the end of the GRIB message and calculates the length and stores!   it in the appropriate place in Section 0.!   This routine is used with routines "gribcreate", "addlocal", "addgrid",!   and "addfield" to create a complete GRIB2 message.  Subroutine!   gribcreate must be called first to initialize a new GRIB2 message.!! PROGRAM HISTORY LOG:! 2000-05-02  Gilbert!! USAGE:    CALL gribend(cgrib,lcgrib,lengrib,ierr)!   INPUT ARGUMENT LIST:!     cgrib    - Character array to contain the GRIB2 message!     lcgrib   - Maximum length (bytes) of array cgrib.!!   OUTPUT ARGUMENT LIST:      !     cgrib    - Character array to contain the GRIB2 message!     lengrib  - Length of the final GRIB2 message in octets (bytes)!     ierr     - Error return code.!                0 = no error!                1 = GRIB message was not initialized.  Need to call!                    routine gribcreate first.!                2 = GRIB message already complete.  !                3 = Sum of Section byte counts doesn't add to total byte count.!                4 = Previous Section was not 7.!! REMARKS: This routine is intended for use with routines "gribcreate", !          "addlocal", "addgrid", and "addfield" to create a complete !          GRIB2 message.!! ATTRIBUTES:!   LANGUAGE: Fortran 90!   MACHINE:  IBM SP!!$$$!$$$  SUBPROGRAM DOCUMENTATION BLOCK!                .      .    .                                       .! SUBPROGRAM:    gb_info !   PRGMMR: Gilbert         ORG: W/NP11    DATE: 2000-05-25!! ABSTRACT: This subroutine searches through a GRIB2 message and!   returns the number of gridded fields found in the message and!   the number (and maximum size) of Local Use Sections.!   Also various checks  are performed!   to see if the message is a valid GRIB2 message.!! PROGRAM HISTORY LOG:! 2000-05-25  Gilbert!! USAGE:    CALL gb_info(cgrib,lcgrib,listsec0,listsec1,!     &                    numfields,numlocal,maxlocal,ierr)!   INPUT ARGUMENT LIST:

⌨️ 快捷键说明

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