Skip to content
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

footprinttocsv produces no output for large event IDs #382

Closed
hchagani-oasislmf opened this issue May 8, 2024 · 0 comments · Fixed by #384
Closed

footprinttocsv produces no output for large event IDs #382

hchagani-oasislmf opened this issue May 8, 2024 · 0 comments · Fixed by #384
Assignees
Labels

Comments

@hchagani-oasislmf
Copy link
Contributor

hchagani-oasislmf commented May 8, 2024

Issue Description

The component footprinttocsv allows the user to select a range of event ID values to convert. Should a range not be specified, a default range of [1, 999999999] is used. Therefore, in cases where the event ID lies above the upper default value but lower than INT_MAX, no output for those events would be produced, even though the event ID is valid.

Steps to Reproduce (Bugs only)

  1. Create a footprint file in csv format with a single entry with event ID greater than 999,999,999.
  2. Convert it to binary format with footprinttobin.
  3. Convert the binary file back to csv format with footprinttocsv without specifying a range for event IDs.

Version / Environment information

Bug found in ktools v3.12.2, but likely to have existed for a while.

Example data / logs

Using footprint file where event IDs are greater than the default maximum value:

$ footprinttocsv | head -5
event_id, areaperil_id, intensity_bin_id, probability

$ footprinttocsv -e 1-2000000000 | head -5
event_id, areaperil_id, intensity_bin_id, probability
1000000001, 1, 3, 1.0000000000e+00
1000000001, 2, 1, 1.0000000000e+00
1000000001, 3, 1, 1.0000000000e+00
1000000002, 1, 5, 1.0000000000e+00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant