Skip to content

SSMIS node fix#72

Merged
CoryMartin-NOAA merged 7 commits intodevelopfrom
ssmis_node_fix
Jan 22, 2026
Merged

SSMIS node fix#72
CoryMartin-NOAA merged 7 commits intodevelopfrom
ssmis_node_fix

Conversation

@ADCollard
Copy link
Copy Markdown
Contributor

Additional fix on top of #60 .

@ADCollard
Copy link
Copy Markdown
Contributor Author

ADCollard commented Jan 21, 2026

I can confirm that the sensorAzimuthAngle is added as requested:

diff gdas.t00z.radiance_ssmis_f17.gsi.nc.out /scratch4/NCEPDEV/stmp/Andrew.Collard/ObsForge1/com/obsforge/gdas.20251001/00/atmos_gsi
50145d50144
<   	float sensorAzimuthAngle(Location) ;
54402,54720d54400
< 
<    sensorAzimuthAngle = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
<       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
<       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
<       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
<       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
<       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
.
.
.
<       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
<       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;

@ADCollard ADCollard changed the title Ssmis node fix SSMIS node fix Jan 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is an additional fix for SSMIS sensor data processing, building on PR #60. It addresses the handling of the Sat_Azimuth_Angle variable for SSMIS, which actually contains the satellite ascending flag rather than the actual azimuth angle.

Changes:

  • Adds special handling for SSMIS Sat_Azimuth_Angle to correctly populate satelliteAscendingFlag
  • Sets sensorAzimuthAngle to zero for SSMIS (required but not used)
  • Includes explanatory comments for the SSMIS-specific logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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)
Copy link

Copilot AI Jan 21, 2026

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.

Suggested change
varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL)
varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL)

Copilot uses AI. Check for mistakes.
Comment on lines +1605 to +1606
outdata[("sensorAzimuthAngle", "MetaData")] = np.zeros(tmp.shape, dtype=np.float32)
varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL)
Copy link

Copilot AI Jan 21, 2026

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.

Suggested change
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 uses AI. Check for mistakes.
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)
Copy link

Copilot AI Jan 21, 2026

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.

Suggested change
varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL)
varAttrs[("sensorAzimuthAngle", "MetaData")]["_FillValue"] = np.float32(self.FLOAT_FILL)
varAttrs[("sensorAzimuthAngle", "MetaData")]["units"] = "degree"

Copilot uses AI. Check for mistakes.
# 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
Copy link

Copilot AI Jan 21, 2026

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.

Copilot uses AI. Check for mistakes.
@CoryMartin-NOAA CoryMartin-NOAA merged commit 151fabf into develop Jan 22, 2026
7 checks passed
@CoryMartin-NOAA CoryMartin-NOAA deleted the ssmis_node_fix branch January 22, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants