mirror of https://github.com/ecmwf/eccodes.git
Merge branch 'develop' into single_precision_spherical_complex
This commit is contained in:
commit
9c231996c8
|
@ -0,0 +1,11 @@
|
||||||
|
name: cd
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
uses: ecmwf-actions/reusable-workflows/.github/workflows/create-package.yml@v2
|
||||||
|
secrets: inherit
|
|
@ -21,7 +21,7 @@ cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
|
||||||
find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
|
find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
|
||||||
|
|
||||||
# Initialise project
|
# Initialise project
|
||||||
project( eccodes VERSION 2.31.0 LANGUAGES CXX )
|
project( eccodes LANGUAGES CXX )
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,277 @@
|
||||||
|
0 0 WMO SECRETARIAT
|
||||||
|
1 1 MELBOURNE
|
||||||
|
2 2 MELBOURNE
|
||||||
|
3 3 )
|
||||||
|
4 4 MOSCOW
|
||||||
|
5 5 MOSCOW
|
||||||
|
6 6 )
|
||||||
|
7 7 US NATIONAL WEATHER SERVICE, NATIONAL CENTRES FOR ENVIRONMENTAL PREDICTION (NCEP)
|
||||||
|
8 8 US NATIONAL WEATHER SERVICE TELECOMMUNICATIONS GATEWAY (NWSTG)
|
||||||
|
9 9 US NATIONAL WEATHER SERVICE - OTHER
|
||||||
|
10 10 CAIRO (RSMC)
|
||||||
|
11 11 )
|
||||||
|
12 12 DAKAR (RSMC)
|
||||||
|
13 13 )
|
||||||
|
14 14 NAIROBI (RSMC)
|
||||||
|
15 15 )
|
||||||
|
16 16 CASABLANCA (RSMC)
|
||||||
|
17 17 TUNIS (RSMC)
|
||||||
|
18 18 TUNIS-CASABLANCA (RSMC)
|
||||||
|
19 19 )
|
||||||
|
20 20 LAS PALMAS
|
||||||
|
21 21 ALGIERS (RSMC)
|
||||||
|
22 22 ACMAD
|
||||||
|
23 23 MOZAMBIQUE (NMC)
|
||||||
|
24 24 PRETORIA (RSMC)
|
||||||
|
25 25 LA REUNION (RSMC)
|
||||||
|
26 26 KHABAROVSK (RSMC)
|
||||||
|
27 27 )
|
||||||
|
28 28 NEW DELHI (RSMC)
|
||||||
|
29 29 )
|
||||||
|
30 30 NOVOSIBIRSK (RSMC)
|
||||||
|
31 31 )
|
||||||
|
32 32 TASHKENT (RSMC)
|
||||||
|
33 33 JEDDAH (RSMC)
|
||||||
|
34 34 TOKYO (RSMC), JAPAN METEOROLOGICAL AGENCY
|
||||||
|
35 35 )
|
||||||
|
36 36 BANGKOK
|
||||||
|
37 37 ULAANBAATAR
|
||||||
|
38 38 BEIJING (RSMC)
|
||||||
|
39 39 )
|
||||||
|
40 40 SEOUL
|
||||||
|
41 41 BUENOS AIRES (RSMC)
|
||||||
|
42 42 )
|
||||||
|
43 43 BRASILIA (RSMC)
|
||||||
|
44 44 )
|
||||||
|
45 45 SANTIAGO
|
||||||
|
46 46 BRAZILIAN SPACE AGENCY INPE
|
||||||
|
47 47 COLOMBIA (NMC)
|
||||||
|
48 48 ECUADOR (NMC)
|
||||||
|
49 49 PERU (NMC)
|
||||||
|
50 50 VENEZUELA (BOLIVARIAN REPUBLIC OF) (NMC)
|
||||||
|
51 51 MIAMI (RSMC)
|
||||||
|
52 52 MIAMI RSMC, NATIONAL HURRICANE CENTRE
|
||||||
|
53 53 MSC MONITORING
|
||||||
|
54 54 MONTREAL (RSMC)
|
||||||
|
55 55 SAN FRANCISCO
|
||||||
|
56 56 ARINC CENTRE
|
||||||
|
57 57 US AIR FORCE - AIR FORCE GLOBAL WEATHER CENTRAL
|
||||||
|
58 58 FLEET NUMERICAL METEOROLOGY AND OCEANOGRAPHY CENTER, MONTEREY, CA, UNITED STATES
|
||||||
|
59 59 THE NOAA FORECAST SYSTEMS LABORATORY, BOULDER, CO, UNITED STATES
|
||||||
|
60 60 UNITED STATES NATIONAL CENTER FOR ATMOSPHERIC RESEARCH (NCAR)
|
||||||
|
61 61 SERVICE ARGOS - LANDOVER
|
||||||
|
62 62 US NAVAL OCEANOGRAPHIC OFFICE
|
||||||
|
63 63 INTERNATIONAL RESEARCH INSTITUTE FOR CLIMATE AND SOCIETY (IRI)
|
||||||
|
64 64 HONOLULU (RSMC)
|
||||||
|
65 65 DARWIN (RSMC)
|
||||||
|
66 66 )
|
||||||
|
67 67 MELBOURNE (RSMC)
|
||||||
|
68 68 RESERVED
|
||||||
|
69 69 WELLINGTON (RSMC)
|
||||||
|
70 70 )
|
||||||
|
71 71 NADI (RSMC)
|
||||||
|
72 72 SINGAPORE
|
||||||
|
73 73 MALAYSIA (NMC)
|
||||||
|
74 74 UK METEOROLOGICAL OFFICE EXETER (RSMC)
|
||||||
|
75 75 )
|
||||||
|
76 76 MOSCOW (RSMC)
|
||||||
|
77 77 RESERVED
|
||||||
|
78 78 OFFENBACH (RSMC)
|
||||||
|
79 79 )
|
||||||
|
80 80 ROME (RSMC)
|
||||||
|
81 81 )
|
||||||
|
82 82 NORRKOPING
|
||||||
|
83 83 )
|
||||||
|
84 84 TOULOUSE (RSMC)
|
||||||
|
85 85 TOULOUSE (RSMC)
|
||||||
|
86 86 HELSINKI
|
||||||
|
87 87 BELGRADE
|
||||||
|
88 88 OSLO
|
||||||
|
89 89 PRAGUE
|
||||||
|
90 90 EPISKOPI
|
||||||
|
91 91 ANKARA
|
||||||
|
92 92 FRANKFURT/MAIN
|
||||||
|
93 93 LONDON (WAFC)
|
||||||
|
94 94 COPENHAGEN
|
||||||
|
95 95 ROTA
|
||||||
|
96 96 ATHENS
|
||||||
|
97 97 EUROPEAN SPACE AGENCY (ESA)
|
||||||
|
98 98 EUROPEAN CENTRE FOR MEDIUM RANGE WEATHER FORECASTS (ECMWF) (RSMC)
|
||||||
|
99 99 DE BILT
|
||||||
|
100 100 BRAZZAVILLE
|
||||||
|
101 101 ABIDJAN
|
||||||
|
102 102 LIBYA (NMC)
|
||||||
|
103 103 MADAGASCAR (NMC)
|
||||||
|
104 104 MAURITIUS (NMC)
|
||||||
|
105 105 NIGER (NMC)
|
||||||
|
106 106 SEYCHELLES (NMC)
|
||||||
|
107 107 UGANDA (NMC)
|
||||||
|
108 108 UNITED REPUBLIC OF TANZANIA (NMC)
|
||||||
|
109 109 ZIMBABWE (NMC)
|
||||||
|
110 110 HONG KONG, CHINA
|
||||||
|
111 111 AFGHANISTAN (NMC)
|
||||||
|
112 112 BAHRAIN (NMC)
|
||||||
|
113 113 BANGLADESH (NMC)
|
||||||
|
114 114 BHUTAN (NMC)
|
||||||
|
115 115 CAMBODIA (NMC)
|
||||||
|
116 116 DEMOCRATIC PEOPLE'S REPUBLIC OF KOREA (NMC)
|
||||||
|
117 117 ISLAMIC REPUBLIC OF IRAN (NMC)
|
||||||
|
118 118 IRAQ (NMC)
|
||||||
|
119 119 KAZAKHSTAN (NMC)
|
||||||
|
120 120 KUWAIT (NMC)
|
||||||
|
121 121 KYRGYZSTAN (NMC)
|
||||||
|
122 122 LAO PEOPLE'S DEMOCRATIC REPUBLIC (NMC)
|
||||||
|
123 123 MACAO, CHINA
|
||||||
|
124 124 MALDIVES (NMC)
|
||||||
|
125 125 MYANMAR (NMC)
|
||||||
|
126 126 NEPAL (NMC)
|
||||||
|
127 127 OMAN (NMC)
|
||||||
|
128 128 PAKISTAN (NMC)
|
||||||
|
129 129 QATAR (NMC)
|
||||||
|
130 130 YEMEN (NMC)
|
||||||
|
131 131 SRI LANKA (NMC)
|
||||||
|
132 132 TAJIKISTAN (NMC)
|
||||||
|
133 133 TURKMENISTAN (NMC)
|
||||||
|
134 134 UNITED ARAB EMIRATES (NMC)
|
||||||
|
135 135 UZBEKISTAN (NMC)
|
||||||
|
136 136 VIET NAM (NMC)
|
||||||
|
140 140 BOLIVIA (PLURINATIONAL STATE OF) (NMC)
|
||||||
|
141 141 GUYANA (NMC)
|
||||||
|
142 142 PARAGUAY (NMC)
|
||||||
|
143 143 SURINAME (NMC)
|
||||||
|
144 144 URUGUAY (NMC)
|
||||||
|
145 145 FRENCH GUIANA
|
||||||
|
146 146 BRAZILIAN NAVY HYDROGRAPHIC CENTRE
|
||||||
|
147 147 NATIONAL COMMISSION ON SPACE ACTIVITIES (CONAE) - ARGENTINA
|
||||||
|
148 148 BRAZILIAN DEPARTMENT OF AIRSPACE CONTROL - DECEA
|
||||||
|
149 149 RESERVED FOR OTHER CENTRES
|
||||||
|
150 150 ANTIGUA AND BARBUDA (NMC)
|
||||||
|
151 151 BAHAMAS (NMC)
|
||||||
|
152 152 BARBADOS (NMC)
|
||||||
|
153 153 BELIZE (NMC)
|
||||||
|
154 154 BRITISH CARIBBEAN TERRITORIES CENTRE
|
||||||
|
155 155 SAN JOSE
|
||||||
|
156 156 CUBA (NMC)
|
||||||
|
157 157 DOMINICA (NMC)
|
||||||
|
158 158 DOMINICAN REPUBLIC (NMC)
|
||||||
|
159 159 EL SALVADOR (NMC)
|
||||||
|
160 160 US NOAA/NESDIS
|
||||||
|
161 161 US NOAA OFFICE OF OCEANIC AND ATMOSPHERIC RESEARCH
|
||||||
|
162 162 GUATEMALA (NMC)
|
||||||
|
163 163 HAITI (NMC)
|
||||||
|
164 164 HONDURAS (NMC)
|
||||||
|
165 165 JAMAICA (NMC)
|
||||||
|
166 166 MEXICO
|
||||||
|
167 167 CURACAO AND SINT MAARTEN (NMC)
|
||||||
|
168 168 NICARAGUA (NMC)
|
||||||
|
169 169 PANAMA (NMC)
|
||||||
|
170 170 SAINT LUCIA (NMC)
|
||||||
|
171 171 TRINIDAD AND TOBAGO (NMC)
|
||||||
|
172 172 FRENCH DEPARTMENTS IN RA IV
|
||||||
|
173 173 US NATIONAL AERONAUTICS AND SPACE ADMINISTRATION (NASA)
|
||||||
|
174 174 INTEGRATED SCIENCE DATA MANAGEMENT/MARINE ENVIRONMENTAL DATA SERVICE (ISDM/MEDS - CANADA)
|
||||||
|
175 175 UNIVERSITY CORPORATION FOR ATMOSPHERIC RESEARCH (UCAR) - UNITED STATES
|
||||||
|
176 176 COOPERATIVE INSTITUTE FOR METEOROLOGICAL SATELLITE STUDIES (CIMSS) - UNITED STATES
|
||||||
|
177 177 NOAA NATIONAL OCEAN SERVICE - UNITED STATES
|
||||||
|
178 178 SPIRE GLOBAL, INC.
|
||||||
|
179 179 GEOOPTICS, INC.
|
||||||
|
180 180 PLANETIQ
|
||||||
|
190 190 COOK ISLANDS (NMC)
|
||||||
|
191 191 FRENCH POLYNESIA (NMC)
|
||||||
|
192 192 TONGA (NMC)
|
||||||
|
193 193 VANUATU (NMC)
|
||||||
|
194 194 BRUNEI DARUSSALAM (NMC)
|
||||||
|
195 195 INDONESIA (NMC)
|
||||||
|
196 196 KIRIBATI (NMC)
|
||||||
|
197 197 FEDERATED STATES OF MICRONESIA (NMC)
|
||||||
|
198 198 NEW CALEDONIA (NMC)
|
||||||
|
199 199 NIUE
|
||||||
|
200 200 PAPUA NEW GUINEA (NMC)
|
||||||
|
201 201 PHILIPPINES (NMC)
|
||||||
|
202 202 SAMOA (NMC)
|
||||||
|
203 203 SOLOMON ISLANDS (NMC)
|
||||||
|
204 204 NATIONAL INSTITUTE OF WATER AND ATMOSPHERIC RESEARCH (NIWA - NEW ZEALAND)
|
||||||
|
210 210 FRASCATI (ESA/ESRIN)
|
||||||
|
211 211 LANNION
|
||||||
|
212 212 LISBOA
|
||||||
|
213 213 REYKJAVIK
|
||||||
|
214 214 MADRID
|
||||||
|
215 215 ZUERICH
|
||||||
|
216 216 SERVICE ARGOS TOULOUSE
|
||||||
|
217 217 BRATISLAVA
|
||||||
|
218 218 BUDAPEST
|
||||||
|
219 219 LJUBLJANA
|
||||||
|
220 220 WARSAW
|
||||||
|
221 221 ZAGREB
|
||||||
|
222 222 ALBANIA (NMC)
|
||||||
|
223 223 ARMENIA (NMC)
|
||||||
|
224 224 AUSTRIA (NMC)
|
||||||
|
225 225 AZERBAIJAN (NMC)
|
||||||
|
226 226 BELARUS (NMC)
|
||||||
|
227 227 BELGIUM (NMC)
|
||||||
|
228 228 BOSNIA AND HERZEGOVINA (NMC)
|
||||||
|
229 229 BULGARIA (NMC)
|
||||||
|
230 230 CYPRUS (NMC)
|
||||||
|
231 231 ESTONIA (NMC)
|
||||||
|
232 232 GEORGIA (NMC)
|
||||||
|
233 233 DUBLIN
|
||||||
|
234 234 ISRAEL (NMC)
|
||||||
|
235 235 JORDAN (NMC)
|
||||||
|
236 236 LATVIA (NMC)
|
||||||
|
237 237 LEBANON (NMC)
|
||||||
|
238 238 LITHUANIA (NMC)
|
||||||
|
239 239 LUXEMBOURG
|
||||||
|
240 240 MALTA (NMC)
|
||||||
|
241 241 MONACO
|
||||||
|
242 242 ROMANIA (NMC)
|
||||||
|
243 243 SYRIAN ARAB REPUBLIC (NMC)
|
||||||
|
244 244 THE FORMER YUGOSLAV REPUBLIC OF MACEDONIA (NMC)
|
||||||
|
245 245 UKRAINE (NMC)
|
||||||
|
246 246 REPUBLIC OF MOLDOVA (NMC)
|
||||||
|
247 247 OPERATIONAL PROGRAMME FOR THE EXCHANGE OF WEATHER RADAR INFORMATION (OPERA) - EUMETNET
|
||||||
|
248 248 MONTENEGRO (NMC)
|
||||||
|
249 249 BARCELONA DUST FORECAST CENTER
|
||||||
|
250 250 CONSORTIUM FOR SMALL SCALE MODELLING (COSMO)
|
||||||
|
251 251 METEOROLOGICAL COOPERATION ON OPERATIONAL NWP (METCOOP)
|
||||||
|
252 252 MAX PLANCK INSTITUTE FOR METEOROLOGY (MPI-M)
|
||||||
|
253 253 RESERVED FOR OTHER CENTRES
|
||||||
|
254 254 EUMETSAT OPERATION CENTRE
|
||||||
|
255 255 NOT TO BE USED
|
||||||
|
256 256 ANGOLA (NMC)
|
||||||
|
257 257 BENIN (NMC)
|
||||||
|
258 258 BOTSWANA (NMC)
|
||||||
|
259 259 BURKINA FASO (NMC)
|
||||||
|
260 260 BURUNDI (NMC)
|
||||||
|
261 261 CAMEROON (NMC)
|
||||||
|
262 262 CABO VERDE (NMC)
|
||||||
|
263 263 CENTRAL AFRICAN REPUBLIC (NMC)
|
||||||
|
264 264 CHAD (NMC)
|
||||||
|
265 265 COMOROS (NMC)
|
||||||
|
266 266 DEMOCRATIC REPUBLIC OF THE CONGO (NMC)
|
||||||
|
267 267 DJIBOUTI (NMC)
|
||||||
|
268 268 ERITREA (NMC)
|
||||||
|
269 269 ETHIOPIA (NMC)
|
||||||
|
270 270 GABON (NMC)
|
||||||
|
271 271 GAMBIA (NMC)
|
||||||
|
272 272 GHANA (NMC)
|
||||||
|
273 273 GUINEA (NMC)
|
||||||
|
274 274 GUINEA-BISSAU (NMC)
|
||||||
|
275 275 LESOTHO (NMC)
|
||||||
|
276 276 LIBERIA (NMC)
|
||||||
|
277 277 MALAWI (NMC)
|
||||||
|
278 278 MALI (NMC)
|
||||||
|
279 279 MAURITANIA (NMC)
|
||||||
|
280 280 NAMIBIA (NMC)
|
||||||
|
281 281 NIGERIA (NMC)
|
||||||
|
282 282 RWANDA (NMC)
|
||||||
|
283 283 SAO TOME AND PRINCIPE (NMC)
|
||||||
|
284 284 SIERRA LEONE (NMC)
|
||||||
|
285 285 SOMALIA (NMC)
|
||||||
|
286 286 SUDAN (NMC)
|
||||||
|
287 287 ESWATINI (NMC)
|
||||||
|
288 288 TOGO (NMC)
|
||||||
|
289 289 ZAMBIA (NMC)
|
||||||
|
290 290 EUMETNET E-PROFILE
|
||||||
|
291 291 INSTITUTE OF ATMOSPHERIC PHYSICS (IAP) OF THE CHINESE ACADEMY OF SCIENCES (CAS)
|
||||||
|
292 292 HELMHOLTZ CENTRE FOR ENVIRONMENTAL RESEARCH (UFZ)
|
||||||
|
65535 65535 MISSING VALUE
|
|
@ -0,0 +1,520 @@
|
||||||
|
0 0 OZONE
|
||||||
|
1 1 WATER VAPOUR
|
||||||
|
2 2 METHANE
|
||||||
|
3 3 CARBON DIOXIDE
|
||||||
|
4 4 CARBON MONOXIDE
|
||||||
|
5 5 NITROGEN DIOXIDE
|
||||||
|
6 6 NITROUS OXIDE
|
||||||
|
7 7 FORMALDEHYDE
|
||||||
|
8 8 SULPHUR DIOXIDE
|
||||||
|
9 9 AMMONIA
|
||||||
|
10 10 AMMONIUM CATION
|
||||||
|
11 11 NITROGEN MONOXIDE
|
||||||
|
12 12 ATOMIC OXYGEN
|
||||||
|
13 13 NITRATE RADICAL
|
||||||
|
14 14 HYDROPEROXYL RADICAL
|
||||||
|
15 15 DINITROGEN PENTOXIDE
|
||||||
|
16 16 NITROUS ACID
|
||||||
|
17 17 NITRIC ACID
|
||||||
|
18 18 PEROXYNITRIC ACID
|
||||||
|
19 19 HYDROGEN PEROXIDE
|
||||||
|
20 20 DIHYDROGEN
|
||||||
|
21 21 ATOMIC NITROGEN
|
||||||
|
22 22 SULPHATE ANION
|
||||||
|
23 23 ATOMIC RADON
|
||||||
|
24 24 MERCURY VAPOUR
|
||||||
|
25 25 MERCURY(II) CATION
|
||||||
|
26 26 ATOMIC CHLORINE
|
||||||
|
27 27 CHLORINE MONOXIDE
|
||||||
|
28 28 DICHLORINE PEROXIDE
|
||||||
|
29 29 HYPOCHLOROUS ACID
|
||||||
|
30 30 CHLORINE NITRATE
|
||||||
|
31 31 CHLORINE DIOXIDE
|
||||||
|
32 32 ATOMIC BROMINE
|
||||||
|
33 33 BROMINE MONOXIDE
|
||||||
|
34 34 BROMINE CHLORIDE
|
||||||
|
35 35 HYDROGEN BROMIDE
|
||||||
|
36 36 HYPOBROMOUS ACID
|
||||||
|
37 37 BROMINE NITRATE
|
||||||
|
38 38 DIOXYGEN
|
||||||
|
39 39 NITRYL CHLORIDE
|
||||||
|
40 40 SULPHURIC ACID
|
||||||
|
41 41 HYDROGEN SULPHIDE
|
||||||
|
42 42 SULPHUR TRIOXIDE
|
||||||
|
43 43 BROMINE
|
||||||
|
44 44 HYDROFLUORIC ACID
|
||||||
|
45 45 SULPHUR HEXAFLUORIDE
|
||||||
|
46 46 CHLORINE
|
||||||
|
10000 10000 HYDROXYL RADICAL
|
||||||
|
10001 10001 METHYL PEROXY RADICAL
|
||||||
|
10002 10002 METHYL HYDROPEROXIDE
|
||||||
|
10004 10004 METHANOL
|
||||||
|
10005 10005 FORMIC ACID
|
||||||
|
10006 10006 HYDROGEN CYANIDE
|
||||||
|
10007 10007 ACETO NITRILE
|
||||||
|
10008 10008 ETHANE
|
||||||
|
10009 10009 ETHENE (= ETHYLENE)
|
||||||
|
10010 10010 ETHYNE (= ACETYLENE)
|
||||||
|
10011 10011 ETHANOL
|
||||||
|
10012 10012 ACETIC ACID
|
||||||
|
10013 10013 PEROXYACETYL NITRATE
|
||||||
|
10014 10014 PROPANE
|
||||||
|
10015 10015 PROPENE
|
||||||
|
10016 10016 BUTANE (ALL ISOMERS)
|
||||||
|
10017 10017 ISOPRENE
|
||||||
|
10018 10018 ALPHA PINENE
|
||||||
|
10019 10019 BETA PINENE
|
||||||
|
10020 10020 LIMONENE
|
||||||
|
10021 10021 BENZENE
|
||||||
|
10022 10022 TOLUENE
|
||||||
|
10023 10023 XYLENE
|
||||||
|
10024 10024 METHANESULPHONIC ACID
|
||||||
|
10025 10025 METHYLGLYOXAL (2-OXOPROPANAL)
|
||||||
|
10026 10026 PEROXYACETYL RADICAL
|
||||||
|
10027 10027 METHACRYLIC ACID (2-METHYLPROP-2-ENOIC ACID)
|
||||||
|
10028 10028 METHACROLEIN (2-METHYLPROP-2-ENAL)
|
||||||
|
10029 10029 ACETONE (PROPAN-2-ONE)
|
||||||
|
10030 10030 ETHYL DIOXIDANYL RADICAL
|
||||||
|
10031 10031 BUTADIENE (BUTA-1,3-DIENE)
|
||||||
|
10032 10032 ACETALDEHYDE (ETHANAL)
|
||||||
|
10033 10033 GLYCOLALDEHYDE (HYDROXYETHANAL)
|
||||||
|
10034 10034 CRESOL (METHYLPHENOL), ALL ISOMERS
|
||||||
|
10035 10035 PERACETIC ACID (ETHANEPEROXOIC ACID)
|
||||||
|
10036 10036 2-HYDROXYETHYL OXIDANYL RADICAL
|
||||||
|
10037 10037 2-HYDROXYETHYL DIOXIDANYL RADICAL
|
||||||
|
10038 10038 GLYOXAL (OXALDEHYDE)
|
||||||
|
10039 10039 ISOPROPYL DIOXIDANYL RADICAL
|
||||||
|
10040 10040 ISOPROPYL HYDROPEROXIDE (2-HYDROPEROXYPROPANE)
|
||||||
|
10041 10041 HYDROXYACETONE (1-HYDROXYPROPAN-2-ONE)
|
||||||
|
10042 10042 PEROXYACETIC ACID (ETHANEPEROXOIC ACID)
|
||||||
|
10043 10043 METHYL VINYL KETONE (BUT-3-EN-2-ONE)
|
||||||
|
10044 10044 PHENOXY RADICAL
|
||||||
|
10045 10045 METHYL RADICAL
|
||||||
|
10046 10046 CARBONYL SULPHIDE (CARBON OXIDE SULPHIDE)
|
||||||
|
10047 10047 DIBROMOMETHANE
|
||||||
|
10048 10048 METHOXY RADICAL
|
||||||
|
10049 10049 TRIBROMOMETHANE
|
||||||
|
10050 10050 FORMYL RADICAL (OXOMETHYL RADICAL)
|
||||||
|
10051 10051 HYDROXYMETHYL DIOXIDANYL RADICAL
|
||||||
|
10052 10052 ETHYL HYDROPEROXIDE
|
||||||
|
10053 10053 3-HYDROXYPROPYL DIOXIDANYL RADICAL
|
||||||
|
10054 10054 3-HYDROXYPROPYL HYDROPEROXIDE
|
||||||
|
10055 10055 METHYL-PEROXY-NITRATE (NITROPEROXY-METHANE)
|
||||||
|
10056 10056 2-LAMBDA^1-OXIDANYLOXY-2-METHYLBUT-3-EN-1-OL (4-HYDROXY-3-METHYL-1-BUTENE-3-YLPEROXY RADICAL)
|
||||||
|
10057 10057 2-LAMBDA^1-OXIDANYLOXY-3-METHYLBUT-3-EN-1-OL (2-HYDROXY-1-ISOPROPENYLETHYLPEROXY RADICAL)
|
||||||
|
10058 10058 (Z)-4-HYDROPEROXY-2-METHYL-2-BUTENAL
|
||||||
|
10059 10059 (Z)-4-HYDROPEROXY-3-METHYL-2-BUTENAL
|
||||||
|
10500 10500 DIMETHYL SULPHIDE
|
||||||
|
10501 10501 DMSO (DIMETHYL SULFOXIDE)
|
||||||
|
20001 20001 HYDROGEN CHLORIDE
|
||||||
|
20002 20002 CFC-11 (TRICHLOROFLUOROMETHANE)
|
||||||
|
20003 20003 CFC-12 (DICHLORODIFLUOROMETHANE)
|
||||||
|
20004 20004 CFC-113 (1,1,2-TRICHLORO-1,2,2-TRIFLUOROETHANE)
|
||||||
|
20005 20005 CFC-113A (1,1,1-TRICHLORO-2,2,2-TRIFLUOROETHANE)
|
||||||
|
20006 20006 CFC-114 (1,2-DICHLORO-1,1,2,2-TETRAFLUOROETHANE)
|
||||||
|
20007 20007 CFC-115 (1-CHLORO-1,1,2,2,2-PENTAFLUOROETHANE)
|
||||||
|
20008 20008 HCFC-22 (CHLORODIFLUOROMETHANE)
|
||||||
|
20009 20009 HCFC-141B (1,1-DICHLORO-1-FLUOROETHANE)
|
||||||
|
20010 20010 HCFC-142B (1-CHLORO-1,1-DIFLUOROETHANE)
|
||||||
|
20011 20011 HALON-1202 (DIBROMODIFLUOROMETHANE)
|
||||||
|
20012 20012 HALON-1211 (BROMOCHLORODIFLUOROMETHANE)
|
||||||
|
20013 20013 HALON-1301 (BROMOTRIFLUOROMETHANE)
|
||||||
|
20014 20014 HALON-2402 (1,2-DIBROMO-1,1,2,2-TETRAFLUOROETHANE)
|
||||||
|
20015 20015 HCC-40 (METHYL CHLORIDE)
|
||||||
|
20016 20016 HCC-10 (CARBON TETRACHLORIDE)
|
||||||
|
20017 20017 HCC-140A (1,1,1-TRICHLOROETHANE)
|
||||||
|
20018 20018 HBC-40B1 (METHYL BROMIDE)
|
||||||
|
20019 20019 HCH (HEXACHLOROCYCLOHEXANE) ALL ISOMERS
|
||||||
|
20020 20020 ALPHA-HCH (ALPHA-HEXACHLOROCYCLOHEXANE) BOTH ENANTIOMERS
|
||||||
|
20021 20021 PCB-153 (2,2',4,4',5,5'-HEXACHLOROBIPHENYL)
|
||||||
|
20022 20022 HCFC-141A (1,1-DICHLORO-2-FLUOROETHANE)
|
||||||
|
30000 30000 RADIOACTIVE POLLUTANT (TRACER, DEFINED BY ORIGINATING CENTRE)
|
||||||
|
30010 30010 TRITIUM (HYDROGEN 3)
|
||||||
|
30011 30011 TRITIUM ORGANIC BOUNDED
|
||||||
|
30012 30012 TRITIUM INORGANIC
|
||||||
|
30013 30013 BERYLLIUM 7
|
||||||
|
30014 30014 BERYLLIUM 10
|
||||||
|
30015 30015 CARBON 14
|
||||||
|
30016 30016 CARBON 14 CO2
|
||||||
|
30017 30017 CARBON 14 OTHER GASES
|
||||||
|
30018 30018 NITROGEN 13
|
||||||
|
30019 30019 NITROGEN 16
|
||||||
|
30020 30020 FLUORINE 18
|
||||||
|
30021 30021 SODIUM 22
|
||||||
|
30022 30022 PHOSPHATE 32
|
||||||
|
30023 30023 PHOSPHATE 33
|
||||||
|
30024 30024 SULPHUR 35
|
||||||
|
30025 30025 CHLORINE 36
|
||||||
|
30026 30026 POTASSIUM 40
|
||||||
|
30027 30027 ARGON 41
|
||||||
|
30028 30028 CALCIUM 41
|
||||||
|
30029 30029 CALCIUM 45
|
||||||
|
30030 30030 TITANIUM 44
|
||||||
|
30031 30031 SCANDIUM 46
|
||||||
|
30032 30032 VANADIUM 48
|
||||||
|
30033 30033 VANADIUM 49
|
||||||
|
30034 30034 CHROME 51
|
||||||
|
30035 30035 MANGANESE 52
|
||||||
|
30036 30036 MANGANESE 54
|
||||||
|
30037 30037 IRON 55
|
||||||
|
30038 30038 IRON 59
|
||||||
|
30039 30039 COBALT 56
|
||||||
|
30040 30040 COBALT 57
|
||||||
|
30041 30041 COBALT 58
|
||||||
|
30042 30042 COBALT 60
|
||||||
|
30043 30043 NICKEL 59
|
||||||
|
30044 30044 NICKEL 63
|
||||||
|
30045 30045 ZINC 65
|
||||||
|
30046 30046 GALLIUM 67
|
||||||
|
30047 30047 GALLIUM 68
|
||||||
|
30048 30048 GERMANIUM 68
|
||||||
|
30049 30049 GERMANIUM 69
|
||||||
|
30050 30050 ARSENIC 73
|
||||||
|
30051 30051 SELENIUM 75
|
||||||
|
30052 30052 SELENIUM 79
|
||||||
|
30053 30053 RUBIDIUM 81
|
||||||
|
30054 30054 RUBIDIUM 83
|
||||||
|
30055 30055 RUBIDIUM 84
|
||||||
|
30056 30056 RUBIDIUM 86
|
||||||
|
30057 30057 RUBIDIUM 87
|
||||||
|
30058 30058 RUBIDIUM 88
|
||||||
|
30059 30059 KRYPTON 85
|
||||||
|
30060 30060 KRYPTON 85 METASTABLE
|
||||||
|
30061 30061 KRYPTON 87
|
||||||
|
30062 30062 KRYPTON 88
|
||||||
|
30063 30063 KRYPTON 89
|
||||||
|
30064 30064 STRONTIUM 85
|
||||||
|
30065 30065 STRONTIUM 89
|
||||||
|
30066 30066 STRONTIUM 89/90
|
||||||
|
30067 30067 STRONTIUM 90
|
||||||
|
30068 30068 STRONTIUM 91
|
||||||
|
30069 30069 STRONTIUM 92
|
||||||
|
30070 30070 YTTRIUM 87
|
||||||
|
30071 30071 YTTRIUM 88
|
||||||
|
30072 30072 YTTRIUM 90
|
||||||
|
30073 30073 YTTRIUM 91
|
||||||
|
30074 30074 YTTRIUM 91 METASTABLE
|
||||||
|
30075 30075 YTTRIUM 92
|
||||||
|
30076 30076 YTTRIUM 93
|
||||||
|
30077 30077 ZIRCONIUM 89
|
||||||
|
30078 30078 ZIRCONIUM 93
|
||||||
|
30079 30079 ZIRCONIUM 95
|
||||||
|
30080 30080 ZIRCONIUM 97
|
||||||
|
30081 30081 NIOBIUM 93 METASTABLE
|
||||||
|
30082 30082 NIOBIUM 94
|
||||||
|
30083 30083 NIOBIUM 95
|
||||||
|
30084 30084 NIOBIUM 95 METASTABLE
|
||||||
|
30085 30085 NIOBIUM 97
|
||||||
|
30086 30086 NIOBIUM 97 METASTABLE
|
||||||
|
30087 30087 MOLYBDENUM 93
|
||||||
|
30088 30088 MOLYBDENUM 99
|
||||||
|
30089 30089 TECHNETIUM 95 METASTABLE
|
||||||
|
30090 30090 TECHNETIUM 96
|
||||||
|
30091 30091 TECHNETIUM 99
|
||||||
|
30092 30092 TECHNETIUM 99 METASTABLE
|
||||||
|
30093 30093 RHODIUM 99
|
||||||
|
30094 30094 RHODIUM 101
|
||||||
|
30095 30095 RHODIUM 102 METASTABLE
|
||||||
|
30096 30096 RHODIUM 103 METASTABLE
|
||||||
|
30097 30097 RHODIUM 105
|
||||||
|
30098 30098 RHODIUM 106
|
||||||
|
30099 30099 PALLADIUM 100
|
||||||
|
30100 30100 PALLADIUM 103
|
||||||
|
30101 30101 PALLADIUM 107
|
||||||
|
30102 30102 RUTHENIUM 103
|
||||||
|
30103 30103 RUTHENIUM 105
|
||||||
|
30104 30104 RUTHENIUM 106
|
||||||
|
30105 30105 SILVER 108 METASTABLE
|
||||||
|
30106 30106 SILVER 110 METASTABLE
|
||||||
|
30107 30107 CADMIUM 109
|
||||||
|
30108 30108 CADMIUM 113 METASTABLE
|
||||||
|
30109 30109 CADMIUM 115 METASTABLE
|
||||||
|
30110 30110 INDIUM 114 METASTABLE
|
||||||
|
30111 30111 TIN 113
|
||||||
|
30112 30112 TIN 119 METASTABLE
|
||||||
|
30113 30113 TIN 121 METASTABLE
|
||||||
|
30114 30114 TIN 122
|
||||||
|
30115 30115 TIN 123
|
||||||
|
30116 30116 TIN 126
|
||||||
|
30117 30117 ANTIMONY 124
|
||||||
|
30118 30118 ANTIMONY 125
|
||||||
|
30119 30119 ANTIMONY 126
|
||||||
|
30120 30120 ANTIMONY 127
|
||||||
|
30121 30121 ANTIMONY 129
|
||||||
|
30122 30122 TELLURIUM 123 METASTABLE
|
||||||
|
30123 30123 TELLURIUM 125 METASTABLE
|
||||||
|
30124 30124 TELLURIUM 127
|
||||||
|
30125 30125 TELLURIUM 127 METASTABLE
|
||||||
|
30126 30126 TELLURIUM 129
|
||||||
|
30127 30127 TELLURIUM 129 METASTABLE
|
||||||
|
30128 30128 TELLURIUM 131 METASTABLE
|
||||||
|
30129 30129 TELLURIUM 132
|
||||||
|
30130 30130 IODINE 123
|
||||||
|
30131 30131 IODINE 124
|
||||||
|
30132 30132 IODINE 125
|
||||||
|
30133 30133 IODINE 126
|
||||||
|
30134 30134 IODINE 129
|
||||||
|
30135 30135 IODINE 129 ELEMENTARY GASEOUS
|
||||||
|
30136 30136 IODINE 129 ORGANIC BOUNDED
|
||||||
|
30137 30137 IODINE 131
|
||||||
|
30138 30138 IODINE 131 ELEMENTARY GASEOUS
|
||||||
|
30139 30139 IODINE 131 ORGANIC BOUNDED
|
||||||
|
30140 30140 IODINE 131 GASEOUS ELEMENTARY AND ORGANIC BOUNDED
|
||||||
|
30141 30141 IODINE 131 AEROSOL
|
||||||
|
30142 30142 IODINE 132
|
||||||
|
30143 30143 IODINE 132 ELEMENTARY GASEOUS
|
||||||
|
30144 30144 IODINE 132 ORGANIC BOUNDED
|
||||||
|
30145 30145 IODINE 132 GASEOUS ELEMENTARY AND ORGANIC BOUNDED
|
||||||
|
30146 30146 IODINE 132 AEROSOL
|
||||||
|
30147 30147 IODINE 133
|
||||||
|
30148 30148 IODINE 133 ELEMENTARY GASEOUS
|
||||||
|
30149 30149 IODINE 133 ORGANIC BOUNDED
|
||||||
|
30150 30150 IODINE 133 GASEOUS ELEMENTARY AND ORGANIC BOUNDED
|
||||||
|
30151 30151 IODINE 133 AEROSOL
|
||||||
|
30152 30152 IODINE 134
|
||||||
|
30153 30153 IODINE 134 ELEMENTARY GASEOUS
|
||||||
|
30154 30154 IODINE 134 ORGANIC BOUNDED
|
||||||
|
30155 30155 IODINE 135
|
||||||
|
30156 30156 IODINE 135 ELEMENTARY GASEOUS
|
||||||
|
30157 30157 IODINE 135 ORGANIC BOUNDED
|
||||||
|
30158 30158 IODINE 135 GASEOUS ELEMENTARY AND ORGANIC BOUNDED
|
||||||
|
30159 30159 IODINE 135 AEROSOL
|
||||||
|
30160 30160 XENON 131 METASTABLE
|
||||||
|
30161 30161 XENON 133
|
||||||
|
30162 30162 XENON 133 METASTABLE
|
||||||
|
30163 30163 XENON 135
|
||||||
|
30164 30164 XENON 135 METASTABLE
|
||||||
|
30165 30165 XENON 137
|
||||||
|
30166 30166 XENON 138
|
||||||
|
30167 30167 XENON SUM OF ALL XENON ISOTOPES
|
||||||
|
30168 30168 CAESIUM 131
|
||||||
|
30169 30169 CAESIUM 134
|
||||||
|
30170 30170 CAESIUM 135
|
||||||
|
30171 30171 CAESIUM 136
|
||||||
|
30172 30172 CAESIUM 137
|
||||||
|
30173 30173 BARIUM 133
|
||||||
|
30174 30174 BARIUM 137 METASTABLE
|
||||||
|
30175 30175 BARIUM 140
|
||||||
|
30176 30176 CERIUM 139
|
||||||
|
30177 30177 CERIUM 141
|
||||||
|
30178 30178 CERIUM 143
|
||||||
|
30179 30179 CERIUM 144
|
||||||
|
30180 30180 LANTHANUM 140
|
||||||
|
30181 30181 LANTHANUM 141
|
||||||
|
30182 30182 PRASEODYMIUM 143
|
||||||
|
30183 30183 PRASEODYMIUM 144
|
||||||
|
30184 30184 PRASEODYMIUM 144 METASTABLE
|
||||||
|
30185 30185 SAMARIUM 145
|
||||||
|
30186 30186 SAMARIUM 147
|
||||||
|
30187 30187 SAMARIUM 151
|
||||||
|
30188 30188 NEODYMIUM 147
|
||||||
|
30189 30189 PROMETHIUM 146
|
||||||
|
30190 30190 PROMETHIUM 147
|
||||||
|
30191 30191 PROMETHIUM 151
|
||||||
|
30192 30192 EUROPIUM 152
|
||||||
|
30193 30193 EUROPIUM 154
|
||||||
|
30194 30194 EUROPIUM 155
|
||||||
|
30195 30195 GADOLINIUM 153
|
||||||
|
30196 30196 TERBIUM 160
|
||||||
|
30197 30197 HOLMIUM 166 METASTABLE
|
||||||
|
30198 30198 THULIUM 170
|
||||||
|
30199 30199 YTTERBIUM 169
|
||||||
|
30200 30200 HAFNIUM 175
|
||||||
|
30201 30201 HAFNIUM 181
|
||||||
|
30202 30202 TANTALUM 179
|
||||||
|
30203 30203 TANTALUM 182
|
||||||
|
30204 30204 RHENIUM 184
|
||||||
|
30205 30205 IRIDIUM 192
|
||||||
|
30206 30206 MERCURY 203
|
||||||
|
30207 30207 THALLIUM 204
|
||||||
|
30208 30208 THALLIUM 207
|
||||||
|
30209 30209 THALLIUM 208
|
||||||
|
30210 30210 THALLIUM 209
|
||||||
|
30211 30211 BISMUTH 205
|
||||||
|
30212 30212 BISMUTH 207
|
||||||
|
30213 30213 BISMUTH 210
|
||||||
|
30214 30214 BISMUTH 211
|
||||||
|
30215 30215 BISMUTH 212
|
||||||
|
30216 30216 BISMUTH 213
|
||||||
|
30217 30217 BISMUTH 214
|
||||||
|
30218 30218 POLONIUM 208
|
||||||
|
30219 30219 POLONIUM 210
|
||||||
|
30220 30220 POLONIUM 212
|
||||||
|
30221 30221 POLONIUM 213
|
||||||
|
30222 30222 POLONIUM 214
|
||||||
|
30223 30223 POLONIUM 215
|
||||||
|
30224 30224 POLONIUM 216
|
||||||
|
30225 30225 POLONIUM 218
|
||||||
|
30226 30226 LEAD 209
|
||||||
|
30227 30227 LEAD 210
|
||||||
|
30228 30228 LEAD 211
|
||||||
|
30229 30229 LEAD 212
|
||||||
|
30230 30230 LEAD 214
|
||||||
|
30231 30231 ASTATINE 217
|
||||||
|
30232 30232 RADON 219
|
||||||
|
30233 30233 RADON 220
|
||||||
|
30234 30234 RADON 222
|
||||||
|
30235 30235 FRANCIUM 221
|
||||||
|
30236 30236 FRANCIUM 223
|
||||||
|
30237 30237 RADIUM 223
|
||||||
|
30238 30238 RADIUM 224
|
||||||
|
30239 30239 RADIUM 225
|
||||||
|
30240 30240 RADIUM 226
|
||||||
|
30241 30241 RADIUM 228
|
||||||
|
30242 30242 ACTINIUM 225
|
||||||
|
30243 30243 ACTINIUM 227
|
||||||
|
30244 30244 ACTINIUM 228
|
||||||
|
30245 30245 THORIUM 227
|
||||||
|
30246 30246 THORIUM 228
|
||||||
|
30247 30247 THORIUM 229
|
||||||
|
30248 30248 THORIUM 230
|
||||||
|
30249 30249 THORIUM 231
|
||||||
|
30250 30250 THORIUM 232
|
||||||
|
30251 30251 THORIUM 234
|
||||||
|
30252 30252 PROTACTINIUM 231
|
||||||
|
30253 30253 PROTACTINIUM 233
|
||||||
|
30254 30254 PROTACTINIUM 234 METASTABLE
|
||||||
|
30255 30255 URANIUM 232
|
||||||
|
30256 30256 URANIUM 233
|
||||||
|
30257 30257 URANIUM 234
|
||||||
|
30258 30258 URANIUM 235
|
||||||
|
30259 30259 URANIUM 236
|
||||||
|
30260 30260 URANIUM 237
|
||||||
|
30261 30261 URANIUM 238
|
||||||
|
30262 30262 PLUTONIUM 236
|
||||||
|
30263 30263 PLUTONIUM 238
|
||||||
|
30264 30264 PLUTONIUM 239
|
||||||
|
30265 30265 PLUTONIUM 240
|
||||||
|
30266 30266 PLUTONIUM 241
|
||||||
|
30267 30267 PLUTONIUM 242
|
||||||
|
30268 30268 PLUTONIUM 244
|
||||||
|
30269 30269 NEPTUNIUM 237
|
||||||
|
30270 30270 NEPTUNIUM 238
|
||||||
|
30271 30271 NEPTUNIUM 239
|
||||||
|
30272 30272 AMERICIUM 241
|
||||||
|
30273 30273 AMERICIUM 242
|
||||||
|
30274 30274 AMERICIUM 242 METASTABLE
|
||||||
|
30275 30275 AMERICIUM 243
|
||||||
|
30276 30276 CURIUM 242
|
||||||
|
30277 30277 CURIUM 243
|
||||||
|
30278 30278 CURIUM 244
|
||||||
|
30279 30279 CURIUM 245
|
||||||
|
30280 30280 CURIUM 246
|
||||||
|
30281 30281 CURIUM 247
|
||||||
|
30282 30282 CURIUM 248
|
||||||
|
30283 30283 CURIUM 243/244
|
||||||
|
30284 30284 PLUTONIUM 238/AMERICIUM 241
|
||||||
|
30285 30285 PLUTONIUM 239/240
|
||||||
|
30286 30286 BERKELIUM 249
|
||||||
|
30287 30287 CALIFORNIUM 249
|
||||||
|
30288 30288 CALIFORNIUM 250
|
||||||
|
30289 30289 CALIFORNIUM 252
|
||||||
|
30290 30290 SUM AEROSOL PARTICULATES
|
||||||
|
30291 30291 SUM IODINE
|
||||||
|
30292 30292 SUM NOBLE GAS
|
||||||
|
30293 30293 ACTIVATION GAS
|
||||||
|
30294 30294 CS-137 EQUIVALENT
|
||||||
|
30295 30295 CARBON-13
|
||||||
|
30296 30296 LEAD
|
||||||
|
30297 30297 TELLURIUM 131
|
||||||
|
30298 30298 NEODYMIUM 137
|
||||||
|
40000 40000 SINGLET SIGMA OXYGEN (DIOXYGEN (SIGMA SINGLET))
|
||||||
|
40001 40001 SINGLET DELTA OXYGEN (DIOXYGEN (DELTA SINGLET))
|
||||||
|
40002 40002 SINGLET EXCITED OXYGEN ATOM
|
||||||
|
40003 40003 TRIPLET GROUND STATE OXYGEN ATOM
|
||||||
|
60000 60000 HOX RADICAL (OH+HO2)
|
||||||
|
60001 60001 TOTAL INORGANIC AND ORGANIC PEROXY RADICALS (HOO* + ROO*)
|
||||||
|
60002 60002 PASSIVE OZONE
|
||||||
|
60003 60003 NOX EXPRESSED AS NITROGEN
|
||||||
|
60004 60004 ALL NITROGEN OXIDES (NOY) EXPRESSED AS NITROGEN
|
||||||
|
60005 60005 TOTAL INORGANIC CHLORINE
|
||||||
|
60006 60006 TOTAL INORGANIC BROMINE
|
||||||
|
60007 60007 TOTAL INORGANIC CHLORINE EXCEPT HCL, CLONO2: CLOX
|
||||||
|
60008 60008 TOTAL INORGANIC BROMINE EXCEPT HBR, BRONO2: BROX
|
||||||
|
60009 60009 LUMPED ALKANES
|
||||||
|
60010 60010 LUMPED ALKENES
|
||||||
|
60011 60011 LUMPED AROMATIC COMPOUNDS
|
||||||
|
60012 60012 LUMPED TERPENES
|
||||||
|
60013 60013 NON-METHANE VOLATILE ORGANIC COMPOUNDS EXPRESSED AS CARBON
|
||||||
|
60014 60014 ANTHROPOGENIC NON-METHANE VOLATILE ORGANIC COMPOUNDS EXPRESSED AS CARBON
|
||||||
|
60015 60015 BIOGENIC NON-METHANE VOLATILE ORGANIC COMPOUNDS EXPRESSED AS CARBON
|
||||||
|
60016 60016 LUMPED OXYGENATED HYDROCARBONS
|
||||||
|
60017 60017 NOX EXPRESSED AS NITROGEN DIOXIDE (NO2)
|
||||||
|
60018 60018 ORGANIC ALDEHYDES
|
||||||
|
60019 60019 ORGANIC PEROXIDES
|
||||||
|
60020 60020 ORGANIC NITRATES
|
||||||
|
60021 60021 ETHERS
|
||||||
|
60022 60022 AMINES
|
||||||
|
60023 60023 KETONES
|
||||||
|
60024 60024 DICARBONYLS UNSATURATED
|
||||||
|
60025 60025 HYDROXY DICARBONYLS UNSATURATED
|
||||||
|
60026 60026 HYDROXY KETONES
|
||||||
|
60027 60027 OXIDES
|
||||||
|
60028 60028 PEROXYACYL NITRATES
|
||||||
|
60029 60029 AROMATIC PEROXIDE RADICAL (ARYL DIOXYDANYL RADICALS)
|
||||||
|
60030 60030 BIOGENIC SECONDARY ORGANIC COMPOUND
|
||||||
|
60031 60031 ANTHROPOGENIC SECONDARY ORGANIC COMPOUND
|
||||||
|
60032 60032 ALL HYDROXY-PEROXIDES PRODUCTS OF THE REACTION OF HYDROXY-ISOPRENE ADDUCTS WITH O2
|
||||||
|
60033 60033 ANTHROPOGENIC VOLATILE ORGANIC COMPOUNDS
|
||||||
|
60034 60034 BIOMASS BURNING VOLATILE ORGANIC COMPOUNDS
|
||||||
|
62000 62000 TOTAL AEROSOL
|
||||||
|
62001 62001 DUST DRY
|
||||||
|
62002 62002 WATER IN AMBIENT
|
||||||
|
62003 62003 AMMONIUM DRY
|
||||||
|
62004 62004 NITRATE DRY
|
||||||
|
62005 62005 NITRIC ACID TRIHYDRATE
|
||||||
|
62006 62006 SULPHATE DRY
|
||||||
|
62007 62007 MERCURY DRY
|
||||||
|
62008 62008 SEA SALT DRY
|
||||||
|
62009 62009 BLACK CARBON DRY
|
||||||
|
62010 62010 PARTICULATE ORGANIC MATTER DRY
|
||||||
|
62011 62011 PRIMARY PARTICULATE ORGANIC MATTER DRY
|
||||||
|
62012 62012 SECONDARY PARTICULATE ORGANIC MATTER DRY
|
||||||
|
62013 62013 BLACK CARBON HYDROPHILIC DRY
|
||||||
|
62014 62014 BLACK CARBON HYDROPHOBIC DRY
|
||||||
|
62015 62015 PARTICULATE ORGANIC MATTER HYDROPHILIC DRY
|
||||||
|
62016 62016 PARTICULATE ORGANIC MATTER HYDROPHOBIC DRY
|
||||||
|
62017 62017 NITRATE HYDROPHILIC DRY
|
||||||
|
62018 62018 NITRATE HYDROPHOBIC DRY
|
||||||
|
62019 62019 RESERVED
|
||||||
|
62020 62020 SMOKE - HIGH ABSORPTION
|
||||||
|
62021 62021 SMOKE - LOW ABSORPTION
|
||||||
|
62022 62022 AEROSOL - HIGH ABSORPTION
|
||||||
|
62023 62023 AEROSOL - LOW ABSORPTION
|
||||||
|
62024 62024 RESERVED
|
||||||
|
62025 62025 VOLCANIC ASH
|
||||||
|
62026 62026 PARTICULATE MATTER (PM)
|
||||||
|
62027 62027 RESERVED
|
||||||
|
62028 62028 TOTAL AEROSOL HYDROPHILIC
|
||||||
|
62029 62029 TOTAL AEROSOL HYDROPHOBIC
|
||||||
|
62030 62030 PRIMARY PARTICULATE INORGANIC MATTER DRY
|
||||||
|
62031 62031 SECONDARY PARTICULATE INORGANIC MATTER DRY
|
||||||
|
62032 62032 BIOGENIC SECONDARY ORGANIC AEROSOL
|
||||||
|
62033 62033 ANTHROPOGENIC SECONDARY ORGANIC AEROSOL
|
||||||
|
62034 62034 RAIN WATER
|
||||||
|
62035 62035 CLOUD WATER
|
||||||
|
62036 62036 BROWN CARBON DRY
|
||||||
|
62100 62100 ALNUS (ALDER) POLLEN
|
||||||
|
62101 62101 BETULA (BIRCH) POLLEN
|
||||||
|
62102 62102 CASTANEA (CHESTNUT) POLLEN
|
||||||
|
62103 62103 CARPINUS (HORNBEAM) POLLEN
|
||||||
|
62104 62104 CORYLUS (HAZEL) POLLEN
|
||||||
|
62105 62105 FAGUS (BEECH) POLLEN
|
||||||
|
62106 62106 FRAXINUS (ASH) POLLEN
|
||||||
|
62107 62107 PINUS (PINE) POLLEN
|
||||||
|
62108 62108 PLATANUS (PLANE) POLLEN
|
||||||
|
62109 62109 POPULUS (COTTONWOOD, POPLAR) POLLEN
|
||||||
|
62110 62110 QUERCUS (OAK) POLLEN
|
||||||
|
62111 62111 SALIX (WILLOW) POLLEN
|
||||||
|
62112 62112 TAXUS (YEW) POLLEN
|
||||||
|
62113 62113 TILIA (LIME, LINDEN) POLLEN
|
||||||
|
62114 62114 ULMUS (ELM) POLLEN
|
||||||
|
62115 62115 OLEA (OLIVE) POLLEN
|
||||||
|
62200 62200 AMBROSIA (RAGWEED, BURR-RAGWEED) POLLEN
|
||||||
|
62201 62201 ARTEMISIA (SAGEBRUSH, WORMWOOD, MUGWORT) POLLEN
|
||||||
|
62202 62202 BRASSICA (RAPE, BROCCOLI, BRUSSELS SPROUTS, CABBAGE, CAULIFLOWER, COLLARDS, KALE, KOHLRABI, MUSTARD, RUTABAGA) POLLEN
|
||||||
|
62203 62203 PLANTAGO (PLANTAIN) POLLEN
|
||||||
|
62204 62204 RUMEX (DOCK, SORREL) POLLEN
|
||||||
|
62205 62205 URTICA (NETTLE) POLLEN
|
||||||
|
62300 62300 POACEAE (GRASS FAMILY) POLLEN
|
||||||
|
65535 65535 MISSING
|
|
@ -23,7 +23,7 @@ alias Lo1 = longitudeOfFirstGridPoint;
|
||||||
include "grib1/resolution_flags.def";
|
include "grib1/resolution_flags.def";
|
||||||
|
|
||||||
# LoV - orientation of the grid; i.e. the longitude value of the meridian which is parallel to the Y-axis
|
# LoV - orientation of the grid; i.e. the longitude value of the meridian which is parallel to the Y-axis
|
||||||
signed[3] orientationOfTheGrid ;
|
signed[3] orientationOfTheGrid : edition_specific, no_copy ;
|
||||||
meta geography.orientationOfTheGridInDegrees scale(orientationOfTheGrid,oneConstant,grib1divider,truncateDegrees) : dump;
|
meta geography.orientationOfTheGridInDegrees scale(orientationOfTheGrid,oneConstant,grib1divider,truncateDegrees) : dump;
|
||||||
alias LoV = orientationOfTheGrid ;
|
alias LoV = orientationOfTheGrid ;
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ alias xFirst=longitudeOfFirstGridPointInDegrees;
|
||||||
include "grib1/scanning_mode.def";
|
include "grib1/scanning_mode.def";
|
||||||
|
|
||||||
# Latin 1 - first latitude from the pole at which the secant cone cuts the sphere
|
# Latin 1 - first latitude from the pole at which the secant cone cuts the sphere
|
||||||
signed[3] Latin1 : edition_specific;
|
signed[3] Latin1 : edition_specific, no_copy;
|
||||||
meta geography.Latin1InDegrees scale(Latin1,oneConstant,grib1divider,truncateDegrees) : dump;
|
meta geography.Latin1InDegrees scale(Latin1,oneConstant,grib1divider,truncateDegrees) : dump;
|
||||||
alias firstLatitude=Latin1;
|
alias firstLatitude=Latin1;
|
||||||
alias firstLatitudeInDegrees=Latin1InDegrees;
|
alias firstLatitudeInDegrees=Latin1InDegrees;
|
||||||
|
@ -70,7 +70,7 @@ constant LaDInDegrees = Latin1InDegrees : dump;
|
||||||
alias geography.LaDInDegrees=LaDInDegrees;
|
alias geography.LaDInDegrees=LaDInDegrees;
|
||||||
|
|
||||||
# Latin 2 - second latitude from the pole at which the secant cone cuts the sphere
|
# Latin 2 - second latitude from the pole at which the secant cone cuts the sphere
|
||||||
signed[3] Latin2 :edition_specific;
|
signed[3] Latin2 :edition_specific,no_copy;
|
||||||
alias secondLatitude=Latin2;
|
alias secondLatitude=Latin2;
|
||||||
meta geography.Latin2InDegrees scale(Latin2,oneConstant,grib1divider,truncateDegrees) : dump;
|
meta geography.Latin2InDegrees scale(Latin2,oneConstant,grib1divider,truncateDegrees) : dump;
|
||||||
alias secondLatitudeInDegrees=Latin2InDegrees;
|
alias secondLatitudeInDegrees=Latin2InDegrees;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# (C) Copyright 2005- ECMWF.
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
signed[3] latitudeOfSouthernPole : edition_specific;
|
signed[3] latitudeOfSouthernPole : edition_specific, no_copy;
|
||||||
meta geography.latitudeOfSouthernPoleInDegrees scale(latitudeOfSouthernPole ,oneConstant,grib1divider,truncateDegrees) : dump;
|
meta geography.latitudeOfSouthernPoleInDegrees scale(latitudeOfSouthernPole ,oneConstant,grib1divider,truncateDegrees): dump;
|
||||||
|
|
||||||
signed[3] longitudeOfSouthernPole : edition_specific ;
|
signed[3] longitudeOfSouthernPole : edition_specific, no_copy;
|
||||||
meta geography.longitudeOfSouthernPoleInDegrees scale(longitudeOfSouthernPole ,oneConstant,grib1divider,truncateDegrees) : dump;
|
meta geography.longitudeOfSouthernPoleInDegrees scale(longitudeOfSouthernPole ,oneConstant,grib1divider,truncateDegrees): dump;
|
||||||
|
|
||||||
ibmfloat geography.angleOfRotationInDegrees : dump;
|
ibmfloat geography.angleOfRotationInDegrees : dump;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
# aliasing MARS date and time to the date and time defined in section 1
|
||||||
|
alias mars.date = dataDate;
|
||||||
|
alias mars.time = dataTime;
|
||||||
|
|
||||||
|
# dateOfAnalysis and timeOfAnalysis still exist in this stream but is not used in MARS
|
||||||
|
|
||||||
|
unalias mars.step;
|
||||||
|
alias mars.step = stepRange;
|
|
@ -1 +1,5 @@
|
||||||
alias mars.step = endStep;
|
if (levtype is "o2d" || levtype is "o3d") {
|
||||||
|
alias mars.step = stepRange;
|
||||||
|
} else {
|
||||||
|
alias mars.step = endStep;
|
||||||
|
}
|
||||||
|
|
|
@ -154,17 +154,18 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
||||||
grib_accessor_change_scanning_direction* self = (grib_accessor_change_scanning_direction*)a;
|
grib_accessor_change_scanning_direction* self = (grib_accessor_change_scanning_direction*)a;
|
||||||
grib_context* c = a->context;
|
grib_context* c = a->context;
|
||||||
grib_handle* h = grib_handle_of_accessor(a);
|
grib_handle* h = grib_handle_of_accessor(a);
|
||||||
|
const char* cclass_name = a->cclass->name;
|
||||||
|
|
||||||
if (*val == 0)
|
if (*val == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Make sure Ni / Nj are not missing */
|
/* Make sure Ni / Nj are not missing */
|
||||||
if (grib_is_missing(h, self->Ni, &err) && !err) {
|
if (grib_is_missing(h, self->Ni, &err) && !err) {
|
||||||
grib_context_log(c, GRIB_LOG_ERROR, "change_scanning_direction: Key %s cannot be 'missing'!", self->Ni);
|
grib_context_log(c, GRIB_LOG_ERROR, "%s: Key %s cannot be 'missing'!", cclass_name, self->Ni);
|
||||||
return GRIB_WRONG_GRID;
|
return GRIB_WRONG_GRID;
|
||||||
}
|
}
|
||||||
if (grib_is_missing(h, self->Nj, &err) && !err) {
|
if (grib_is_missing(h, self->Nj, &err) && !err) {
|
||||||
grib_context_log(c, GRIB_LOG_ERROR, "change_scanning_direction: Key %s cannot be 'missing'!", self->Nj);
|
grib_context_log(c, GRIB_LOG_ERROR, "%s: Key %s cannot be 'missing'!", cclass_name, self->Nj);
|
||||||
return GRIB_WRONG_GRID;
|
return GRIB_WRONG_GRID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +188,7 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (size > Ni * Nj) {
|
if (size > Ni * Nj) {
|
||||||
grib_context_log(c, GRIB_LOG_ERROR, "change_scanning_direction: wrong values size!=Ni*Nj (%ld!=%ld*%ld)", size, Ni, Nj);
|
grib_context_log(c, GRIB_LOG_ERROR, "%s: Wrong values size!=Ni*Nj (%ld!=%ld*%ld)", cclass_name, size, Ni, Nj);
|
||||||
return GRIB_WRONG_ARRAY_SIZE;
|
return GRIB_WRONG_ARRAY_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -315,6 +315,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
{
|
{
|
||||||
grib_accessor_data_complex_packing* self = (grib_accessor_data_complex_packing*)a;
|
grib_accessor_data_complex_packing* self = (grib_accessor_data_complex_packing*)a;
|
||||||
grib_handle* gh = grib_handle_of_accessor(a);
|
grib_handle* gh = grib_handle_of_accessor(a);
|
||||||
|
const char* cclass_name = a->cclass->name;
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
int ret = GRIB_SUCCESS;
|
int ret = GRIB_SUCCESS;
|
||||||
|
@ -431,8 +432,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
n_vals = (pen_j + 1) * (pen_j + 2);
|
n_vals = (pen_j + 1) * (pen_j + 2);
|
||||||
|
|
||||||
if (*len != n_vals) {
|
if (*len != n_vals) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "COMPLEX_PACKING: wrong number of values, expected %ld - got %lu",
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s: Wrong number of values, expected %ld - got %zu",
|
||||||
n_vals, *len);
|
cclass_name, n_vals, *len);
|
||||||
return GRIB_INTERNAL_ERROR;
|
return GRIB_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -488,7 +489,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
hpos = 0;
|
hpos = 0;
|
||||||
|
|
||||||
scals = (double*)grib_context_malloc(a->context, maxv * sizeof(double));
|
scals = (double*)grib_context_malloc(a->context, maxv * sizeof(double));
|
||||||
Assert(scals);
|
if (!scals) return GRIB_OUT_OF_MEMORY;
|
||||||
|
|
||||||
scals[0] = 0;
|
scals[0] = 0;
|
||||||
for (i = 1; i < maxv; i++)
|
for (i = 1; i < maxv; i++)
|
||||||
|
@ -544,7 +545,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
&reference_value);
|
&reference_value);
|
||||||
if (ret != GRIB_SUCCESS) {
|
if (ret != GRIB_SUCCESS) {
|
||||||
grib_context_log(gh->context, GRIB_LOG_ERROR,
|
grib_context_log(gh->context, GRIB_LOG_ERROR,
|
||||||
"unable to find nearest_smaller_value of %g for %s", min, self->reference_value);
|
"%s: unable to find nearest_smaller_value of %g for %s", cclass_name, min, self->reference_value);
|
||||||
return GRIB_INTERNAL_ERROR;
|
return GRIB_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
d = grib_power<double>(+decimal_scale_factor, 10);
|
d = grib_power<double>(+decimal_scale_factor, 10);
|
||||||
|
@ -553,7 +554,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
d = grib_power<double>(+decimal_scale_factor, 10);
|
d = grib_power<double>(+decimal_scale_factor, 10);
|
||||||
if (grib_get_nearest_smaller_value(gh, self->reference_value, d * min, &reference_value) != GRIB_SUCCESS) {
|
if (grib_get_nearest_smaller_value(gh, self->reference_value, d * min, &reference_value) != GRIB_SUCCESS) {
|
||||||
grib_context_log(gh->context, GRIB_LOG_ERROR,
|
grib_context_log(gh->context, GRIB_LOG_ERROR,
|
||||||
"unable to find nearest_smaller_value of %g for %s", d * min, self->reference_value);
|
"%s: unable to find nearest_smaller_value of %g for %s", cclass_name, d * min, self->reference_value);
|
||||||
return GRIB_INTERNAL_ERROR;
|
return GRIB_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
binary_scale_factor = grib_get_binary_scale_fact(d * max, reference_value, bits_per_value, &ret);
|
binary_scale_factor = grib_get_binary_scale_fact(d * max, reference_value, bits_per_value, &ret);
|
||||||
|
@ -565,7 +566,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (ret != GRIB_SUCCESS) {
|
if (ret != GRIB_SUCCESS) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "COMPLEX_PACKING : Cannot compute binary_scale_factor");
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s: Cannot compute binary_scale_factor", cclass_name);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -610,13 +611,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5);
|
current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5);
|
||||||
if (current_val < 0)
|
if (current_val < 0)
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"COMPLEX_PACKING : negative coput before packing (%g)", current_val);
|
"%s: negative coput before packing (%g)", cclass_name, current_val);
|
||||||
grib_encode_unsigned_longb(lres, current_val, &lpos, bits_per_value);
|
grib_encode_unsigned_longb(lres, current_val, &lpos, bits_per_value);
|
||||||
|
|
||||||
current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5);
|
current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5);
|
||||||
if (current_val < 0)
|
if (current_val < 0)
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"COMPLEX_PACKING : negative coput before packing (%g)", current_val);
|
"%s: negative coput before packing (%g)", cclass_name, current_val);
|
||||||
grib_encode_unsigned_longb(lres, current_val, &lpos, bits_per_value);
|
grib_encode_unsigned_longb(lres, current_val, &lpos, bits_per_value);
|
||||||
lup++;
|
lup++;
|
||||||
}
|
}
|
||||||
|
@ -626,13 +627,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5);
|
current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5);
|
||||||
if (current_val < 0)
|
if (current_val < 0)
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"COMPLEX_PACKING : negative coput before packing (%g)", current_val);
|
"%s: negative coput before packing (%g)", cclass_name, current_val);
|
||||||
grib_encode_unsigned_long(lres, current_val, &lpos, bits_per_value);
|
grib_encode_unsigned_long(lres, current_val, &lpos, bits_per_value);
|
||||||
|
|
||||||
current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5);
|
current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5);
|
||||||
if (current_val < 0)
|
if (current_val < 0)
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"COMPLEX_PACKING : negative coput before packing (%g)", current_val);
|
"%s: negative coput before packing (%g)", cclass_name, current_val);
|
||||||
grib_encode_unsigned_long(lres, current_val, &lpos, bits_per_value);
|
grib_encode_unsigned_long(lres, current_val, &lpos, bits_per_value);
|
||||||
lup++;
|
lup++;
|
||||||
}
|
}
|
||||||
|
@ -646,7 +647,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
|
|
||||||
if (((hpos / 8) != hsize) && ((lpos / 8) != lsize)) {
|
if (((hpos / 8) != hsize) && ((lpos / 8) != lsize)) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"COMPLEX_PACKING : Mismatch in packing between high resolution and low resolution part");
|
"%s: Mismatch in packing between high resolution and low resolution part", cclass_name);
|
||||||
grib_context_free(a->context, buf);
|
grib_context_free(a->context, buf);
|
||||||
grib_context_free(a->context, scals);
|
grib_context_free(a->context, scals);
|
||||||
return GRIB_INTERNAL_ERROR;
|
return GRIB_INTERNAL_ERROR;
|
||||||
|
@ -682,6 +683,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||||
grib_accessor_data_complex_packing* self = (grib_accessor_data_complex_packing*)a;
|
grib_accessor_data_complex_packing* self = (grib_accessor_data_complex_packing*)a;
|
||||||
grib_handle* gh = grib_handle_of_accessor(a);
|
grib_handle* gh = grib_handle_of_accessor(a);
|
||||||
|
const char* cclass_name = a->cclass->name;
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
int ret = GRIB_SUCCESS;
|
int ret = GRIB_SUCCESS;
|
||||||
|
@ -817,7 +819,6 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
packed_offset = grib_byte_offset(a) + bytes * (sub_k + 1) * (sub_k + 2);
|
packed_offset = grib_byte_offset(a) + bytes * (sub_k + 1) * (sub_k + 2);
|
||||||
|
|
||||||
lpos = 8 * (packed_offset - offsetdata);
|
lpos = 8 * (packed_offset - offsetdata);
|
||||||
|
@ -826,7 +827,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||||
d = grib_power<T>(-decimal_scale_factor, 10);
|
d = grib_power<T>(-decimal_scale_factor, 10);
|
||||||
|
|
||||||
scals = (T*)grib_context_malloc(a->context, maxv * sizeof(T));
|
scals = (T*)grib_context_malloc(a->context, maxv * sizeof(T));
|
||||||
Assert(scals);
|
if (!scals) return GRIB_OUT_OF_MEMORY;
|
||||||
|
|
||||||
scals[0] = 0;
|
scals[0] = 0;
|
||||||
for (i = 1; i < maxv; i++) {
|
for (i = 1; i < maxv; i++) {
|
||||||
|
@ -835,8 +836,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||||
scals[i] = (1.0 / operat);
|
scals[i] = (1.0 / operat);
|
||||||
else {
|
else {
|
||||||
grib_context_log(a->context, GRIB_LOG_WARNING,
|
grib_context_log(a->context, GRIB_LOG_WARNING,
|
||||||
"COMPLEX_PACKING : problem with operator div by zero at index %d of %d \n",
|
"%s: Problem with operator div by zero at index %d of %d", cclass_name, i, maxv);
|
||||||
i, maxv);
|
|
||||||
scals[i] = 0;
|
scals[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -910,24 +910,24 @@ static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
||||||
// TODO(maee): See ECC-1579
|
// TODO(maee): See ECC-1579
|
||||||
// Investigate why results are not bit-identical
|
// Investigate why results are not bit-identical
|
||||||
|
|
||||||
return unpack<float>(a, val, len);
|
// return unpack<float>(a, val, len);
|
||||||
|
|
||||||
//int err = 0;
|
int err = 0;
|
||||||
//size_t i = 0;
|
size_t i = 0;
|
||||||
//size_t size = *len;
|
size_t size = *len;
|
||||||
//double* val8 = NULL;
|
double* val8 = NULL;
|
||||||
//val8 = (double*)grib_context_malloc(a->context, size*(sizeof(double)));
|
val8 = (double*)grib_context_malloc(a->context, size*(sizeof(double)));
|
||||||
//if (!val8)
|
if (!val8) return GRIB_OUT_OF_MEMORY;
|
||||||
// return GRIB_OUT_OF_MEMORY;
|
|
||||||
//err = unpack<double>(a, val8, len);
|
|
||||||
//if (err) {
|
|
||||||
// grib_context_free(a->context,val8);
|
|
||||||
// return err;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//for(i=0; i<size; i++)
|
err = unpack<double>(a, val8, len);
|
||||||
// val[i] = val8[i];
|
if (err) {
|
||||||
//grib_context_free(a->context,val8);
|
grib_context_free(a->context,val8);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i=0; i<size; i++)
|
||||||
|
val[i] = val8[i];
|
||||||
|
grib_context_free(a->context,val8);
|
||||||
|
|
||||||
return GRIB_SUCCESS;
|
return GRIB_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -348,7 +348,7 @@ static int min_max_array(double* data, unsigned int n, double* min, double* max)
|
||||||
|
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
*min = *max = 0.0;
|
*min = *max = 0.0;
|
||||||
return 1;
|
return GRIB_DECODING_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (first = 0; first < n; first++) {
|
for (first = 0; first < n; first++) {
|
||||||
|
@ -356,7 +356,7 @@ static int min_max_array(double* data, unsigned int n, double* min, double* max)
|
||||||
}
|
}
|
||||||
if (first >= n) {
|
if (first >= n) {
|
||||||
*min = *max = 0.0;
|
*min = *max = 0.0;
|
||||||
return 1;
|
return GRIB_DECODING_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
mn = mx = data[first];
|
mn = mx = data[first];
|
||||||
|
@ -381,7 +381,7 @@ static int min_max_array(double* data, unsigned int n, double* min, double* max)
|
||||||
|
|
||||||
*min = mn;
|
*min = mn;
|
||||||
*max = mx;
|
*max = mx;
|
||||||
return 0;
|
return GRIB_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -522,16 +522,15 @@ static int unpack(grib_accessor* a, T* val, const size_t* len)
|
||||||
{
|
{
|
||||||
static_assert(std::is_floating_point<T>::value, "Requires floating points numbers");
|
static_assert(std::is_floating_point<T>::value, "Requires floating points numbers");
|
||||||
grib_accessor_data_g22order_packing* self = reinterpret_cast<grib_accessor_data_g22order_packing*>(a);
|
grib_accessor_data_g22order_packing* self = reinterpret_cast<grib_accessor_data_g22order_packing*>(a);
|
||||||
|
const char* cclass_name = a->cclass->name;
|
||||||
|
grib_handle* gh = grib_handle_of_accessor(a);
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
size_t j = 0;
|
size_t j = 0;
|
||||||
long n_vals = 0;
|
long n_vals = 0;
|
||||||
long vcount = 0;
|
long vcount = 0;
|
||||||
int err = GRIB_SUCCESS;
|
int err = GRIB_SUCCESS;
|
||||||
|
long* sec_val = NULL;
|
||||||
long* sec_val = NULL;
|
|
||||||
grib_handle* gh = grib_handle_of_accessor(a);
|
|
||||||
|
|
||||||
unsigned char* buf = reinterpret_cast<unsigned char*>(gh->buffer->data);
|
unsigned char* buf = reinterpret_cast<unsigned char*>(gh->buffer->data);
|
||||||
unsigned char* buf_ref = NULL;
|
unsigned char* buf_ref = NULL;
|
||||||
unsigned char* buf_width = NULL;
|
unsigned char* buf_width = NULL;
|
||||||
|
@ -542,7 +541,6 @@ static int unpack(grib_accessor* a, T* val, const size_t* len)
|
||||||
long ref_p = 0;
|
long ref_p = 0;
|
||||||
long width_p = 0;
|
long width_p = 0;
|
||||||
long vals_p = 0;
|
long vals_p = 0;
|
||||||
|
|
||||||
long nvals_per_group = 0;
|
long nvals_per_group = 0;
|
||||||
long nbits_per_group_val = 0;
|
long nbits_per_group_val = 0;
|
||||||
long group_ref_val = 0;
|
long group_ref_val = 0;
|
||||||
|
@ -738,7 +736,7 @@ static int unpack(grib_accessor* a, T* val, const size_t* len)
|
||||||
// For Complex packing and spatial differencing, order == 1 or 2 (code table 5.6)
|
// For Complex packing and spatial differencing, order == 1 or 2 (code table 5.6)
|
||||||
if (orderOfSpatialDifferencing != 1 && orderOfSpatialDifferencing != 2) {
|
if (orderOfSpatialDifferencing != 1 && orderOfSpatialDifferencing != 2) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"grid_complex unpacking: Unsupported order of spatial differencing %ld", orderOfSpatialDifferencing);
|
"%s unpacking: Unsupported order of spatial differencing %ld", cclass_name, orderOfSpatialDifferencing);
|
||||||
return GRIB_INTERNAL_ERROR;
|
return GRIB_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1182,6 +1180,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
unsigned char* sec7;
|
unsigned char* sec7;
|
||||||
grib_accessor_data_g22order_packing* self = reinterpret_cast<grib_accessor_data_g22order_packing*>(a);
|
grib_accessor_data_g22order_packing* self = reinterpret_cast<grib_accessor_data_g22order_packing*>(a);
|
||||||
grib_handle* gh = grib_handle_of_accessor(a);
|
grib_handle* gh = grib_handle_of_accessor(a);
|
||||||
|
const char* cclass_name = a->cclass->name;
|
||||||
|
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
|
@ -1211,7 +1210,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
int use_bitmap;
|
int use_bitmap;
|
||||||
|
|
||||||
int j, j0, k, *v, binary_scale, nbits, has_undef, extra_0, extra_1;
|
int j, j0, k, *v, binary_scale, nbits, has_undef, extra_0, extra_1;
|
||||||
unsigned int i, ii;
|
size_t i, ii;
|
||||||
int vmn, vmx, vbits;
|
int vmn, vmx, vbits;
|
||||||
// Sections
|
// Sections
|
||||||
double max_val, min_val, ref, frange, dec_factor, scale;
|
double max_val, min_val, ref, frange, dec_factor, scale;
|
||||||
|
@ -1332,7 +1331,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
size_t ndata = *len;
|
size_t ndata = *len;
|
||||||
double* data = reinterpret_cast<double*>(grib_context_malloc_clear(a->context, ndata * sizeof(double)));
|
double* data = reinterpret_cast<double*>(grib_context_malloc_clear(a->context, ndata * sizeof(double)));
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "grid_complex packing: unable to allocate %zu bytes", ndata * sizeof(double));
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: unable to allocate %zu bytes", cclass_name, ndata * sizeof(double));
|
||||||
return GRIB_OUT_OF_MEMORY;
|
return GRIB_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
memcpy(data, val, sizeof(*data) * ndata);
|
memcpy(data, val, sizeof(*data) * ndata);
|
||||||
|
@ -1352,11 +1351,11 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
|
|
||||||
v = reinterpret_cast<int*>(grib_context_malloc(a->context, nndata * sizeof(int)));
|
v = reinterpret_cast<int*>(grib_context_malloc(a->context, nndata * sizeof(int)));
|
||||||
if (v == NULL) {
|
if (v == NULL) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "grid_complex packing: unable to allocate %d bytes", nndata * sizeof(int));
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: unable to allocate %zu bytes", cclass_name, nndata * sizeof(int));
|
||||||
return GRIB_OUT_OF_MEMORY;
|
return GRIB_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
if (min_max_array(data, ndata, &mn, &mx) != 0) {
|
if (min_max_array(data, ndata, &mn, &mx) != GRIB_SUCCESS) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "grid_complex packing: failed to get min max of data");
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: failed to get min max of data", cclass_name);
|
||||||
return GRIB_ENCODING_ERROR;
|
return GRIB_ENCODING_ERROR;
|
||||||
}
|
}
|
||||||
min_val = static_cast<double>(mn);
|
min_val = static_cast<double>(mn);
|
||||||
|
@ -1535,7 +1534,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
|
|
||||||
list = reinterpret_cast<section*>(grib_context_malloc_clear(a->context, nstruct * sizeof(section)));
|
list = reinterpret_cast<section*>(grib_context_malloc_clear(a->context, nstruct * sizeof(section)));
|
||||||
if (list == NULL) {
|
if (list == NULL) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "grid_complex packing: memory allocation of list failed");
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: memory allocation of list failed",cclass_name);
|
||||||
return GRIB_OUT_OF_MEMORY;
|
return GRIB_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1565,7 +1564,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
start.tail = &list[0];
|
start.tail = &list[0];
|
||||||
|
|
||||||
if (nstruct != ii + 1) {
|
if (nstruct != ii + 1) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "grid_complex packing: nstruct=%zu wanted %lu", nstruct, ii + 1);
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: nstruct=%zu wanted %zu", cclass_name, nstruct, ii + 1);
|
||||||
return GRIB_ENCODING_ERROR;
|
return GRIB_ENCODING_ERROR;
|
||||||
}
|
}
|
||||||
for (i = 1; i < nstruct; i++) {
|
for (i = 1; i < nstruct; i++) {
|
||||||
|
@ -1593,7 +1592,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
|
|
||||||
list_backup = reinterpret_cast<section*>(grib_context_malloc(a->context, nstruct * sizeof(section)));
|
list_backup = reinterpret_cast<section*>(grib_context_malloc(a->context, nstruct * sizeof(section)));
|
||||||
if (list_backup == NULL) {
|
if (list_backup == NULL) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "grid_complex packing: memory allocation of list_backup failed");
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: memory allocation of list_backup failed", cclass_name);
|
||||||
return GRIB_OUT_OF_MEMORY;
|
return GRIB_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1673,7 +1672,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
itmp2 = reinterpret_cast<int*>(grib_context_malloc(a->context, ngroups * sizeof(int)));
|
itmp2 = reinterpret_cast<int*>(grib_context_malloc(a->context, ngroups * sizeof(int)));
|
||||||
|
|
||||||
if (lens == NULL || widths == NULL || refs == NULL || itmp == NULL || itmp2 == NULL) {
|
if (lens == NULL || widths == NULL || refs == NULL || itmp == NULL || itmp2 == NULL) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "grid_complex packing: memory allocation of lens/widths/refs/itmp/itmp2 failed");
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: memory alloc of lens/widths/refs/itmp/itmp2 failed",cclass_name);
|
||||||
return GRIB_OUT_OF_MEMORY;
|
return GRIB_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1808,7 +1807,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
|
|
||||||
sec7 = reinterpret_cast<unsigned char*>(grib_context_malloc(a->context, size_sec7));
|
sec7 = reinterpret_cast<unsigned char*>(grib_context_malloc(a->context, size_sec7));
|
||||||
if (sec7 == NULL) {
|
if (sec7 == NULL) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "grid_complex packing: unable to allocate %d bytes", size_sec7);
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: unable to allocate %d bytes", cclass_name, size_sec7);
|
||||||
return GRIB_OUT_OF_MEMORY;
|
return GRIB_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||||
{
|
{
|
||||||
grib_accessor_data_run_length_packing* self = (grib_accessor_data_run_length_packing*)a;
|
grib_accessor_data_run_length_packing* self = (grib_accessor_data_run_length_packing*)a;
|
||||||
grib_handle* gh = grib_handle_of_accessor(a);
|
grib_handle* gh = grib_handle_of_accessor(a);
|
||||||
|
const char* cclass_name = a->cclass->name;
|
||||||
int err = GRIB_SUCCESS;
|
int err = GRIB_SUCCESS;
|
||||||
long seclen, number_of_values, bits_per_value, max_level_value, number_of_level_values, decimal_scale_factor;
|
long seclen, number_of_values, bits_per_value, max_level_value, number_of_level_values, decimal_scale_factor;
|
||||||
long* level_values = NULL;
|
long* level_values = NULL;
|
||||||
|
@ -195,9 +196,9 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||||
range = (1 << bits_per_value) - 1 - max_level_value;
|
range = (1 << bits_per_value) - 1 - max_level_value;
|
||||||
if ((max_level_value <= 0) || (number_of_level_values <= 0) || (max_level_value > number_of_level_values) || (range <= 0)) {
|
if ((max_level_value <= 0) || (number_of_level_values <= 0) || (max_level_value > number_of_level_values) || (range <= 0)) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"data_run_length_packing: parameters are invalid: max_level_value=%ld(>0, <=number_of_level_values), "
|
"%s: parameters are invalid: max_level_value=%ld(>0, <=number_of_level_values), "
|
||||||
"number_of_level_values=%ld(>0, >=max_level_value), range=%ld(>0)",
|
"number_of_level_values=%ld(>0, >=max_level_value), range=%ld(>0)",
|
||||||
max_level_value, number_of_level_values, range);
|
cclass_name, max_level_value, number_of_level_values, range);
|
||||||
return GRIB_DECODING_ERROR;
|
return GRIB_DECODING_ERROR;
|
||||||
}
|
}
|
||||||
if (decimal_scale_factor > 127) {
|
if (decimal_scale_factor > 127) {
|
||||||
|
@ -220,9 +221,9 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||||
while (i < number_of_compressed_values) {
|
while (i < number_of_compressed_values) {
|
||||||
if (compressed_values[i] > max_level_value) {
|
if (compressed_values[i] > max_level_value) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"data_run_length_packing: numberOfValues mismatch: i=%d, "
|
"%s: numberOfValues mismatch: i=%d, "
|
||||||
"compressed_values[i]=%ld, max_level_value=%ld",
|
"compressed_values[i]=%ld, max_level_value=%ld",
|
||||||
i, compressed_values[i], max_level_value);
|
cclass_name, i, compressed_values[i], max_level_value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
v = compressed_values[i++];
|
v = compressed_values[i++];
|
||||||
|
@ -234,8 +235,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if (n > number_of_values) {
|
if (n > number_of_values) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "data_run_length_packing: numberOfValues mismatch: n=%ld, number_of_values=%ld",
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s: numberOfValues mismatch: n=%ld, number_of_values=%ld",
|
||||||
n, number_of_values);
|
cclass_name, n, number_of_values);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (k = 0; k < n; k++) {
|
for (k = 0; k < n; k++) {
|
||||||
|
@ -246,8 +247,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||||
grib_context_free(a->context, levels);
|
grib_context_free(a->context, levels);
|
||||||
grib_context_free(a->context, compressed_values);
|
grib_context_free(a->context, compressed_values);
|
||||||
if (j != number_of_values) {
|
if (j != number_of_values) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "data_run_length_packing: numberOfValues mismatch: j=%ld, number_of_values=%ld",
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s: numberOfValues mismatch: j=%ld, number_of_values=%ld",
|
||||||
j, number_of_values);
|
cclass_name, j, number_of_values);
|
||||||
return GRIB_DECODING_ERROR;
|
return GRIB_DECODING_ERROR;
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
|
@ -255,6 +256,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||||
|
|
||||||
static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
{
|
{
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "Changing the packing type to 'grid_run_length' is not implemented.");
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
|
"%s: Function '%s' is not implemented", a->cclass->name, __func__);
|
||||||
return GRIB_NOT_IMPLEMENTED;
|
return GRIB_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/********************************
|
|
||||||
* Enrico Fucile
|
|
||||||
*******************************/
|
|
||||||
|
|
||||||
#include "grib_api_internal_cpp.h"
|
#include "grib_api_internal_cpp.h"
|
||||||
#include "grib_optimize_decimal_factor.h"
|
#include "grib_optimize_decimal_factor.h"
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
@ -198,6 +194,7 @@ static int value_count(grib_accessor* a, long* number_of_values)
|
||||||
static int unpack_double_element(grib_accessor* a, size_t idx, double* val)
|
static int unpack_double_element(grib_accessor* a, size_t idx, double* val)
|
||||||
{
|
{
|
||||||
grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a;
|
grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a;
|
||||||
|
const char* cclass_name = a->cclass->name;
|
||||||
|
|
||||||
long n_vals;
|
long n_vals;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
@ -242,8 +239,8 @@ static int unpack_double_element(grib_accessor* a, size_t idx, double* val)
|
||||||
d = grib_power<double>(-decimal_scale_factor, 10);
|
d = grib_power<double>(-decimal_scale_factor, 10);
|
||||||
|
|
||||||
grib_context_log(a->context, GRIB_LOG_DEBUG,
|
grib_context_log(a->context, GRIB_LOG_DEBUG,
|
||||||
"grib_accessor_data_simple_packing: unpack_double_element: creating %s, %d values (idx=%ld)",
|
"%s: %s: creating %s, %ld values (idx=%zu)",
|
||||||
a->name, n_vals, idx);
|
cclass_name, __func__, a->name, n_vals, idx);
|
||||||
|
|
||||||
buf += grib_byte_offset(a);
|
buf += grib_byte_offset(a);
|
||||||
|
|
||||||
|
@ -251,14 +248,11 @@ static int unpack_double_element(grib_accessor* a, size_t idx, double* val)
|
||||||
|
|
||||||
if (bits_per_value % 8) {
|
if (bits_per_value % 8) {
|
||||||
grib_context_log(a->context, GRIB_LOG_DEBUG,
|
grib_context_log(a->context, GRIB_LOG_DEBUG,
|
||||||
"unpack_double_element: calling outline function : bpv %d, rv : %g, sf : %d, dsf : %d ",
|
"%s: calling outline function : bpv %ld, rv: %g, bsf: %ld, dsf: %ld ",
|
||||||
bits_per_value, reference_value, binary_scale_factor, decimal_scale_factor);
|
cclass_name, bits_per_value, reference_value, binary_scale_factor, decimal_scale_factor);
|
||||||
pos = idx * bits_per_value;
|
pos = idx * bits_per_value;
|
||||||
*val = (double)(((
|
*val = (double)(((grib_decode_unsigned_long(buf, &pos, bits_per_value) * s) + reference_value) * d);
|
||||||
grib_decode_unsigned_long(buf, &pos, bits_per_value) * s) +
|
/* val[i] = grib_decode_unsigned_long(buf, &pos, bits_per_value); */
|
||||||
reference_value) *
|
|
||||||
d);
|
|
||||||
/* val[i] = grib_decode_unsigned_long(buf, &pos, bits_per_value); */
|
|
||||||
/* fprintf(stdout,"unpck uuu-o: %d vals %d bitspv buf %d by long \n", n_vals, bits_per_value, pos/8);*/
|
/* fprintf(stdout,"unpck uuu-o: %d vals %d bitspv buf %d by long \n", n_vals, bits_per_value, pos/8);*/
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -298,6 +292,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||||
|
|
||||||
grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a;
|
grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a;
|
||||||
|
const char* cclass_name = a->cclass->name;
|
||||||
grib_handle* gh = grib_handle_of_accessor(a);
|
grib_handle* gh = grib_handle_of_accessor(a);
|
||||||
unsigned char* buf = (unsigned char*)grib_handle_of_accessor(a)->buffer->data;
|
unsigned char* buf = (unsigned char*)grib_handle_of_accessor(a)->buffer->data;
|
||||||
|
|
||||||
|
@ -377,8 +372,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||||
d = grib_power<double>(-decimal_scale_factor, 10);
|
d = grib_power<double>(-decimal_scale_factor, 10);
|
||||||
|
|
||||||
grib_context_log(a->context, GRIB_LOG_DEBUG,
|
grib_context_log(a->context, GRIB_LOG_DEBUG,
|
||||||
"grib_accessor_data_simple_packing: unpack_double : creating %s, %d values",
|
"%s %s: Creating %s, %zu values", cclass_name, __func__, a->name, n_vals);
|
||||||
a->name, n_vals);
|
|
||||||
|
|
||||||
offsetBeforeData = grib_byte_offset(a);
|
offsetBeforeData = grib_byte_offset(a);
|
||||||
buf += offsetBeforeData;
|
buf += offsetBeforeData;
|
||||||
|
@ -394,8 +388,9 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||||
const long valuesSize = (bits_per_value * n_vals) / 8; /*in bytes*/
|
const long valuesSize = (bits_per_value * n_vals) / 8; /*in bytes*/
|
||||||
if (offsetBeforeData + valuesSize > offsetAfterData) {
|
if (offsetBeforeData + valuesSize > offsetAfterData) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"Data section size mismatch: offset before data=%ld, offset after data=%ld (num values=%ld, bits per value=%ld)",
|
"%s: Data section size mismatch: "
|
||||||
offsetBeforeData, offsetAfterData, n_vals, bits_per_value);
|
"offset before data=%ld, offset after data=%ld (num values=%zu, bits per value=%ld)",
|
||||||
|
cclass_name, offsetBeforeData, offsetAfterData, n_vals, bits_per_value);
|
||||||
return GRIB_DECODING_ERROR;
|
return GRIB_DECODING_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -411,8 +406,8 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||||
}
|
}
|
||||||
|
|
||||||
grib_context_log(a->context, GRIB_LOG_DEBUG,
|
grib_context_log(a->context, GRIB_LOG_DEBUG,
|
||||||
"unpack_double: calling outline function : bpv %d, rv : %g, sf : %d, dsf : %d ",
|
"%s %s: calling outline function: bpv: %ld, rv: %g, bsf: %ld, dsf: %ld",
|
||||||
bits_per_value, reference_value, binary_scale_factor, decimal_scale_factor);
|
cclass_name, __func__, bits_per_value, reference_value, binary_scale_factor, decimal_scale_factor);
|
||||||
grib_decode_array<T>(buf, &pos, bits_per_value, reference_value, s, d, n_vals, val);
|
grib_decode_array<T>(buf, &pos, bits_per_value, reference_value, s, d, n_vals, val);
|
||||||
|
|
||||||
*len = (long)n_vals;
|
*len = (long)n_vals;
|
||||||
|
@ -445,6 +440,7 @@ static int _unpack_double(grib_accessor* a, double* val, size_t* len, unsigned c
|
||||||
{
|
{
|
||||||
grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a;
|
grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a;
|
||||||
grib_handle* gh = grib_handle_of_accessor(a);
|
grib_handle* gh = grib_handle_of_accessor(a);
|
||||||
|
const char* cclass_name = a->cclass->name;
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
@ -514,8 +510,7 @@ static int _unpack_double(grib_accessor* a, double* val, size_t* len, unsigned c
|
||||||
d = grib_power<double>(-decimal_scale_factor, 10);
|
d = grib_power<double>(-decimal_scale_factor, 10);
|
||||||
|
|
||||||
grib_context_log(a->context, GRIB_LOG_DEBUG,
|
grib_context_log(a->context, GRIB_LOG_DEBUG,
|
||||||
"grib_accessor_data_simple_packing: unpack_double : creating %s, %d values",
|
"%s %s: Creating %s, %zu values", cclass_name, __func__, a->name, n_vals);
|
||||||
a->name, n_vals);
|
|
||||||
|
|
||||||
offsetBeforeData = grib_byte_offset(a);
|
offsetBeforeData = grib_byte_offset(a);
|
||||||
buf += offsetBeforeData;
|
buf += offsetBeforeData;
|
||||||
|
@ -620,6 +615,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
{
|
{
|
||||||
grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a;
|
grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a;
|
||||||
grib_handle* gh = grib_handle_of_accessor(a);
|
grib_handle* gh = grib_handle_of_accessor(a);
|
||||||
|
const char* cclass_name = a->cclass->name;
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
size_t n_vals = *len;
|
size_t n_vals = *len;
|
||||||
|
@ -694,8 +690,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
double ref = 1e-100;
|
double ref = 1e-100;
|
||||||
grib_get_double_internal(gh, self->reference_value, &ref);
|
grib_get_double_internal(gh, self->reference_value, &ref);
|
||||||
if (ref != reference_value) {
|
if (ref != reference_value) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "data_simple_packing %s: (ref=%.10e != reference_value=%.10e)",
|
grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: (ref=%.10e != reference_value=%.10e)",
|
||||||
__func__, ref, reference_value);
|
cclass_name, __func__, ref, reference_value);
|
||||||
return GRIB_INTERNAL_ERROR;
|
return GRIB_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -756,8 +752,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
err = number_of_bits((unsigned long)ceil(fabs(max - min)), &bits_per_value);
|
err = number_of_bits((unsigned long)ceil(fabs(max - min)), &bits_per_value);
|
||||||
if (err) {
|
if (err) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"Range of values too large. Try a smaller value for decimal precision (less than %ld)",
|
"%s %s: Range of values too large. Try a smaller value for decimal precision (less than %ld)",
|
||||||
decimal_scale_factor);
|
cclass_name, __func__, decimal_scale_factor);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -463,7 +463,7 @@ static int pack_long(grib_accessor* a, const long* v, size_t* len)
|
||||||
double* val = (double*)grib_context_malloc(c, *len * (sizeof(double)));
|
double* val = (double*)grib_context_malloc(c, *len * (sizeof(double)));
|
||||||
if (!val) {
|
if (!val) {
|
||||||
grib_context_log(c, GRIB_LOG_ERROR,
|
grib_context_log(c, GRIB_LOG_ERROR,
|
||||||
"Unable to allocate %d bytes\n", (int)(*len * (sizeof(double))));
|
"Unable to allocate %zu bytes", *len * (sizeof(double)));
|
||||||
return GRIB_OUT_OF_MEMORY;
|
return GRIB_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
for (i = 0; i < *len; i++)
|
for (i = 0; i < *len; i++)
|
||||||
|
@ -473,7 +473,6 @@ static int pack_long(grib_accessor* a, const long* v, size_t* len)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
grib_context_log(c, GRIB_LOG_ERROR, "Should not grib_pack %s as long", a->name);
|
grib_context_log(c, GRIB_LOG_ERROR, "Should not grib_pack %s as long", a->name);
|
||||||
Assert(0);
|
|
||||||
return GRIB_NOT_IMPLEMENTED;
|
return GRIB_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,7 +564,7 @@ static int pack_bytes(grib_accessor* a, const unsigned char* val, size_t* len)
|
||||||
const size_t length = *len;
|
const size_t length = *len;
|
||||||
if (length != a->length) {
|
if (length != a->length) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"pack_bytes: Wrong size (%lu) for %s. It is %lu bytes long",
|
"pack_bytes: Wrong size (%zu) for %s. It is %ld bytes long",
|
||||||
length, a->name, a->length);
|
length, a->name, a->length);
|
||||||
return GRIB_BUFFER_TOO_SMALL;
|
return GRIB_BUFFER_TOO_SMALL;
|
||||||
}
|
}
|
||||||
|
@ -599,7 +598,7 @@ static void update_size(grib_accessor* a, size_t s)
|
||||||
{
|
{
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"Accessor %s [%s] must implement 'update_size'", a->name, a->cclass->name);
|
"Accessor %s [%s] must implement 'update_size'", a->name, a->cclass->name);
|
||||||
Assert(0 == 1);
|
Assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static grib_accessor* next(grib_accessor* a, int mod)
|
static grib_accessor* next(grib_accessor* a, int mod)
|
||||||
|
|
|
@ -210,7 +210,7 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
||||||
rlen = count;
|
rlen = count;
|
||||||
|
|
||||||
if (*len < 1) {
|
if (*len < 1) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size for %s it contains %d values ", a->name, 1);
|
grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size for %s, it contains %d values", a->name, 1);
|
||||||
len[0] = 0;
|
len[0] = 0;
|
||||||
return GRIB_ARRAY_TOO_SMALL;
|
return GRIB_ARRAY_TOO_SMALL;
|
||||||
}
|
}
|
||||||
|
@ -222,9 +222,22 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
||||||
|
|
||||||
if (rlen == 1) {
|
if (rlen == 1) {
|
||||||
long v = val[0];
|
long v = val[0];
|
||||||
if (missing)
|
if (missing) {
|
||||||
if (v == GRIB_MISSING_LONG)
|
if (v == GRIB_MISSING_LONG)
|
||||||
v = missing;
|
v = missing;
|
||||||
|
} else {
|
||||||
|
// ECC-1605: Check overflow/underflow
|
||||||
|
const int nbits = self->nbytes * 8;
|
||||||
|
const long minval = -(1L << (nbits-1)) + 1;
|
||||||
|
const long maxval = (1L << (nbits-1)) - 1;
|
||||||
|
//printf(" key=%s: v=%ld (minval=%ld maxval=%ld)\n", a->name, v, minval, maxval);
|
||||||
|
if (v > maxval || v < minval) {
|
||||||
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
|
"Key \"%s\": Trying to encode value of %ld but the allowable range is %ld to %ld (number of bits=%d)",
|
||||||
|
a->name, v, minval, maxval, nbits);
|
||||||
|
return GRIB_ENCODING_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
off = a->offset;
|
off = a->offset;
|
||||||
ret = grib_encode_signed_long(grib_handle_of_accessor(a)->buffer->data, v, off, a->length);
|
ret = grib_encode_signed_long(grib_handle_of_accessor(a)->buffer->data, v, off, a->length);
|
||||||
|
|
|
@ -220,7 +220,7 @@ int pack_long_unsigned_helper(grib_accessor* a, const long* val, size_t* len, in
|
||||||
if (check) {
|
if (check) {
|
||||||
if (val[0] < 0) {
|
if (val[0] < 0) {
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"Key \"%s\": Trying to encode a negative value of %ld for key of type unsigned\n", a->name, val[0]);
|
"Key \"%s\": Trying to encode a negative value of %ld for key of type unsigned", a->name, val[0]);
|
||||||
return GRIB_ENCODING_ERROR;
|
return GRIB_ENCODING_ERROR;
|
||||||
}
|
}
|
||||||
/* See GRIB-23 and GRIB-262 */
|
/* See GRIB-23 and GRIB-262 */
|
||||||
|
@ -230,8 +230,8 @@ int pack_long_unsigned_helper(grib_accessor* a, const long* val, size_t* len, in
|
||||||
unsigned long maxval = (1UL << nbits) - 1;
|
unsigned long maxval = (1UL << nbits) - 1;
|
||||||
if (maxval > 0 && v > maxval) { /* See ECC-1002 */
|
if (maxval > 0 && v > maxval) { /* See ECC-1002 */
|
||||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||||
"Key \"%s\": Trying to encode value of %ld but the maximum allowable value is %ld (number of bits=%ld)\n",
|
"Key \"%s\": Trying to encode value of %ld but the maximum allowable value is %lu (number of bits=%ld)",
|
||||||
a->name, v, maxval, nbits);
|
a->name, v, maxval, nbits);
|
||||||
return GRIB_ENCODING_ERROR;
|
return GRIB_ENCODING_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,6 +191,8 @@ static void dump_long(grib_dumper* d, grib_accessor* a, const char* comment)
|
||||||
fprintf(self->dumper.out, "%ld-%ld %s %s = %ld", self->begin, self->theEnd, a->creator->op, a->name, value);
|
fprintf(self->dumper.out, "%ld-%ld %s %s = %ld", self->begin, self->theEnd, a->creator->op, a->name, value);
|
||||||
if (comment)
|
if (comment)
|
||||||
fprintf(self->dumper.out, " [%s]", comment);
|
fprintf(self->dumper.out, " [%s]", comment);
|
||||||
|
if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0)
|
||||||
|
fprintf(self->dumper.out, " (%s)", grib_get_type_name(grib_accessor_get_native_type(a)));
|
||||||
if ((a->flags & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING) != 0)
|
if ((a->flags & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING) != 0)
|
||||||
fprintf(self->dumper.out, " %s", "(can be missing)");
|
fprintf(self->dumper.out, " %s", "(can be missing)");
|
||||||
if ((a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) != 0)
|
if ((a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) != 0)
|
||||||
|
@ -269,6 +271,8 @@ static void dump_double(grib_dumper* d, grib_accessor* a, const char* comment)
|
||||||
fprintf(self->dumper.out, "%ld-%ld %s %s = %g", self->begin, self->theEnd, a->creator->op, a->name, value);
|
fprintf(self->dumper.out, "%ld-%ld %s %s = %g", self->begin, self->theEnd, a->creator->op, a->name, value);
|
||||||
if (comment)
|
if (comment)
|
||||||
fprintf(self->dumper.out, " [%s]", comment);
|
fprintf(self->dumper.out, " [%s]", comment);
|
||||||
|
if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0)
|
||||||
|
fprintf(self->dumper.out, " (%s)", grib_get_type_name(grib_accessor_get_native_type(a)));
|
||||||
if (err)
|
if (err)
|
||||||
fprintf(self->dumper.out, " *** ERR=%d (%s) [grib_dumper_debug::dump_double]", err, grib_get_error_message(err));
|
fprintf(self->dumper.out, " *** ERR=%d (%s) [grib_dumper_debug::dump_double]", err, grib_get_error_message(err));
|
||||||
aliases(d, a);
|
aliases(d, a);
|
||||||
|
@ -317,6 +321,9 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
||||||
|
|
||||||
if (comment)
|
if (comment)
|
||||||
fprintf(self->dumper.out, " [%s]", comment);
|
fprintf(self->dumper.out, " [%s]", comment);
|
||||||
|
if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0)
|
||||||
|
fprintf(self->dumper.out, " (%s)", grib_get_type_name(grib_accessor_get_native_type(a)));
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
fprintf(self->dumper.out, " *** ERR=%d (%s) [grib_dumper_debug::dump_string]", err, grib_get_error_message(err));
|
fprintf(self->dumper.out, " *** ERR=%d (%s) [grib_dumper_debug::dump_string]", err, grib_get_error_message(err));
|
||||||
aliases(d, a);
|
aliases(d, a);
|
||||||
|
|
|
@ -82,8 +82,8 @@ fi
|
||||||
rm -f $outfile1 $outfile2
|
rm -f $outfile1 $outfile2
|
||||||
|
|
||||||
infile=${data_dir}/reduced_latlon_surface.grib2
|
infile=${data_dir}/reduced_latlon_surface.grib2
|
||||||
outfile1=$infile.tmp_ccsds.1
|
#outfile1=$infile.tmp_ccsds.1
|
||||||
outfile2=$infile.tmp_ccsds.2
|
#outfile2=$infile.tmp_ccsds.2
|
||||||
|
|
||||||
${tools_dir}/grib_set -r -s packingType=grid_ccsds $infile $outfile1
|
${tools_dir}/grib_set -r -s packingType=grid_ccsds $infile $outfile1
|
||||||
${tools_dir}/grib_compare -b $BLACKLIST $infile $outfile1 > $REDIRECT
|
${tools_dir}/grib_compare -b $BLACKLIST $infile $outfile1 > $REDIRECT
|
||||||
|
@ -101,8 +101,8 @@ rm -f $outfile1 $outfile2
|
||||||
# ECC-297: Basic support
|
# ECC-297: Basic support
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
infile=${data_dir}/tigge_ecmwf.grib2
|
infile=${data_dir}/tigge_ecmwf.grib2
|
||||||
outfile1=$infile.tmp_ccsds.1
|
#outfile1=$infile.tmp_ccsds.1
|
||||||
outfile2=$infile.tmp_ccsds.2
|
#outfile2=$infile.tmp_ccsds.2
|
||||||
|
|
||||||
${tools_dir}/grib_set -r -s bitsPerValue=17 $infile $outfile1
|
${tools_dir}/grib_set -r -s bitsPerValue=17 $infile $outfile1
|
||||||
${tools_dir}/grib_set -r -s packingType=grid_ccsds $outfile1 $outfile2
|
${tools_dir}/grib_set -r -s packingType=grid_ccsds $outfile1 $outfile2
|
||||||
|
@ -143,6 +143,29 @@ grib_check_key_equals $outfile2 packingType grid_ccsds
|
||||||
${tools_dir}/grib_compare -b $BLACKLIST $infile $outfile1
|
${tools_dir}/grib_compare -b $BLACKLIST $infile $outfile1
|
||||||
${tools_dir}/grib_compare -c data:n $outfile1 $outfile2
|
${tools_dir}/grib_compare -c data:n $outfile1 $outfile2
|
||||||
|
|
||||||
|
# Test increasing bitsPerValue
|
||||||
|
# -----------------------------
|
||||||
|
# TODO: This one is broken for some BPV values. It has AEC_DATA_3BYTE_OPTION_MASK==0
|
||||||
|
# input=${data_dir}/ccsds.grib2
|
||||||
|
|
||||||
|
ifs_samples="gg_ml.tmpl gg_sfc_grib2.tmpl"
|
||||||
|
ifs_dir=${proj_dir}/ifs_samples/grib1_mlgrib2_ccsds
|
||||||
|
MAX_BPV=32 # libaec cannot handle more than this
|
||||||
|
|
||||||
|
for sample in $ifs_samples; do
|
||||||
|
input=$ifs_dir/$sample
|
||||||
|
MIN_BPV=`${tools_dir}/grib_get -p bitsPerValue $input`
|
||||||
|
stats1=`${tools_dir}/grib_get -F%.3f -p min,max,avg,sd $input`
|
||||||
|
grib_check_key_equals $input 'bitsPerValue,packingType,AEC_DATA_3BYTE_OPTION_MASK' '16 grid_ccsds 1'
|
||||||
|
for bpv in `seq $MIN_BPV $MAX_BPV`; do
|
||||||
|
${tools_dir}/grib_set -s setBitsPerValue=$bpv $input $outfile2
|
||||||
|
${tools_dir}/grib_compare -c data:n $input $outfile2
|
||||||
|
stats2=`${tools_dir}/grib_get -F%.3f -p min,max,avg,sd $outfile2`
|
||||||
|
[ "$stats1" = "$stats2" ]
|
||||||
|
rm -f $outfile2
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
# ECC-1362
|
# ECC-1362
|
||||||
# ---------
|
# ---------
|
||||||
|
|
|
@ -75,6 +75,23 @@ set -e
|
||||||
[ $status -ne 0 ]
|
[ $status -ne 0 ]
|
||||||
grep -q "Trying to encode a negative value of -1 for key of type unsigned" $temp
|
grep -q "Trying to encode a negative value of -1 for key of type unsigned" $temp
|
||||||
|
|
||||||
|
# ECC-1605: Out-of-bounds value for signed keys
|
||||||
|
# ----------------------------------------------------
|
||||||
|
if [ $ECCODES_ON_WINDOWS -eq 0 ]; then
|
||||||
|
input=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||||
|
set +e
|
||||||
|
${tools_dir}/grib_set -s forecastTime=2147483648 $input $outfile 2>$temp
|
||||||
|
status=$?
|
||||||
|
set -e
|
||||||
|
[ $status -ne 0 ]
|
||||||
|
grep -q "Trying to encode value of 2147483648 but the allowable range is -2147483647 to 2147483647" $temp
|
||||||
|
|
||||||
|
set +e
|
||||||
|
${tools_dir}/grib_set -s forecastTime=-2147483650 $input $outfile 2>$temp
|
||||||
|
status=$?
|
||||||
|
set -e
|
||||||
|
[ $status -ne 0 ]
|
||||||
|
fi
|
||||||
|
|
||||||
# GRIB-941: encoding of GRIB2 angles
|
# GRIB-941: encoding of GRIB2 angles
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
|
|
|
@ -20,6 +20,10 @@ typedef enum ResourceType
|
||||||
static void usage(const char* prog)
|
static void usage(const char* prog)
|
||||||
{
|
{
|
||||||
printf("Usage: %s [-s | -d] resource_path out_file\n", prog);
|
printf("Usage: %s [-s | -d] resource_path out_file\n", prog);
|
||||||
|
printf(" -s Extract a resource from the samples directory\n");
|
||||||
|
printf(" -d Extract a resource from the definitions directory\n");
|
||||||
|
printf("\n");
|
||||||
|
printf(" E.g., %s -s GRIB2.tmpl my.grib2\n", prog);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,6 @@ static int process_file(const char* filename)
|
||||||
GRIB_CHECK(grib_get_long(h, "angleSubdivisions", &angleSubdivisions), 0);
|
GRIB_CHECK(grib_get_long(h, "angleSubdivisions", &angleSubdivisions), 0);
|
||||||
Assert(angleSubdivisions > 0);
|
Assert(angleSubdivisions > 0);
|
||||||
angular_tolerance = 1.0/angleSubdivisions;
|
angular_tolerance = 1.0/angleSubdivisions;
|
||||||
printf(" angular_tolerance=%g\n",angular_tolerance);
|
|
||||||
|
|
||||||
if (N <= 0) {
|
if (N <= 0) {
|
||||||
error(filename, msg_num, "N should be > 0\n", N);
|
error(filename, msg_num, "N should be > 0\n", N);
|
||||||
|
|
Loading…
Reference in New Issue