forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi.modis.qc.html
531 lines (471 loc) · 14.7 KB
/
i.modis.qc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
<h2>DESCRIPTION</h2>
<em>i.modis.qc</em> extracts Requested Quality Assessment flags from the
following MODIS products: MOD09A1, MOD09Q1, MOD11A1, MOD11A2, MOD13A2, MOD13Q1,
MCD43B2. This does include MOD09A1 QA_state_500m layer (see Notes).
<br>
Added MOD09GA support in 2016, it follows MOD09A1 and its StateQA, but does not have BRDF State QA, instead has Salt Pan State QA.
<h3>MOD09A1 and MOD09Q1</h3>
<pre>
<em>MOD09A1/Q1: MODLAND QA Bits. bits=[0-1]</em>
</pre>
<ul>
<li>[00]= class 0: Corrected product produced at ideal quality -- all bands</li>
<li>[01]= class 1: Corrected product produced at less than ideal quality -- some or all bands</li>
<li>[10]= class 2: Corrected product NOT produced due to cloud effect -- all bands</li>
<li>[11]= class 3: Corrected product NOT produced due to other reasons --
some or all bands maybe be fill value (Note that a value of [11] overrides a value of [01])</li>
</ul>
<pre>
<em>MOD09Q1: Cloud State. bits=[2-3] </em>
</pre>
<ul>
<li>[00]= class 0: Clear -- No clouds</li>
<li>[01]= class 1: Cloudy</li>
<li>[10]= class 2: Mixed</li>
<li>[11]= class 3: Not Set ; Assumed Clear</li>
</ul>
<pre>
<em>MOD09Q1: Band-wise Data Quality 250m bits=[4-7][8-11]</em>
<em>MOD09A1: Band-wise Data Quality 500m bits=[2-5][6-9][10-13][14-17][18-21][22-25][26-29]</em>
</pre>
<ul>
<li>[0000]= class 0: highest quality</li>
<li>[0111]= class 1: noisy detector</li>
<li>[1000]= class 2: dead detector; data interpolated in L1B</li>
<li>[1001]= class 3: solar zenith ≥ 86 degrees</li>
<li>[1010]= class 4: solar zenith ≥ 85 and < 86 degrees</li>
<li>[1011]= class 5: missing input</li>
<li>[1100]= class 6: internal constant used in place of climatological data for at least one atmospheric constant</li>
<li>[1101]= class 7: correction out of bounds, pixel constrained to extreme allowable value</li>
<li>[1110]= class 8: L1B data faulty</li>
<li>[1111]= class 9: not processed due to deep ocean or cloud</li>
<li>Class 10-15: Combination of bits unused</li>
</ul>
<pre>
<em>MOD09A1/Q1: Atmospheric correction bit=[12]/[30]</em>
</pre>
<ul>
<li>[0]= class 0: Not Corrected product</li>
<li>[1]= class 1: Corrected product</li>
</ul>
<pre>
<em>MOD09A1/Q1: Adjacency correction bit=[13]/[31]</em>
</pre>
<ul>
<li>[0]= class 0: Not Corrected product</li>
<li>[1]= class 1: Corrected product</li>
</ul>
<pre>
<em>MOD09Q1: Different orbit from 500m product, bit=[14]</em>
</pre>
<ul>
<li>[0]= class 0: same orbit as 500m</li>
<li>[1]= class 1: different orbit from 500m</li>
</ul>
<pre>
<em>MOD09A1s: Cloud State bits=[0-1]</em>
</pre>
<ul>
<li>[00]= class 0: clear</li>
<li>[01]= class 1: cloudy</li>
<li>[10]= class 2: mixed</li>
<li>[11]= class 3: not set, assumed clear</li>
</ul>
<pre>
<em>MOD09A1s: Cloud shadow bits=[2]</em>
</pre>
<ul>
<li>[0]= class 0: no</li>
<li>[1]= class 1: yes</li>
</ul>
<pre>
<em>MOD09A1s: Land/Water Flag bits=[3-5]</em>
</pre>
<ul>
<li>[000]= class 0: Shallow ocean</li>
<li>[001]= class 1: Land</li>
<li>[010]= class 2: Ocean coastlines and lake shorelines</li>
<li>[011]= class 3: Shallow inland water</li>
<li>[100]= class 4: Ephemeral water</li>
<li>[101]= class 5: Deep inland water</li>
<li>[110]= class 6: Continental/moderate ocean</li>
<li>[111]= class 7: Deep ocean</li>
</ul>
<pre>
<em>MOD09A1s: Aerosol Quantity bits=[6-7]</em>
</pre>
<ul>
<li>[00]= class 0: Climatology</li>
<li>[01]= class 1: Low</li>
<li>[10]= class 2: Average</li>
<li>[11]= class 3: High</li>
</ul>
<pre>
<em>MOD09A1s: Cirrus detected bits=[8-9]</em>
</pre>
<ul>
<li>[00]= class 0: None</li>
<li>[01]= class 1: Small</li>
<li>[10]= class 2: Average</li>
<li>[11]= class 3: High</li>
</ul>
<pre>
<em>MOD09A1s: Internal Cloud Algorithm Flag bits=[10]</em>
</pre>
<ul>
<li>[0]= class 0: No cloud</li>
<li>[1]= class 1: Cloud</li>
</ul>
<pre>
<em>MOD09A1s: Internal Fire Algorithm Flag bits=[11]</em>
</pre>
<ul>
<li>[0]= class 0: No fire</li>
<li>[1]= class 1: Fire</li>
</ul>
<pre>
<em>MOD09A1s: MOD35 snow/ice flag bits=[12]</em>
</pre>
<ul>
<li>[0]= class 0: No</li>
<li>[1]= class 1: Yes</li>
</ul>
<pre>
<em>MOD09A1s: Pixel adjacent to cloud bits=[13]</em>
</pre>
<ul>
<li>[0]= class 0: No</li>
<li>[1]= class 1: Yes</li>
</ul>
<pre>
<em>MOD09A1s: BRDF correction performed bits=[14]</em>
</pre>
<ul>
<li>[0]= class 0: No</li>
<li>[1]= class 1: Yes</li>
</ul>
<pre>
<em>MOD09A1s: Internal Snow Mask bits=[15]</em>
</pre>
<ul>
<li>[0]= class 0: No snow</li>
<li>[1]= class 1: Snow</li>
</ul>
<h3>MOD11A1</h3>
<pre>
<em>MOD11A1: Mandatory QA Flags bits=[0-1]</em>
</pre>
<ul>
<li>[00]= class 0: LST produced, good quality, not necessary to examine more detailed QA</li>
<li>[01]= class 1: LST produced, other quality, recommend examination of more detailed QA</li>
<li>[10]= class 2: LST not produced due to cloud effects</li>
<li>[11]= class 3: LST not produced primarily due to reasons other than cloud</li>
</ul>
<pre>
<em>MOD11A1: Data Quality Flag bits=[2-3]</em>
</pre>
<ul>
<li>[00]= class 0: Good data quality of L1B in bands 31 and 32</li>
<li>[01]= class 1: Other quality data</li>
<li>[10]= class 2: TBD</li>
<li>[11]= class 3: TBD</li>
</ul>
<pre>
<em>MOD11A1: Emis Error Flag bits=[4-5]</em>
</pre>
<ul>
<li>[00]= class 0: Average emissivity error ≤ 0.01</li>
<li>[01]= class 1: Average emissivity error ≤ 0.02</li>
<li>[10]= class 2: Average emissivity error ≤ 0.04</li>
<li>[11]= class 3: Average emissivity error > 0.04</li>
</ul>
<pre>
<em>MOD11A1: LST Error Flag bits=[6-7]</em>
</pre>
<ul>
<li>[00]= class 0: Average LST error ≤ 1</li>
<li>[01]= class 1: Average LST error ≤ 2</li>
<li>[10]= class 2: Average LST error ≤ 3</li>
<li>[11]= class 3: Average LST error > 3</li>
</ul>
<h3>MOD11A2</h3>
<pre>
<em>MOD11A2: Mandatory QA Flags bits=[0-1]</em>
</pre>
<ul>
<li>[00]= class 0: LST produced, good quality, not necessary to examine more detailed QA</li>
<li>[01]= class 1: LST produced, other quality, recommend examination of more detailed QA</li>
<li>[10]= class 2: LST not produced due to cloud effects</li>
<li>[11]= class 3: LST not produced primarily due to reasons other than cloud</li>
</ul>
<pre>
<em>MOD11A2: Data Quality Flag bits=[2-3]</em>
</pre>
<ul>
<li>[00]= class 0: Good data quality of L1B in 7 TIR bands</li>
<li>[01]= class 1: Other quality data</li>
<li>[10]= class 2: TBD</li>
<li>[11]= class 3: TBD</li>
</ul>
<pre>
<em>MOD11A2: Emis Error Flag bits=[4-5]</em>
</pre>
<ul>
<li>[00]= class 0: Average emissivity error ≤ 0.01</li>
<li>[01]= class 1: Average emissivity error ≤ 0.02</li>
<li>[10]= class 2: Average emissivity error ≤ 0.04</li>
<li>[11]= class 3: Average emissivity error > 0.04</li>
</ul>
<pre>
<em>MOD11A2: LST Error Flag bits=[6-7]</em>
</pre>
<ul>
<li>[00]= class 0: Average LST error ≤ 1</li>
<li>[01]= class 1: Average LST error ≤ 2</li>
<li>[10]= class 2: Average LST error ≤ 3</li>
<li>[11]= class 3: Average LST error > 3</li>
</ul>
<h3>MOD13A2</h3>
<pre>
<em>MOD13A2: Mandatory QA Flags 1km bits[0-1]</em>
</pre>
<ul>
<li>[00]= class 0: VI produced, good quality</li>
<li>[01]= class 1: VI produced, but check other QA</li>
<li>[10]= class 2: Pixel produced, but most probably cloud</li>
<li>[11]= class 3: Pixel not produced due to other reasons than clouds</li>
</ul>
<pre>
<em>MOD13A2: VI Usefulness Flag bits[2-5]</em>
</pre>
<ul>
<li>[0000]= class 0: Highest quality</li>
<li>[0001]= class 1: Lower quality</li>
<li>[0010]= class 2: Decreasing quality</li>
<li>[0100]= class 3: Decreasing quality</li>
<li>[1000]= class 4: Decreasing quality</li>
<li>[1001]= class 5: Decreasing quality</li>
<li>[1010]= class 6: Decreasing quality</li>
<li>[1100]= class 7: Lowest quality</li>
<li>[1101]= class 8: Quality so low that it is not useful</li>
<li>[1110]= class 9: L1B data faulty</li>
<li>[1111]= class 10: Not useful for any other reason/not processed</li>
</ul>
<pre>
<em>MOD13A2: Aerosol quantity Flags 1km bits[6-7]</em>
</pre>
<ul>
<li>[00]= class 0: Climatology</li>
<li>[01]= class 1: Low</li>
<li>[10]= class 2: Average</li>
<li>[11]= class 3: High</li>
</ul>
<pre>
<em>MOD13A2: Adjacent cloud detected 1km bit[8]</em>
</pre>
<ul>
<li>[00]= class 0: No</li>
<li>[01]= class 1: Yes</li>
</ul>
<pre>
<em>MOD13A2: Atmosphere BRDF correction performed 1km bit[9]</em>
</pre>
<ul>
<li>[00]= class 0: No</li>
<li>[01]= class 1: Yes</li>
</ul>
<pre>
<em>MOD13A2: Mixed clouds 1km bit[10]</em>
</pre>
<ul>
<li>[00]= class 0: No</li>
<li>[01]= class 1: Yes</li>
</ul>
<pre>
<em>MOD13A2: Land/Water Flags 1km bits[11-13]</em>
</pre>
<ul>
<li>[000]= class 0: Shallow Ocean</li>
<li>[001]= class 1: Land (Nothing else but land)</li>
<li>[010]= class 2: Ocean Coastlines and lake shorelines</li>
<li>[011]= class 3: Shallow inland water</li>
<li>[100]= class 4: Ephemeral water</li>
<li>[101]= class 5: Deep inland water</li>
<li>[110]= class 6: Moderate or continental ocean</li>
<li>[111]= class 7: Deep ocean</li>
</ul>
<pre>
<em>MOD13A2: Possible Snow/Ice 1km bits[14]</em>
</pre>
<ul>
<li>[0]= class 0: No</li>
<li>[1]= class 1: Yes</li>
</ul>
<pre>
<em>MOD13A2: Possible Shadow 1km bits[15]</em>
</pre>
<ul>
<li>[0]= class 0: No</li>
<li>[1]= class 1: Yes</li>
</ul>
<h3>MOD13Q1</h3>
<pre>
<em>MOD13Q1: Mandatory QA Flags 250m bits[0-1]</em>
</pre>
<ul>
<li>[00]= class 0: VI produced, good quality</li>
<li>[01]= class 1: VI produced, but check other QA</li>
<li>[10]= class 2: Pixel produced, but most probably cloud</li>
<li>[11]= class 3: Pixel not produced due to other reasons than clouds</li>
</ul>
<pre>
<em>MOD13Q1: VI Usefulness Flag 250m bits[2-5]</em>
</pre>
<ul>
<li>[0000]= class 0: Highest quality</li>
<li>[0001]= class 1: Lower quality</li>
<li>[0010]= class 2: Decreasing quality</li>
<li>[0100]= class 3: Decreasing quality</li>
<li>[1000]= class 4: Decreasing quality</li>
<li>[1001]= class 5: Decreasing quality</li>
<li>[1010]= class 6: Decreasing quality</li>
<li>[1100]= class 7: Lowest quality</li>
<li>[1101]= class 8: Quality so low that it is not useful</li>
<li>[1110]= class 9: L1B data faulty</li>
<li>[1111]= class 10: Not useful for any other reason/not processed</li>
</ul>
<pre>
<em>MOD13Q1: Aerosol quantity Flags 250m bits[6-7]</em>
</pre>
<ul>
<li>[00]= class 0: Climatology</li>
<li>[01]= class 1: Low</li>
<li>[10]= class 2: Average</li>
<li>[11]= class 3: High</li>
</ul>
<pre>
<em>MOD13Q1: Adjacent cloud detected 250m bit[8]</em>
</pre>
<ul>
<li>[00]= class 0: No</li>
<li>[01]= class 1: Yes</li>
</ul>
<pre>
<em>MOD13Q1: Atmosphere BRDF correction performed 250m bit[9]</em>
</pre>
<ul>
<li>[00]= class 0: No</li>
<li>[01]= class 1: Yes</li>
</ul>
<pre>
<em>MOD13Q1: Mixed clouds 250m bit[10]</em>
</pre>
<ul>
<li>[00]= class 0: No</li>
<li>[01]= class 1: Yes</li>
</ul>
<pre>
<em>MOD13Q1: Land/Water Flags 250m bits[11-13]</em>
</pre>
<ul>
<li>[000]= class 0: Shallow Ocean</li>
<li>[001]= class 1: Land (Nothing else but land)</li>
<li>[010]= class 2: Ocean Coastlines and lake shorelines</li>
<li>[011]= class 3: Shallow inland water</li>
<li>[100]= class 4: Ephemeral water</li>
<li>[101]= class 5: Deep inland water</li>
<li>[110]= class 6: Moderate or continental ocean</li>
<li>[111]= class 7: Deep ocean</li>
</ul>
<pre>
<em>MOD13Q1: Possible Snow/Ice 250m bits[14]</em>
</pre>
<ul>
<li>[0]= class 0: No</li>
<li>[1]= class 1: Yes</li>
</ul>
<pre>
<em>MOD13Q1: Possible Shadow 250m bits[15]</em>
</pre>
<ul>
<li>[0]= class 0: No</li>
<li>[1]= class 1: Yes</li>
</ul>
<h3>MCD43B2</h3>
<pre>
<em>MCD43B2: Albedo Quality Ancillary Platform Data 1km bits[0-3]</em>
<em>SDS: BRDF_Albedo_Ancillary</em>
</pre>
<ul>
<li>[0000]= class 0: Satellite Platform: Terra</li>
<li>[0001]= class 1: Satellite Platform: Terrra/Aqua</li>
<li>[0010]= class 2: Satellite Platform: Aqua</li>
<li>[1111]= class 15: Fill Value</li>
<li>Classes 3-14: Not used</li>
</ul>
<pre>
<em>MCD43B2: Albedo Quality Ancillary Land/Water Data 1km bits[4-7]</em>
<em>SDS: BRDF_Albedo_Ancillary</em>
</pre>
<ul>
<li>[0000] class 0: Shallow Ocean</li>
<li>[0001] class 1: Land (Nothing else but land)</li>
<li>[0010] class 2: Ocean and lake shorelines</li>
<li>[0011] class 3: Shallow inland water</li>
<li>[0100] class 4: Ephemeral water</li>
<li>[0101] class 5: Deep inland water</li>
<li>[0110] class 6: Moderate or continental ocean</li>
<li>[0111] class 7: Deep ocean</li>
<li>[1111] class 15: Fill Value</li>
<li>Classes 8-14: Not used</li>
</ul>
<pre>
<em>MCD43B2: Albedo Quality Ancillary Sun Zenith Angle at Local Solar Noon Data 1km bits[8-14]</em>
<em>SDS: BRDF_Albedo_Ancillary</em>
</pre>
<ul>
Returns integer value [0-90], 127 is Fill Value
</ul>
<pre>
<em>MCD43B2: Band-wise Albedo Quality Data 1km</em>
<em>SDS: BRDF_Albedo_Band_Quality</em>
</pre>
bits[0-3][4-7][8-11][12-15][16-19][20-23][24-27]<br>
<ul>
<li>[0000]= class 0: best quality, 75% or more with best full inversions</li>
<li>[0001]= class 1: good quality, 75% or more with full inversions</li>
<li>[0010]= class 2: Mixed, 50% or less full inversions and 25% or less fill values</li>
<li>[0011]= class 3: All magnitude inversions or 50% or less fill values</li>
<li>[0100]= class 4: 75% or more fill values</li>
<li>Classes 5-14: Not Used</li>
<li>[1111]= class 15: Fill Value</li>
</ul>
<h2>NOTES</h2>
In MOD09A1: It seems that cloud related info is not filled properly in the
standard QC (MOD09A1 in this module) since version 3, State-QA 500m images
(MOD09A1s in this module) should be used (see Vermote et al., 2008).
MOD11A2 quality control (QC) bands do not have a FillValue (No-data) according
to <a href="https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mod11a2_v006">MODIS Land Products site</a>.
However, the metadata of the QC bands (i.e.: <tt>gdalinfo QC_band</tt>) shows <tt>No-data=0</tt>.
This value is then transformed into GRASS NULLs when data is imported through
<a href="r.in.gdal.html">r.in.gdal</a>. Applying <em>i.modis.qc</em> on those QC bands
will not give the expected range of values in the different QC bits. Therefore,
before using <em>i.modis.qc</em>, the user needs to set the NULL value in QC bands
back to zero (i.e.: <tt>r.null map=QC_band null=0</tt>) or just edit the metadata with GDAL
utilities before importing into GRASS GIS. This is a known issue for MOD11A2
(8-day LST product), but other MODIS products might be affected as well.
<h2>TODO</h2>
Add more daily products.
<h2>REFERENCES</h2>
<ul>
<li> <a href="https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table">MODIS Products</a>
<li> Vermote E.F., Kotchenova S.Y., Ray J.P. MODIS Surface Reflectance User's Guide.
Version 1.2. June 2008. MODIS Land Surface Reflectance Science Computing Facility.
<a href="http://modis-sr.ltdri.org">Homepage</a>
</ul>
<h2>SEE ALSO</h2>
<em>
<a href="i.vi.html">i.vi</a>
</em>
<h2>AUTHOR</h2>
Yann Chemin