[Bug]: non-integer `Lbin_lo`/`Lbin_hi` are silently truncated under `Lbin_method = 1`, while method 3 raises a fatal error for the equivalent mistake
@Rick-Methot-NOAA đang làm issue này rồi.
Từ ngày 24/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Describe the bug
Under Lbin_method = 1 the Lbin_lo/Lbin_hi columns of an age composition observation are population length bin indices. If a file instead contains lengths, SS3 accepts them silently and truncates them to integers, so conditional age-at-length data can be fit to the wrong bins. There is no warning in warning.sso and the run completes normally.
Method 3 searches len_bins for an exact match and calls write_message(FATAL, 0) with "L_bin_lo no match to poplenbins in age comp" if there is none. Method 1 has no equivalent check, only a clamp to [1, nlength].
Two consequences, depending on how the data is setup:
Lbin_loandLbin_hione bin apart (e.g.18.5 19.5, intended as the edges of one 1 cm bin) becomes index range18..19, so the cell spans two population bins and consecutive rows overlap.Lbin_hi = Lbin_lo(e.g.34.5 34.5, a row on a 5 cm data bin grid) becomes bin 34, a single 1 cm bin one below the data's label.
To Reproduce
In any model with 1 cm population bins and Lbin_method = 1, write lengths rather than bin numbers in columns 7 and 8 of a conditional age-at-length row:
#_Lbin_method_for_Age_Data: 1=poplenbins; 2=datalenbins; 3=lengths
1
#_yr month fleet sex part ageerr Lbin_lo Lbin_hi Nsamp <data vector>
1991 7 2 0 0 1 18.5 19.5 1 ...
Run, then compare the input against the FIT_AGE_COMPS section of Report.sso, which reports these columns converted back to actual length and so should read the same as the input:
data.ss 1991 7 2 0 0 1 18.5 19.5 1 ...
Report.sso FIT_AGE_COMPS ... 1991 1 2 7 1991.5 0 0 1 17.5 18.5 _ _ 1 ...
Tested on v3.30.25.1 and **v3.30.22.1 ** on the 2024 Aleutian Islands Pacific cod assessment: all 1160 CAAL redictions are one bin lower than the data. but the run exits 0, and warning.sso does not mention the Lbin truncation.
Expected behavior
A non-integer Lbin_lo or Lbin_hi under Lbin_method = 1 or 2 should produce a warning, or a fatal error, as method 3 already does for its own equivalent mistake. Anything that makes the run stop would allow users to catch this immediately.
Screenshots
No response
Which OS are you seeing the problem on?
No response
Which version of SS3 are you seeing the problem on?
v3.30.25.1 and **v3.30.22.1 **
Additional Context
Impacts all cod assessments in AK
- Ngôn ngữ chính
- C++
- Star
- 46
- Fork
- 19
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nmfs-ost/ss3-source-code
-
need warning and improved logic for generalized sizecompCó thể làm lại được @Rick-Methot-NOAA đã nhận 237 ngày trước và không có pull request nào đang mở. Đang mởcomposition in progress
nmfs-ost/ss3-source-code#751 · 1 bình luận · 1 người được giao ·
-
[Feature]: Add standard errors for area-specific quantitiesCó thể làm lại được @Rick-Methot-NOAA đã nhận 375 ngày trước và không có pull request nào đang mở. Đang mởarea & movement
nmfs-ost/ss3-source-code#731 · 3 bình luận · 1 người được giao ·
-
[Feature]: Create a basic report list that could serve as better starting configuration for customizationCó thể làm lại được @Rick-Methot-NOAA đã nhận 382 ngày trước và không có pull request nào đang mở. Đang mởmisc. output
nmfs-ost/ss3-source-code#723 · 1 người được giao ·
-
[Feature]: restrict biology output using the use_morph(g) flagCó thể làm lại được @Rick-Methot-NOAA đã nhận 404 ngày trước và không có pull request nào đang mở. Đang mởbiology misc. output ongoing
nmfs-ost/ss3-source-code#702 · 1 người được giao ·
-
[Feature]: mean vs median recruitment when using SCAA optionCó thể làm lại được @Rick-Methot-NOAA đã nhận 422 ngày trước và không có pull request nào đang mở. Đang mởrecruitment
nmfs-ost/ss3-source-code#696 · 1 người được giao ·
Tất cả issue của nmfs-ost/ss3-source-code
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
tesseract-ocr/tesseract#4627 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
lxqt/lxqt-panel#2492 ·
-
bug-unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[models/demos/gemma4 dFlash]: _shard_argmax returns a view of a force-freed tensor when rows == 1Đang mởcommunity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
tenstorrent/tt-metal#57989 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100