source: lmdz_wrf/WRFV3/external/io_grib2/test_read_grib2map.F @ 1

Last change on this file since 1 was 1, checked in by lfita, 10 years ago
  • -- --- Opening of the WRF+LMDZ coupling repository --- -- -

WRF: version v3.3
LMDZ: version v1818

More details in:

File size: 1.3 KB
Line 
1PROGRAM test_read_grib2map
2
3  USE grib2tbls_types
4  Implicit None
5
6  INTERFACE
7     Subroutine load_grib2map (filename, grib2tbls)
8       USE grib2tbls_types
9       character*(*), intent(in)                   :: filename
10       TYPE(grib2tbls_type), dimension(:), pointer :: grib2tbls
11     END subroutine load_grib2map
12  END INTERFACE
13
14  TYPE(grib2tbls_type), dimension(:), pointer :: grib2tbls
15  character(200)                              :: filename = 'grib2map.tbl'
16
17  character*30              :: parmname
18  integer                   :: center, subcenter, MasterTblV, LocalTblV, &
19       Disc, Category, ParmNum, DecScl, BinScl
20  integer                   :: ierr
21
22
23  CALL load_grib2map(filename,grib2tbls)
24
25  parmname = 'T2'
26  CALL get_parminfo(parmname, center, subcenter, MasterTblV, &
27     LocalTblV, Disc, Category, ParmNum, DecScl, BinScl, ierr)
28
29  if (ierr .ne. 0) then
30     print *,'Could not find match for parameter: ',parmname
31  else
32     print *,'Found match: '
33     print *, '  center:    ',center
34     print *, '  subcenter: ',subcenter
35     print *, '  MasterTblV ',MasterTblV
36     print *, '  LocalTblV  ',LocalTblV
37     print *, '  Disc       ',Disc
38     print *, '  Category   ',Category
39     print *, '  ParmNum    ',ParmNum
40     print *, '  DecScl     ',DecScl
41     print *, '  BinScl     ',BinScl
42  endif
43 
44  CALL free_grib2map(grib2tbls)
45
46END PROGRAM
Note: See TracBrowser for help on using the repository browser.