From c009e9fc5721fec29339d89976a83503dff5b833 Mon Sep 17 00:00:00 2001 From: Shih-Wei Wei Date: Thu, 4 Dec 2025 17:31:55 -0600 Subject: [PATCH] move the winmsk after thinning section --- src/compo/viirs_aod2ioda.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compo/viirs_aod2ioda.py b/src/compo/viirs_aod2ioda.py index 07dd9c991..fe213cb91 100755 --- a/src/compo/viirs_aod2ioda.py +++ b/src/compo/viirs_aod2ioda.py @@ -298,7 +298,6 @@ def read(self): # assign the observation time based on time coverage self.obs_time = np.full(np.shape(self.lons), round(0.5*(self.s_time + self.e_time)), dtype=np.int64) - winmsk = ((self.obs_time >= self.wbeg) & (self.obs_time <= self.wend)) # apply thinning mask if self.thin > 0.0: @@ -311,7 +310,10 @@ def read(self): self.qcfs = self.qcfs[mask_thin] self.obs_time = self.obs_time[mask_thin] - # Write out data + # create the final mask for output based on time window + winmsk = ((self.obs_time >= self.wbeg) & (self.obs_time <= self.wend)) + + # Write out data self.outdata[('latitude', metaDataName)] = np.append( self.outdata[('latitude', metaDataName)], np.array(self.lats[winmsk], dtype=np.float32)) self.outdata[('longitude', metaDataName)] = np.append(