Conversation
JoshCu
commented
Mar 6, 2026
Owner
- abstract bmi adapter boilerplate to shared helper functions
- merge different runner types
- split up load_model into smaller functions
- add DivideDataStore trait for a generic to use when reading and writing catchment data of different types
- tidy up netcdf writing
- add unit tests for output formats
- simplify readme, move details to docs
- Add function_failed() and not_implemented() helpers to error.rs - Add to_cstring(), verify_config_path(), and impl_bmi_drop! macro to adapters/mod.rs - Update all adapters (c.rs, fortran.rs, python.rs, sloth.rs) to use helpers - Update output modules and resample.rs to use function_failed helper - Add TODO comments for get/set_value generic helper in c.rs and fortran.rs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…TIMESTEP_EPSILON - Merge print_active_conversions() and print_all_unit_info() into print_unit_conversions(active_only) - Replace all BmiError::FunctionFailed constructions with function_failed() helper - Replace scattered magic epsilon values (1e-9, 1e-12) with TIMESTEP_EPSILON constant Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…_unit_conversions Break the 147-line load_model method into focused helper methods: - create_adapter: adapter selection and initialization - query_model_timestep: timestep querying with fallback - build_unit_conversions: unit conversion table construction Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create DivideDataStore trait in output/mod.rs for unified per-location writes - Add CsvStore (output/csv.rs) implementing DivideDataStore - Add DivideDataStore impl for NetCdfWriter - Add ZarrStore wrapper with DivideDataStore impl - Replace run_worker_csv, run_worker_netcdf, run_worker_zarr with single run_worker loop using Box<dyn DivideDataStore> - Extract collect_columns helper to eliminate 3x duplication - Move format_epoch from main.rs to output/csv.rs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The init_netcdf + write_batch pattern was copy-pasted 4 times across the match arms. Extract into a flush_batch closure and merge the Shutdown and Disconnected arms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests write synthetic data (2 locations, 3 variables, 25 timesteps) through each DivideDataStore implementation, read it back, and verify: - Per-format roundtrip correctness (CSV, NetCDF, Zarr) - Cross-format equivalence (all formats produce the same data within f32 precision tolerance) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
README reduced from 468 to 93 lines, keeping only essentials: - Project description, building, usage, config example, output formats Detailed content moved to: - docs/configuration.md - field reference tables, library usage - docs/module-types.md - bmi_c, bmi_fortran, bmi_python, SLOTH - docs/features.md - unit conversion, aliases, dependency resolution - docs/netcdf-forcing.md - NetCDF forcing file format spec Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JoshCu
force-pushed
the
CI
branch
2 times, most recently
from
March 6, 2026 22:28
47a47dd to
272c045
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.