-
Notifications
You must be signed in to change notification settings - Fork 29
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
[1pt] PR: Replace fiona with pyogrio #1077
Merged
Merged
Conversation
This file contains 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
RobHanna-NOAA
previously approved these changes
Feb 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ran against the full unit test set of HUCs with the new docker container from here. It all ran perfectly well and all of the eval plots were identical to recent previous runs.
CarsonPruitt-NOAA
approved these changes
Feb 16, 2024
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.
Replace
fiona
withpyogrio
to improve I/O speed.geopandas
will usepyogrio
by default starting with version 1.0.pyarrow
was also added as an environment variable to further speedup I/O. As a result of the changes in this PR,fim_pipeline.sh
runs approximately 10% faster. Closes #1072.Changes
Pipfile
: Upgradedgeopandas
from v0.12.2 to v0.14.3, addedpyogrio
, and fixed version ofpyflwdir
.src/bash_variables.env
: Added environment variable forpyogrio
to usepyarrow
The remaining files were modified to add pyogrio:
data/
bathymetry/preprocess_bathymetry.py
,ble/ble_benchmark/create_flow_forecast_file.py
,esri.py
,nld/levee_download.py
,usgs/acquire_and_preprocess_3dep_dems.py
,wbd/clip_vectors_to_wbd.py
,wbd/preprocess_wbd.py
,write_parquet_from_calib_pts.py
: Addedpyogrio
andpyarrow
src/
add_crosswalk.py
,associate_levelpaths_with_levees.py
,bathy_rc_adjust.py
,bathymetric_adjustment.py
,buffer_stream_branches.py
,build_stream_traversal.py
,crosswalk_nwm_demDerived.py
,derive_headwaters.py
,derive_level_paths.py
,edit_points.py
,filter_catchments_and_add_attributes.py
,finalize_srcs.py
,make_stages_and_catchlist.py
,mask_dem.py
,reachID_grid_to_vector_points.py
,split_flows.py
,src_adjust_spatial_obs.py
,stream_branches.py
,subset_catch_list_by_branch_id.py
,usgs_gage_crosswalk.py
,usgs_gage_unit_setup.py
,utils/shared_functions.py
tools/
adjust_rc_with_feedback.py
,check_deep_flooding.py
,create_flow_forecast_file.py
,eval_plots.py
,evaluate_continuity.py
,evaluate_crosswalk.py
,fimr_to_benchmark.py
,find_max_catchment_breadth.py
,generate_categorical_fim.py
,generate_categorical_fim_flows.py
,generate_categorical_fim_mapping.py
,generate_nws_lid.py
,hash_compare.py
,inundate_events.py
,inundation.py
,make_boxes_from_bounds.py
,mosaic_inundation.py
,overlapping_inundation.py
,rating_curve_comparison.py
,rating_curve_get_usgs_curves.py
,test_case_by_hydro_id.py
,tools_shared_functions.py
Removals
Testing
fim_pipeline.sh
ran approximately 10% faster on two HUCs (12040101 and 12090301). Inundation metrics (CSI and MCC were identical todev
(4.4.10.0).pyogrio
pygrio
+pyarrow
Issuer Checklist (For developer use)
You may update this checklist before and/or after creating the PR. If you're unsure about any of them, please ask, we're here to help! These items are what we are going to look for before merging your code.
[_pt] PR: <description>
dev
branch (the default branch), you have a descriptive Feature Branch name using the format:dev-<description-of-change>
(e.g.dev-revise-levee-masking
)dev
branchpre-commit
hooks were run locally/foss_fim/
, run:pytest unit_tests/
)4.x.x.x
Merge Checklist (For Technical Lead use only)