Did something change in VIIRS day_night_flag in 2017?
Posted: Wed Jul 24, 2019 5:56 pm America/New_York
Hi - This seems strange. I've been running through the entire VIIRS mission doing match-ups with in situ observations collected in the Great Lakes. My match-up routine is coded in IDL. The code happily chunks through the data from 2012-2016 but then stops with an error ("H5A_READ: unable to read attribute: Object ID:....") when it gets to 2017. The attribute I am trying to read when the error occurs is "day_night_flag." None of the other attributes (e.g. "easternmost_longitude") I'm reading in the code has a problem. When I bypass checking the day_night_flag, the code runs through all the data without error. Here are example code snippets (using a 2016 file and a 2018 file as examples). I have checked the header dumps and don't see any differences. Any idea what is going on? Thanks, Barry
IDL> thisSat = '/Volumes/4TBDrive/VIIRS/L2/Erie/2018/V2018226181800.L2_SNPP_OC.x.nc'
IDL> hid = H5F_OPEN(thisSat)
IDL> ag_id = H5G_OPEN(hid,'/')
IDL> day_id = H5A_OPEN_NAME(ag_id, 'day_night_flag')
IDL> dayflag = H5A_READ(day_id)
% H5A_READ: unable to read attribute: Object ID:100663322
IDL> H5A_CLOSE, day_id
IDL> H5G_CLOSE, ag_id
IDL> H5F_CLOSE, hid
IDL> thatSat = '/Volumes/4TBDrive/VIIRS/L2/Superior/2016/V2016110180000.L2_SNPP_OC.x.nc'
IDL> hid = H5F_OPEN(thatSat)
IDL> ag_id = H5G_OPEN(hid, '/')
IDL> day_id = H5A_OPEN_NAME(ag_id, 'day_night_flag')
IDL> dayflag = H5A_READ(day_id)
IDL> print, dayflag
Day
.
IDL> thisSat = '/Volumes/4TBDrive/VIIRS/L2/Erie/2018/V2018226181800.L2_SNPP_OC.x.nc'
IDL> hid = H5F_OPEN(thisSat)
IDL> ag_id = H5G_OPEN(hid,'/')
IDL> day_id = H5A_OPEN_NAME(ag_id, 'day_night_flag')
IDL> dayflag = H5A_READ(day_id)
% H5A_READ: unable to read attribute: Object ID:100663322
IDL> H5A_CLOSE, day_id
IDL> H5G_CLOSE, ag_id
IDL> H5F_CLOSE, hid
IDL> thatSat = '/Volumes/4TBDrive/VIIRS/L2/Superior/2016/V2016110180000.L2_SNPP_OC.x.nc'
IDL> hid = H5F_OPEN(thatSat)
IDL> ag_id = H5G_OPEN(hid, '/')
IDL> day_id = H5A_OPEN_NAME(ag_id, 'day_night_flag')
IDL> dayflag = H5A_READ(day_id)
IDL> print, dayflag
Day
.