From ac976f4800f35f901b848580bf4f6c67484e6412 Mon Sep 17 00:00:00 2001 From: Patricia Castellanos Date: Mon, 21 Jul 2025 16:07:35 -0400 Subject: [PATCH 1/8] add KX's for viirs and goes --- GMAO_ods/kx_list.rc | 14 ++++++++++++++ GMAO_ods/pyods_.F90 | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/GMAO_ods/kx_list.rc b/GMAO_ods/kx_list.rc index 91f993c1..d20e518d 100644 --- a/GMAO_ods/kx_list.rc +++ b/GMAO_ods/kx_list.rc @@ -335,6 +335,20 @@ kx_list:: 324 AVHRR PATMOSX Aerosol Retrievals 325 OMSO2 (OMI SULFER DIOXIDE) 326 GOCI Aerosol Retrievals (Yonsei University) + 327 GOES-16 Aerosol (Dark Target Ocean Algorithm) + 328 GOES-16 Aerosol (Dark Target Land Algorithm) + 329 GOES-17 Aerosol (Dark Target Ocean Algorithm) + 330 GOES-17 Aerosol (Dark Target Land Algorithm) + 331 Himawari Aerosol (Dark Target Ocean Algorithm) + 332 Himawari Aerosol (Dark Target Land Algorithm) + 333 VIIRS SNPP Aerosol (Deep Blue Land Algorithm) + 334 VIIRS SNPP Aerosol (Deep Blue Ocean Algorithm) + 335 VIIRS SNPP Aerosol (Dark Target Land Algorithm) + 336 VIIRS SNPP Aerosol (Dark Target Ocean Algorithm) + 337 VIIRS NOAA-20 Aerosol (Deep Blue Land Algorithm) + 338 VIIRS NOAA-20 Aerosol (Deep Blue Ocean Algorithm) + 339 VIIRS NOAA-20 Aerosol (Dark Target Land Algorithm) + 340 VIIRS NOAA-20 Aerosol (Dark Target Ocean Algorithm) :: # Notes: diff --git a/GMAO_ods/pyods_.F90 b/GMAO_ods/pyods_.F90 index b3cc3acf..e92345d3 100644 --- a/GMAO_ods/pyods_.F90 +++ b/GMAO_ods/pyods_.F90 @@ -624,6 +624,23 @@ subroutine pyods_putAll(filename, ftype, nymd,nhms, nsyn, nobs, & ods%meta%kx_names(324) = 'AVHRR PATMOSX Aerosol Retrievals' ods%meta%kx_names(325) = 'OMSO2 (OMI Sulfer Dioxide)' ods%meta%kx_names(326) = 'GOCI Aerosol Retrievals (Yonsei University)' + ods%meta%kx_names(327) = 'GOES-16 Aerosol (Dark Target Ocean Algorithm)' + ods%meta%kx_names(328) = 'GOES-16 Aerosol (Dark Target Land Algorithm)' + ods%meta%kx_names(329) = 'GOES-17 Aerosol (Dark Target Ocean Algorithm)' + ods%meta%kx_names(330) = 'GOES-17 Aerosol (Dark Target Land Algorithm)' + ods%meta%kx_names(331) = 'Himawari Aerosol (Dark Target Ocean Algorithm)' + ods%meta%kx_names(332) = 'Himawari Aerosol (Dark Target Land Algorithm)' + ods%meta%kx_names(333) = 'VIIRS SNPP Aerosol (Deep Blue Land Algorithm)' + ods%meta%kx_names(334) = 'VIIRS SNPP Aerosol (Deep Blue Ocean Algorithm)' + ods%meta%kx_names(335) = 'VIIRS SNPP Aerosol (Deep Blue Deep Algorithm)' + ods%meta%kx_names(336) = 'VIIRS SNPP Aerosol (Dark Target Land Algorithm)' + ods%meta%kx_names(337) = 'VIIRS SNPP Aerosol (Dark Target Ocean Algorithm)' + ods%meta%kx_names(338) = 'VIIRS NOAA-20 Aerosol (Deep Blue Land Algorithm)' + ods%meta%kx_names(339) = 'VIIRS NOAA-20 Aerosol (Deep Blue Deep Algorithm)' + ods%meta%kx_names(340) = 'VIIRS NOAA-20 Aerosol (Deep Blue Ocean Algorithm)' + ods%meta%kx_names(341) = 'VIIRS NOAA-20 Aerosol (Dark Target Land Algorithm)' + ods%meta%kx_names(342) = 'VIIRS NOAA-20 Aerosol (Dark Target Ocean Algorithm)' + call ods_put (filename, ftype, nymd, nhms, ods, rc) if ( rc .ne. 0 ) return From 407b59552f7c780fb99f3ac8d0b4b90e081f51fe Mon Sep 17 00:00:00 2001 From: Patricia Castellanos Date: Mon, 21 Jul 2025 16:08:26 -0400 Subject: [PATCH 2/8] add an odsreader script that was in AeroApps --- GMAO_ods/pyods/odsreader.py | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 GMAO_ods/pyods/odsreader.py diff --git a/GMAO_ods/pyods/odsreader.py b/GMAO_ods/pyods/odsreader.py new file mode 100644 index 00000000..2a6ec360 --- /dev/null +++ b/GMAO_ods/pyods/odsreader.py @@ -0,0 +1,70 @@ +""" + +Very minimalistic ODS reader. + +""" + +VARS = ['lon', 'lat', 'lev', 'time', 'obs', 'qcexcl'] +EXTRA = ['kt', 'kx', 'ks', 'qchist', 'xm', 'xvec', 'omf', 'oma'] + + +from netCDF4 import Dataset + +from numpy import array +from datetime import timedelta +from dateutil.parser import parse as isoparser + +class ODSreader(object): + + def __init__ (self, filename, Extra=None): + """ + Read select attributes from an ODS file. + """ + + nc = Dataset(filename) + + Vars = VARS + if Extra is not None: + Vars += Extra + + self._getVars(nc,Vars) + + self.nobs = len(self.lon) + + # Create python time + # ------------------ + tunits = nc.variables['time'].units + onemin = timedelta(minutes=1) + toff = isoparser(tunits.split(' since ')[1].replace(' ','T')) + t = array([toff + self.time[i] * onemin for i in range(self.nobs)]) + + self.time = t # array of python datetime objects + + def _getVars(self,nc,Vars): + """ + Read and flatten variables on file. + Assuems 1 synoptic time per file. + """ + for name in Vars: + v = nc.variables[name] + q = v[:,:] + try: + q = q * v.scale_factor + except: + pass + try: + q = q + v.add_offset + except: + pass + + I = q.mask==False # not fill values + self.__dict__[name] = q[I].data + +#------------- + +if __name__ == "__main__": + + m = ODSreader('nnr_002.MOD04_L2a.land.20140119_0300z.ods') + + for i in range(m.nobs): + print("%6.2f %6.2f %s %7.4f"%(m.lon[i],m.lat[i],m.time[i].isoformat(),m.obs[i])) From 691d3265716b118b8c0abbb00183f7e2bd9dc769 Mon Sep 17 00:00:00 2001 From: Patricia Castellanos Date: Wed, 30 Jul 2025 14:11:24 -0400 Subject: [PATCH 3/8] update VIIRS kx's to include DB_DEEP --- GMAO_ods/kx_list.rc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/GMAO_ods/kx_list.rc b/GMAO_ods/kx_list.rc index d20e518d..219657d2 100644 --- a/GMAO_ods/kx_list.rc +++ b/GMAO_ods/kx_list.rc @@ -343,12 +343,14 @@ kx_list:: 332 Himawari Aerosol (Dark Target Land Algorithm) 333 VIIRS SNPP Aerosol (Deep Blue Land Algorithm) 334 VIIRS SNPP Aerosol (Deep Blue Ocean Algorithm) - 335 VIIRS SNPP Aerosol (Dark Target Land Algorithm) - 336 VIIRS SNPP Aerosol (Dark Target Ocean Algorithm) - 337 VIIRS NOAA-20 Aerosol (Deep Blue Land Algorithm) - 338 VIIRS NOAA-20 Aerosol (Deep Blue Ocean Algorithm) - 339 VIIRS NOAA-20 Aerosol (Dark Target Land Algorithm) - 340 VIIRS NOAA-20 Aerosol (Dark Target Ocean Algorithm) + 335 VIIRS SNPP Aerosol (Dark Blue Deep Algorithm) + 336 VIIRS SNPP Aerosol (Dark Target Land Algorithm) + 337 VIIRS SNPP Aerosol (Dark Target Ocean Algorithm) + 338 VIIRS NOAA-20 Aerosol (Deep Blue Land Algorithm) + 339 VIIRS NOAA-20 Aerosol (Deep Blue Ocean Algorithm) + 340 VIIRS NOAA-20 Aerosol (Deep Blue Deep Algorithm) + 341 VIIRS NOAA-20 Aerosol (Dark Target Land Algorithm) + 342 VIIRS NOAA-20 Aerosol (Dark Target Ocean Algorithm) :: # Notes: From a755e34b1ab9d57cb9a47f73270d330a0ffd4017 Mon Sep 17 00:00:00 2001 From: Patricia Castellanos Date: Fri, 1 Aug 2025 09:40:38 -0400 Subject: [PATCH 4/8] add lunar aeronet to kx_list --- GMAO_ods/kx_list.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/GMAO_ods/kx_list.rc b/GMAO_ods/kx_list.rc index 219657d2..482f7e39 100644 --- a/GMAO_ods/kx_list.rc +++ b/GMAO_ods/kx_list.rc @@ -351,6 +351,7 @@ kx_list:: 340 VIIRS NOAA-20 Aerosol (Deep Blue Deep Algorithm) 341 VIIRS NOAA-20 Aerosol (Dark Target Land Algorithm) 342 VIIRS NOAA-20 Aerosol (Dark Target Ocean Algorithm) + 343 Lunar AERONET Aerosol Retrievals :: # Notes: From 3930216d9acf5115ac0e86b84de674d068c27eb8 Mon Sep 17 00:00:00 2001 From: Patricia Castellanos Date: Fri, 1 Aug 2025 12:13:06 -0400 Subject: [PATCH 5/8] add lunar aeronet to py_ods kx list --- GMAO_ods/pyods_.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GMAO_ods/pyods_.F90 b/GMAO_ods/pyods_.F90 index e92345d3..6a281ee6 100644 --- a/GMAO_ods/pyods_.F90 +++ b/GMAO_ods/pyods_.F90 @@ -640,7 +640,7 @@ subroutine pyods_putAll(filename, ftype, nymd,nhms, nsyn, nobs, & ods%meta%kx_names(340) = 'VIIRS NOAA-20 Aerosol (Deep Blue Ocean Algorithm)' ods%meta%kx_names(341) = 'VIIRS NOAA-20 Aerosol (Dark Target Land Algorithm)' ods%meta%kx_names(342) = 'VIIRS NOAA-20 Aerosol (Dark Target Ocean Algorithm)' - + ods%meta%kx_names(343) = 'Lunar AERONET Aerosol Retrievals' call ods_put (filename, ftype, nymd, nhms, ods, rc) if ( rc .ne. 0 ) return From 61f405b48bcbcd119d23e80308a2a9c05ea56d31 Mon Sep 17 00:00:00 2001 From: Patricia Castellanos Date: Fri, 1 Aug 2025 12:15:07 -0400 Subject: [PATCH 6/8] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb082300..88b59fa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- added GOES, HIMAWARI, VIIRS SNPP & NOAA-20, and Lunar AERONET aerosol observations to the KX-lists + ### Changed ### Fixed From 27af045a7dec807a5dd891fd9aa9c4858b563cee Mon Sep 17 00:00:00 2001 From: Patricia Castellanos <69310046+patricia-nasa@users.noreply.github.com> Date: Fri, 22 Aug 2025 13:40:01 -0400 Subject: [PATCH 7/8] Update pyods_.F90 to include NOAA-21 --- GMAO_ods/pyods_.F90 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/GMAO_ods/pyods_.F90 b/GMAO_ods/pyods_.F90 index 6a281ee6..8bfd642f 100644 --- a/GMAO_ods/pyods_.F90 +++ b/GMAO_ods/pyods_.F90 @@ -636,11 +636,16 @@ subroutine pyods_putAll(filename, ftype, nymd,nhms, nsyn, nobs, & ods%meta%kx_names(336) = 'VIIRS SNPP Aerosol (Dark Target Land Algorithm)' ods%meta%kx_names(337) = 'VIIRS SNPP Aerosol (Dark Target Ocean Algorithm)' ods%meta%kx_names(338) = 'VIIRS NOAA-20 Aerosol (Deep Blue Land Algorithm)' - ods%meta%kx_names(339) = 'VIIRS NOAA-20 Aerosol (Deep Blue Deep Algorithm)' - ods%meta%kx_names(340) = 'VIIRS NOAA-20 Aerosol (Deep Blue Ocean Algorithm)' + ods%meta%kx_names(339) = 'VIIRS NOAA-20 Aerosol (Deep Blue Ocean Algorithm)' + ods%meta%kx_names(340) = 'VIIRS NOAA-20 Aerosol (Deep Blue Deep Algorithm)' ods%meta%kx_names(341) = 'VIIRS NOAA-20 Aerosol (Dark Target Land Algorithm)' ods%meta%kx_names(342) = 'VIIRS NOAA-20 Aerosol (Dark Target Ocean Algorithm)' ods%meta%kx_names(343) = 'Lunar AERONET Aerosol Retrievals' + ods%meta%kx_names(344) = 'VIIRS NOAA-21 Aerosol (Deep Blue Land Algorithm)' + ods%meta%kx_names(345) = 'VIIRS NOAA-21 Aerosol (Deep Blue Ocean Algorithm)' + ods%meta%kx_names(346) = 'VIIRS NOAA-21 Aerosol (Deep Blue Deep Algorithm)' + ods%meta%kx_names(347) = 'VIIRS NOAA-21 Aerosol (Dark Target Land Algorithm)' + ods%meta%kx_names(348) = 'VIIRS NOAA-21 Aerosol (Dark Target Ocean Algorithm)' call ods_put (filename, ftype, nymd, nhms, ods, rc) if ( rc .ne. 0 ) return From 44ba8ca8c460164e7fea82a57523eee32d45e6f3 Mon Sep 17 00:00:00 2001 From: Patricia Castellanos <69310046+patricia-nasa@users.noreply.github.com> Date: Fri, 22 Aug 2025 13:41:57 -0400 Subject: [PATCH 8/8] Update kx_list.rc with NOAA-21 --- GMAO_ods/kx_list.rc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GMAO_ods/kx_list.rc b/GMAO_ods/kx_list.rc index 482f7e39..f8b28b0e 100644 --- a/GMAO_ods/kx_list.rc +++ b/GMAO_ods/kx_list.rc @@ -352,6 +352,11 @@ kx_list:: 341 VIIRS NOAA-20 Aerosol (Dark Target Land Algorithm) 342 VIIRS NOAA-20 Aerosol (Dark Target Ocean Algorithm) 343 Lunar AERONET Aerosol Retrievals + 344 VIIRS NOAA-21 Aerosol (Deep Blue Land Algorithm) + 345 VIIRS NOAA-21 Aerosol (Deep Blue Ocean Algorithm) + 346 VIIRS NOAA-21 Aerosol (Deep Blue Deep Algorithm) + 347 VIIRS NOAA-21 Aerosol (Dark Target Land Algorithm) + 348 VIIRS NOAA-21 Aerosol (Dark Target Ocean Algorithm) :: # Notes: