Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1029,23 +1029,23 @@ def compute_and_write_additional_sstat_fields(
field_name="SdWdx",
file_type="fld",
file_name=full_fname_stat,
file_key=file_keys_UidSdxj[6],
file_key=file_keys_SdUidxj[6],
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

These hard-coded indices (6/7/8) are magic numbers and are easy to mis-map (which appears to be what happened previously for the SdW*d* fields). Consider replacing them with named constants (e.g., SDWDX_KEY_IDX = 6, etc.) or a small mapping (e.g., {'SdWdx': ..., 'SdWdy': ..., 'SdWdz': ...}) so it’s explicit which component each key refers to and reduces the chance of future index mistakes.

Copilot uses AI. Check for mistakes.
dtype=np.single,
)
stat_fields.add_field(
comm,
field_name="SdWdy",
file_type="fld",
file_name=full_fname_stat,
file_key=file_keys_UidSdxj[7],
file_key=file_keys_SdUidxj[7],
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

These hard-coded indices (6/7/8) are magic numbers and are easy to mis-map (which appears to be what happened previously for the SdW*d* fields). Consider replacing them with named constants (e.g., SDWDX_KEY_IDX = 6, etc.) or a small mapping (e.g., {'SdWdx': ..., 'SdWdy': ..., 'SdWdz': ...}) so it’s explicit which component each key refers to and reduces the chance of future index mistakes.

Copilot uses AI. Check for mistakes.
dtype=np.single,
)
stat_fields.add_field(
comm,
field_name="SdWdz",
file_type="fld",
file_name=full_fname_stat,
file_key=file_keys_UidSdxj[8],
file_key=file_keys_SdUidxj[8],
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

These hard-coded indices (6/7/8) are magic numbers and are easy to mis-map (which appears to be what happened previously for the SdW*d* fields). Consider replacing them with named constants (e.g., SDWDX_KEY_IDX = 6, etc.) or a small mapping (e.g., {'SdWdx': ..., 'SdWdy': ..., 'SdWdz': ...}) so it’s explicit which component each key refers to and reduces the chance of future index mistakes.

Copilot uses AI. Check for mistakes.
dtype=np.single,
)

Expand Down
Loading