-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add support for NetCDF/Time-partitioned CSV QLAT inputs #636
Conversation
5a48b05
to
790e921
Compare
@shorvath-noaa if you get a chance, can you pull this PR and ensure the tests and in-memory df schema are as expected -- and maybe do a quick review in case there are things that I missed for this integration? Thanks!! |
qlats_df = pd.concat( | ||
(nexuses_lateralflows_df.loc[int(k)].rename(v) for k,v in self.downstream_flowpath_dict.items() if k in nexuses_lateralflows_df.index.to_list()), | ||
axis=1 | ||
).T |
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.
this seems to be entering an infinite loop when I run t-route with *CHRTOUT files as forcing. If you change this to:
qlats_df = nexuses_lateralflows_df.rename(index=self.downstream_flowpath_dict)
it works with *CHRTOUT files and still passes your pytest file.
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.
Awesome, I think this works well. Implemented in ebfdd6d.
Co-authored-by: shorvath-noaa <[email protected]>
@shorvath-noaa any update on when this can be merged? NOAA-OWP/ngen#612 is soft-blocked on this (but no immediate rush). Thanks!! |
This PR adds support for reading NetCDF QLAT outputs from
ngen
viaxarray
.The NetCDF schema for the new outputs are as follows:
Additions
AbstractNetwork.read_file
andHYFeaturesNetwork.read_file
.*NEXOUT
glob filters.Changes
build_qlateral_array
when reading a q_lateral file to removenex-
from the prefix.Testing
ngen
-outputted Q Lateral files (both CSV and NetCDF), and ensures forcing sets can be assembled.Todos
Add logic for CSV heuristicsUnneeded if relying on glob filterChecklist