NCEPLIBS-g2  3.5.0
params_ecmwf.F90
Go to the documentation of this file.
1 
5 
11 
12  integer, parameter :: maxparam=179
13 
14  type gribparam
15  integer :: g1tblver
16  integer :: grib1val
17  integer :: grib2dsc
18  integer :: grib2cat
19  integer :: grib2num
20  character(len=8) :: abbrev
21  end type gribparam
22 
23  type(gribparam), dimension(MAXPARAM) :: paramlist
24 
25  data paramlist(1) /gribparam(128, 1, 255, 255, 255, 'STRF')/
26  data paramlist(2) /gribparam(128, 002, 255, 255, 255, 'VPOT')/
27  data paramlist(3) /gribparam(128, 003, 255, 255, 255, 'THTA')/
28  data paramlist(4) /gribparam(128, 004, 255, 255, 255, 'THTE')/
29  data paramlist(5) /gribparam(128, 005, 255, 255, 255, 'THTS')/
30  data paramlist(6) /gribparam(128, 011, 255, 255, 255, 'UDVW')/
31  data paramlist(7) /gribparam(128, 012, 255, 255, 255, 'VDVW')/
32  data paramlist(8) /gribparam(128, 013, 255, 255, 255, 'URTW')/
33  data paramlist(9) /gribparam(128, 014, 255, 255, 255, 'VRTW')/
34  data paramlist(10) /gribparam(128, 021, 255, 255, 255, 'UCTP')/
35  data paramlist(11) /gribparam(128, 022, 255, 255, 255, 'UCLN')/
36  data paramlist(12) /gribparam(128, 023, 255, 255, 255, 'UCDV')/
37  data paramlist(13) /gribparam(128, 026, 255, 255, 255, 'CLAK')/
38  data paramlist(14) /gribparam(128, 027, 255, 255, 255, 'CVEGL')/
39  data paramlist(15) /gribparam(128, 028, 255, 255, 255, 'CVEGH')/
40  data paramlist(16) /gribparam(128, 029, 255, 255, 255, 'TVEGL')/
41  data paramlist(17) /gribparam(128, 030, 255, 255, 255, 'TVEGH')/
42  data paramlist(18) /gribparam(128, 031, 255, 255, 255, 'CSICE')/
43  data paramlist(19) /gribparam(128, 032, 255, 255, 255, 'ASNOW')/
44  data paramlist(20) /gribparam(128, 033, 255, 255, 255, 'RSNOW')/
45  data paramlist(21) /gribparam(128, 034, 255, 255, 255, 'SSTK')/
46  data paramlist(22) /gribparam(128, 035, 255, 255, 255, 'ISTL1')/
47  data paramlist(23) /gribparam(128, 036, 255, 255, 255, 'ISTL2')/
48  data paramlist(24) /gribparam(128, 037, 255, 255, 255, 'ISTL3')/
49  data paramlist(25) /gribparam(128, 038, 255, 255, 255, 'ISTL4')/
50  data paramlist(26) /gribparam(128, 039, 255, 255, 255, 'SWVL1')/
51  data paramlist(27) /gribparam(128, 040, 255, 255, 255, 'SWVL2')/
52  data paramlist(28) /gribparam(128, 041, 255, 255, 255, 'SWVL3')/
53  data paramlist(29) /gribparam(128, 042, 255, 255, 255, 'SWVL4')/
54  data paramlist(30) /gribparam(128, 043, 255, 255, 255, 'SOILT')/
55  data paramlist(31) /gribparam(128, 044, 255, 255, 255, 'ESNOW')/
56  data paramlist(32) /gribparam(128, 045, 255, 255, 255, 'SMLT')/
57  data paramlist(33) /gribparam(128, 046, 255, 255, 255, 'SDUR')/
58  data paramlist(34) /gribparam(128, 047, 255, 255, 255, 'DSRP')/
59  data paramlist(35) /gribparam(128, 048, 255, 255, 255, 'MAGSS')/
60  data paramlist(36) /gribparam(128, 049, 255, 255, 255, 'GUST')/
61  data paramlist(37) /gribparam(128, 050, 255, 255, 255, 'LSPF')/
62  data paramlist(38) /gribparam(128, 051, 255, 255, 255, 'TMXK24')/
63  data paramlist(39) /gribparam(128, 052, 255, 255, 255, 'TMNK24')/
64  data paramlist(40) /gribparam(128, 053, 255, 255, 255, 'MONT')/
65  data paramlist(41) /gribparam(128, 054, 255, 255, 255, 'PRES')/
66  data paramlist(42) /gribparam(128, 060, 255, 255, 255, 'PVOR')/
67  data paramlist(43) /gribparam(128, 127, 255, 255, 255, 'ATIDE')/
68  data paramlist(44) /gribparam(128, 128, 255, 255, 255, 'BVAL')/
69  data paramlist(45) /gribparam(128, 129, 255, 255, 255, 'HGHT')/
70  data paramlist(46) /gribparam(128, 130, 0, 0, 0, 'TMPK')/
71  data paramlist(47) /gribparam(128, 131, 0, 2, 2, 'UWND')/
72  data paramlist(48) /gribparam(128, 132, 0, 2, 3, 'VWND')/
73  data paramlist(49) /gribparam(128, 133, 255, 255, 255, 'SPCH')/
74  data paramlist(50) /gribparam(128, 134, 255, 255, 255, 'PRES')/
75  data paramlist(51) /gribparam(128, 135, 255, 255, 255, 'OMEG')/
76  data paramlist(52) /gribparam(128, 136, 255, 255, 255, 'TCWTR')/
77  data paramlist(53) /gribparam(128, 137, 255, 255, 255, 'TCWV')/
78  data paramlist(54) /gribparam(128, 138, 255, 255, 255, 'VORT')/
79  data paramlist(55) /gribparam(128, 139, 255, 255, 255, 'STL1')/
80  data paramlist(56) /gribparam(128, 140, 255, 255, 255, 'SWL1')/
81  data paramlist(57) /gribparam(128, 141, 255, 255, 255, 'SNOWD')/
82  data paramlist(58) /gribparam(128, 142, 255, 255, 255, 'S--M')/
83  data paramlist(59) /gribparam(128, 143, 255, 255, 255, 'C--M')/
84  data paramlist(60) /gribparam(128, 144, 255, 255, 255, 'SNOW')/
85  data paramlist(61) /gribparam(128, 145, 255, 255, 255, 'BLDS')/
86  data paramlist(62) /gribparam(128, 146, 255, 255, 255, 'SSHF')/
87  data paramlist(63) /gribparam(128, 147, 255, 255, 255, 'SLHF')/
88  data paramlist(64) /gribparam(128, 148, 255, 255, 255, 'CHNK')/
89  data paramlist(65) /gribparam(128, 149, 255, 255, 255, 'SNRAD')/
90  data paramlist(66) /gribparam(128, 150, 255, 255, 255, 'TNRAD')/
91  data paramlist(67) /gribparam(128, 151, 0, 3, 1, 'PMSL')/
92  data paramlist(68) /gribparam(128, 152, 255, 255, 255, 'LNSP')/
93  data paramlist(69) /gribparam(128, 153, 255, 255, 255, 'SWHR')/
94  data paramlist(70) /gribparam(128, 154, 255, 255, 255, 'LWHR')/
95  data paramlist(71) /gribparam(128, 155, 255, 255, 255, 'DIVG')/
96  data paramlist(72) /gribparam(128, 156, 0, 3, 5, 'HGHT')/
97  data paramlist(73) /gribparam(128, 157, 0, 1, 1, 'RELH')/
98  data paramlist(74) /gribparam(128, 158, 255, 255, 255, 'TSPRES')/
99  data paramlist(75) /gribparam(128, 159, 255, 255, 255, 'BLHGHT')/
100  data paramlist(76) /gribparam(128, 160, 255, 255, 255, 'SDOR')/
101  data paramlist(77) /gribparam(128, 161, 255, 255, 255, 'ISOR')/
102  data paramlist(78) /gribparam(128, 162, 255, 255, 255, 'ANOR')/
103  data paramlist(79) /gribparam(128, 163, 255, 255, 255, 'SLOR')/
104  data paramlist(80) /gribparam(128, 164, 0, 6, 1, 'TCLD')/
105  data paramlist(81) /gribparam(128, 165, 0, 2, 2, 'UWND')/
106  data paramlist(82) /gribparam(128, 166, 0, 2, 3, 'VWND')/
107  data paramlist(83) /gribparam(128, 167, 0, 0, 0, 'TMPK')/
108  data paramlist(84) /gribparam(128, 168, 0, 0, 6, 'DWPK')/
109  data paramlist(85) /gribparam(128, 169, 255, 255, 255, 'SSRD')/
110  data paramlist(86) /gribparam(128, 170, 255, 255, 255, 'STL2')/
111  data paramlist(87) /gribparam(128, 171, 255, 255, 255, 'SWL2')/
112  data paramlist(88) /gribparam(128, 172, 255, 255, 255, 'LAND')/
113  data paramlist(89) /gribparam(128, 173, 255, 255, 255, 'SROUGH')/
114  data paramlist(90) /gribparam(128, 174, 255, 255, 255, 'ALBD')/
115  data paramlist(91) /gribparam(128, 175, 255, 255, 255, 'STRD')/
116  data paramlist(92) /gribparam(128, 176, 255, 255, 255, 'SSRAD')/
117  data paramlist(93) /gribparam(128, 177, 255, 255, 255, 'STRAD')/
118  data paramlist(94) /gribparam(128, 178, 255, 255, 255, 'TSRAD')/
119  data paramlist(95) /gribparam(128, 179, 255, 255, 255, 'TTRAD')/
120  data paramlist(96) /gribparam(128, 180, 255, 255, 255, 'EWSS')/
121  data paramlist(97) /gribparam(128, 181, 255, 255, 255, 'NSSS')/
122  data paramlist(98) /gribparam(128, 182, 255, 255, 255, 'EVAP')/
123  data paramlist(99) /gribparam(128, 183, 255, 255, 255, 'STL3')/
124  data paramlist(100) /gribparam(128, 184, 255, 255, 255, 'SWL3')/
125  data paramlist(101) /gribparam(128, 185, 255, 255, 255, 'CCLD')/
126  data paramlist(102) /gribparam(128, 186, 255, 255, 255, 'LCLD')/
127  data paramlist(103) /gribparam(128, 187, 255, 255, 255, 'MCLD')/
128  data paramlist(104) /gribparam(128, 188, 255, 255, 255, 'HCLD')/
129  data paramlist(105) /gribparam(128, 189, 255, 255, 255, 'SUND')/
130  data paramlist(106) /gribparam(128, 190, 255, 255, 255, 'EWOV')/
131  data paramlist(107) /gribparam(128, 191, 255, 255, 255, 'NSOV')/
132  data paramlist(108) /gribparam(128, 192, 255, 255, 255, 'NWOV')/
133  data paramlist(109) /gribparam(128, 193, 255, 255, 255, 'NEOV')/
134  data paramlist(110) /gribparam(128, 194, 255, 255, 255, 'BTMP')/
135  data paramlist(111) /gribparam(128, 195, 255, 255, 255, 'LGWS')/
136  data paramlist(112) /gribparam(128, 196, 255, 255, 255, 'MGWS')/
137  data paramlist(113) /gribparam(128, 197, 255, 255, 255, 'GWDS')/
138  data paramlist(114) /gribparam(128, 198, 255, 255, 255, 'SKRC')/
139  data paramlist(115) /gribparam(128, 199, 255, 255, 255, 'VEGE')/
140  data paramlist(116) /gribparam(128, 200, 255, 255, 255, 'VSGO')/
141  data paramlist(117) /gribparam(128, 201, 0, 0, 4, 'TMXK')/
142  data paramlist(118) /gribparam(128, 202, 0, 0, 5, 'TMNK')/
143  data paramlist(119) /gribparam(128, 203, 255, 255, 255, 'OZMR')/
144  data paramlist(120) /gribparam(128, 204, 255, 255, 255, 'PRAW')/
145  data paramlist(121) /gribparam(128, 205, 255, 255, 255, 'RUNOFF')/
146  data paramlist(122) /gribparam(128, 206, 255, 255, 255, 'TCOZ')/
147  data paramlist(123) /gribparam(128, 207, 255, 255, 255, 'SPED')/
148  data paramlist(124) /gribparam(128, 208, 255, 255, 255, 'TSRC')/
149  data paramlist(125) /gribparam(128, 209, 255, 255, 255, 'TTRC')/
150  data paramlist(126) /gribparam(128, 210, 255, 255, 255, 'SSRC')/
151  data paramlist(127) /gribparam(128, 211, 255, 255, 255, 'STRC')/
152  data paramlist(128) /gribparam(128, 212, 255, 255, 255, 'SINSOL')/
153  data paramlist(129) /gribparam(128, 214, 255, 255, 255, 'DHRAD')/
154  data paramlist(130) /gribparam(128, 215, 255, 255, 255, 'DHVD')/
155  data paramlist(131) /gribparam(128, 216, 255, 255, 255, 'DHCC')/
156  data paramlist(132) /gribparam(128, 217, 255, 255, 255, 'DHLC')/
157  data paramlist(133) /gribparam(128, 218, 255, 255, 255, 'VDZW')/
158  data paramlist(134) /gribparam(128, 219, 255, 255, 255, 'VDMW')/
159  data paramlist(135) /gribparam(128, 220, 255, 255, 255, 'EWGD')/
160  data paramlist(136) /gribparam(128, 221, 255, 255, 255, 'NSGD')/
161  data paramlist(137) /gribparam(128, 222, 255, 255, 255, 'CTZW')/
162  data paramlist(138) /gribparam(128, 223, 255, 255, 255, 'CTMW')/
163  data paramlist(139) /gribparam(128, 224, 255, 255, 255, 'VDHUM')/
164  data paramlist(140) /gribparam(128, 225, 255, 255, 255, 'HTCC')/
165  data paramlist(141) /gribparam(128, 226, 255, 255, 255, 'HTLC')/
166  data paramlist(142) /gribparam(128, 227, 255, 255, 255, 'CRNH')/
167  data paramlist(143) /gribparam(128, 228, 0, 1, 8, 'APCP')/
168  data paramlist(144) /gribparam(128, 229, 255, 255, 255, 'IEWS')/
169  data paramlist(145) /gribparam(128, 230, 255, 255, 255, 'INSS')/
170  data paramlist(146) /gribparam(128, 231, 255, 255, 255, 'ISHF')/
171  data paramlist(147) /gribparam(128, 232, 255, 255, 255, 'MFLUX')/
172  data paramlist(148) /gribparam(128, 233, 255, 255, 255, 'ASHUM')/
173  data paramlist(149) /gribparam(128, 234, 255, 255, 255, 'LSRH')/
174  data paramlist(150) /gribparam(128, 235, 255, 255, 255, 'SKTMP')/
175  data paramlist(151) /gribparam(128, 236, 255, 255, 255, 'STL4')/
176  data paramlist(152) /gribparam(128, 237, 255, 255, 255, 'SWL4')/
177  data paramlist(153) /gribparam(128, 238, 255, 255, 255, 'TSNOW')/
178  data paramlist(154) /gribparam(128, 239, 255, 255, 255, 'CSNOWF')/
179  data paramlist(155) /gribparam(128, 240, 255, 255, 255, 'LSNOWF')/
180  data paramlist(156) /gribparam(128, 241, 255, 255, 255, 'ACLD')/
181  data paramlist(157) /gribparam(128, 242, 255, 255, 255, 'ALWTND')/
182  data paramlist(158) /gribparam(128, 243, 255, 255, 255, 'FALBD')/
183  data paramlist(159) /gribparam(128, 244, 255, 255, 255, 'FSROUGH')/
184  data paramlist(160) /gribparam(128, 245, 255, 255, 255, 'FLSR')/
185  data paramlist(161) /gribparam(128, 246, 255, 255, 255, 'CLWC')/
186  data paramlist(162) /gribparam(128, 247, 255, 255, 255, 'CIWC')/
187  data paramlist(163) /gribparam(128, 248, 255, 255, 255, 'CLOUD')/
188  data paramlist(164) /gribparam(128, 249, 255, 255, 255, 'AIWTND')/
189  data paramlist(165) /gribparam(128, 250, 255, 255, 255, 'ICEAGE')/
190  data paramlist(166) /gribparam(128, 251, 255, 255, 255, 'ATTE')/
191  data paramlist(167) /gribparam(128, 252, 255, 255, 255, 'ATHE')/
192  data paramlist(168) /gribparam(128, 253, 255, 255, 255, 'ATZE')/
193  data paramlist(169) /gribparam(128, 254, 255, 255, 255, 'ATMW')/
194  data paramlist(170) /gribparam(128, 255, 255, 255, 255, 'MISS')/
195  ! Added 4/20/2007 - For missing GRIB1 to GRIB2 conversions
196  data paramlist(171) /gribparam(1, 33, 0, 2, 2, 'UGRD')/
197  data paramlist(172) /gribparam(1, 34, 0, 2, 3, 'VGRD')/
198  data paramlist(173) /gribparam(1, 2, 0, 3, 1, 'PRMSL')/
199  data paramlist(174) /gribparam(1, 7, 0, 3, 5, 'HGT')/
200  ! Added 10/11/2007- Add more parameters
201  data paramlist(175) /gribparam(1, 11, 0, 0, 0, 'TMP')/
202  data paramlist(176) /gribparam(1, 52, 0, 1, 1, 'RH')/
203  data paramlist(177) /gribparam(1, 41, 0, 2, 10, 'ABSV')/
204  ! Added 11/16/2011- Add more parameters
205  data paramlist(178) /gribparam(128, 121, 0, 0, 4, 'TMXK')/
206  data paramlist(179) /gribparam(128, 122, 0, 0, 5, 'TMNK')/
207 
208 contains
209 
222  subroutine param_ecmwf_g1_to_g2(g1val, g1ver, g2disc, g2cat, g2num)
223  implicit none
224 
225  integer, intent(in) :: g1val, g1ver
226  integer, intent(out) :: g2disc, g2cat, g2num
227  integer :: n
228 
229  g2disc=255
230  g2cat=255
231  g2num=255
232 
233  do n=1, maxparam
234  if ( paramlist(n)%grib1val.eq.g1val .AND. paramlist(n)%g1tblver.eq.g1ver ) then
235  g2disc=paramlist(n)%grib2dsc
236  g2cat=paramlist(n)%grib2cat
237  g2num=paramlist(n)%grib2num
238  return
239  endif
240  enddo
241 
242  print *, 'param_ecmwf_g1_to_g2:GRIB1 param ', g1val, ' not found.', &
243  ' for table version ', g1ver
244  end subroutine param_ecmwf_g1_to_g2
245 
257  subroutine param_ecmwf_g2_to_g1(g2disc, g2cat, g2num, g1val, g1ver)
258  implicit none
259 
260  integer, intent(in) :: g2disc, g2cat, g2num
261  integer, intent(out) :: g1val, g1ver
262  integer :: n
263 
264  g1val=255
265  g1ver=255
266 
267  do n=1, maxparam
268  if (paramlist(n)%grib2dsc.eq.g2disc.AND. paramlist(n)%grib2cat.eq.g2cat.AND. &
269  paramlist(n)%grib2num.eq.g2num) then
270  g1val=paramlist(n)%grib1val
271  g1ver=paramlist(n)%g1tblver
272  return
273  endif
274  enddo
275 
276  print *, 'param_ecmwf_g2_to_g1:GRIB2 param ', g2disc, g2cat, g2num, ' not found.'
277  end subroutine param_ecmwf_g2_to_g1
278 
279 end module params_ecmwf
This Fortran Module contains info on all the available ECMWF GRIB Parameters.
integer, parameter maxparam
maximum number of ECMWF GRIB parameters.
type(gribparam), dimension(maxparam) paramlist
list of ECMWF GRIB parameters.
subroutine param_ecmwf_g1_to_g2(g1val, g1ver, g2disc, g2cat, g2num)
This subroutine returns the corresponding GRIB2 Discipline Category and Number for a given GRIB1 para...
subroutine param_ecmwf_g2_to_g1(g2disc, g2cat, g2num, g1val, g1ver)
This subroutine returns the GRIB 1 parameter number for a given GRIB2 Discipline, Category and Parame...