Skip to content
Snippets Groups Projects
Commit 719686a8 authored by Greg Quinn's avatar Greg Quinn
Browse files

modis2airs_collect: add use of MISSING flag

parent 3d2680a4
No related branches found
No related tags found
No related merge requests found
......@@ -3,3 +3,4 @@
INVALID = 1
LOW = 2
HIGH = 4
MISSING = 8
import numpy
import sys
from flags import *
from modis_bright import modis_bright
from pyhdf.SD import SD, SDC
from util import HdfWriter
......@@ -47,12 +48,13 @@ bt_mean[:] = modis_bright(rad_mean)
std_bt[:] = modis_bright(rad_mean + rad_std) - bt_mean
# for any pixel where N is zero, use fill values for the other
# variables
# variables and set the MISSING flag
missing_idxs = (n == 0)
rad_mean[missing_idxs] = -9999.0
rad_std[missing_idxs] = -9999.0
bt_mean[missing_idxs] = -9999.0
std_bt[missing_idxs] = -9999.0
flags[missing_idxs] = MISSING
# output to HDF
writer = HdfWriter(output_file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment