-
Notifications
You must be signed in to change notification settings - Fork 8
SSMIS node fix #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSMIS node fix #72
Changes from all commits
ce6de50
87ff124
55fe25b
91a5c43
140be1d
8853eff
3ea81b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1594,11 +1594,16 @@ def toIODAobs(self, OutDir, ObsBias, QCVars, TestRefs, TotalBias=False, clobber= | |||||||||||||||||||||||
| # outdata[(loc_mdata_name, 'MetaData')] = tmp | ||||||||||||||||||||||||
| # if loc_mdata_name in units_values.keys(): | ||||||||||||||||||||||||
| # varAttrs[(loc_mdata_name, 'MetaData')]['units'] = units_values[loc_mdata_name] | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # For SSMIS "Sat_Azimuth_Angle" actually contains the "satelliteAscendingFlag". So populate the latter and | ||||||||||||||||||||||||
| # set "sensorAzimuthAngle" to zero (it needs to be defined but is not used) | ||||||||||||||||||||||||
| elif self.sensor == "ssmis" and lvar == "Sat_Azimuth_Angle": | ||||||||||||||||||||||||
| tmp = self.var(lvar)[::nchans].astype(np.int32) | ||||||||||||||||||||||||
| tmp[tmp > 4e8] = self.INT_FILL | ||||||||||||||||||||||||
| outdata[("satelliteAscendingFlag", 'MetaData')] = tmp | ||||||||||||||||||||||||
| varAttrs[("satelliteAscendingFlag", 'MetaData')]['_FillValue'] = self.INT_FILL | ||||||||||||||||||||||||
| outdata[("sensorAzimuthAngle", "MetaData")] = np.zeros(tmp.shape, dtype=np.float32) | ||||||||||||||||||||||||
| varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL) | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
| varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL) | |
| varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL) |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The VarDims dictionary should be set for both new metadata variables to ensure they are properly written by the IodaWriter. Based on the pattern in this file (e.g., lines 1628, 1637, 1771, 1983), metadata variables that are manually created need to have their dimensions explicitly specified. Both satelliteAscendingFlag and sensorAzimuthAngle should have dimensions set to ['Location'] since they contain one value per observation location.
| outdata[("sensorAzimuthAngle", "MetaData")] = np.zeros(tmp.shape, dtype=np.float32) | |
| varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL) | |
| VarDims[("satelliteAscendingFlag", 'MetaData')] = ['Location'] | |
| outdata[("sensorAzimuthAngle", "MetaData")] = np.zeros(tmp.shape, dtype=np.float32) | |
| varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL) | |
| VarDims[("sensorAzimuthAngle", "MetaData")] = ['Location'] |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The units attribute should be set for the sensorAzimuthAngle variable. According to the units_values dictionary at line 622, sensorAzimuthAngle should have units of 'degree'. This is missing and should be added to maintain consistency with other angle metadata variables in the file.
| varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL) | |
| varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL) | |
| varAttrs[("sensorAzimuthAngle", "MetaData")]["units"] = "degree" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is trailing whitespace at the end of this line. This should be removed for code cleanliness.