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

[1pt] Incorrect cfs to cms conversion factor in ras2fim rating curve export #330

Open
RyanSpies-NOAA opened this issue Aug 9, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@RyanSpies-NOAA
Copy link

See code line here:

"flow_cms": rc_geospatial_df["discharge_cfs"] * 0.3048,

@RyanSpies-NOAA RyanSpies-NOAA added the bug Something isn't working label Aug 9, 2024
@RobHanna-NOAA
Copy link
Collaborator

RobHanna-NOAA commented Aug 9, 2024

That likely means we have a problem farther up the code change. In the steps prior to hitting reformat_ras_rating_curves.py, there is now code that adds both the metric and imperial values such as cfs and cms. This means reformat_ras_rating_curves.py doesn't need to do it anymore. That calc was moved up the chain for other reasons. We will need to confirm that the rating curves being pulled in to reformat_ras_rating_curve,py do already have both metric and imperial (I might be wrong). If so, remove this line in reformat. Which is why it might be wrong in the first place if the value in that column was adjusted twice. Research required. Reformat... should now just be a pass through.

Or not using the right new column from the rating curves.

@RyanSpies-NOAA
Copy link
Author

Just to clarify - I don't think there is an "adjusted twice" issue here. That 0.3048 conversation is the wrong multiplier - that converts feet to meters for length. We need the volume conversion for cubic meters to cubic feet (0.0283168).

@RobHanna-NOAA
Copy link
Collaborator

oh.. gotcha. We do need to look at the rating curves coming into reformat... as there was an attempt, I believe to have cms and cfs values in the rating curve, and all_cs_info_fid_{feature id}.csv files to have both a discharge_cfs and discharge_cms. Meaning a conversion was no longer needed in reformat... jsut use the other column. But maybe something got out of sync.

image

See: s3://ras2fim/output_ras2fim/12090301_2277_ble_240602/06_create_rating_curves/10012_WILLBARGER 0062/all_xs_info_fid_5788808.csv
which I believe is loaded into reformat.

rc_path_list = list(Path(ratings_curves_dir_name).rglob("all_xs_info_fid_*"))

So.. we might want to investigate a bit more. Might just be a field change in reformat... but needs to double checked.

@RobHanna-NOAA
Copy link
Collaborator

I think we need to check out code farther up the code chain as it needs to be corrected as well.

@RobHanna-NOAA
Copy link
Collaborator

ya.. not sure really. Maybe this will help

Discharge_CMS = (x_sections_info_fid['discharge_cfs'] * 0.0283168).round(4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants