From a8c5df3e9e8589809e15a7f6a58de7a328034f8b Mon Sep 17 00:00:00 2001 From: Samuel Degelia Date: Mon, 16 Dec 2024 16:43:59 -0500 Subject: [PATCH] Bugfix for offline domain check starting Channel variable at 1 (#253) This is a quick, one-line fix to solve a problem with the `Channel` variable in the radiance offline domain check. --- rrfs-test/IODA/offline_domain_check_satrad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rrfs-test/IODA/offline_domain_check_satrad.py b/rrfs-test/IODA/offline_domain_check_satrad.py index 8763b997..81033975 100755 --- a/rrfs-test/IODA/offline_domain_check_satrad.py +++ b/rrfs-test/IODA/offline_domain_check_satrad.py @@ -258,7 +258,7 @@ def shrink_boundary(points, centroid, factor=0.01): if 'Channel' not in fout.dimensions and channel_size > 0: fout.createDimension('Channel', channel_size) fout.createVariable('Channel', 'int32', 'Channel', fill_value=fill_value) - fout.variables['Channel'][:] = np.arange(channel_size) + 1 #since python indicies start at 0 + fout.variables['Channel'][:] = obs_ds.variables['Channel'][:] for attr in obs_ds.variables['Channel'].ncattrs(): # Attributes for Location variable if attr != '_FillValue': fout.variables['Channel'].setncattr(attr, obs_ds.variables['Channel'].getncattr(attr))