Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Split up SNTemp input_output into separate input & output #38

Open
jzwart opened this issue May 7, 2020 · 7 comments
Open

Split up SNTemp input_output into separate input & output #38

jzwart opened this issue May 7, 2020 · 7 comments

Comments

@jzwart
Copy link
Member

jzwart commented May 7, 2020

Currently, we have uncal_sntemp_input_output that contains variables used to drive the model (e.g. precipitation, air temperature) alongside sntemp output (e.g. water temperature, discharge, etc...). Splitting these up into two separate files (e.g. sntemp_input, sntemp_output) would be easier for ML workflows.

currently producing output in delaware-water-temp workflow

@limnoliver
Copy link
Member

@jzwart -- This is one potential task I thought Hayley could tackle early on, which is to move some of the run(SNTEMP) and extract(SNTEMP) functions to this pipeline. That way, she can get comfortable running and analyzing SNTEMP output.

@jzwart
Copy link
Member Author

jzwart commented May 8, 2020

Yeah that would be great. I can walk her through some of the functions, and will also need to comment the functions a bit better than I have right now.

@jzwart
Copy link
Member Author

jzwart commented May 12, 2020

While getting tmin / tmax for drivers, I'm also splitting out all drivers into one file (sntemp_input.feather) and sntemp output into one file. I'm doing an area-weighted average of tmin, tmax, and prcp for the drivers and am getting some different patterns from comparable sntemp output. For example, we have been storing seg_rain which is the Area-weighted average rainfall for each segment from HRUs contributing flow to the segment . When I compare sntemp-calculated seg_rain to what I have calculated seg_prcp, there are a few rain events where seg_prcp is higher than seg_rain.
image
Across all days, ~24% of the days have different seg_prcp and seg_rain. However, most of these differences are small as ~2% of days have a difference greater than 1 mm/day precipitation.
image

@limnoliver
Copy link
Member

Are these anomalies at specific reaches, or distributed across the network? The ...HRUs contributing flow to the segment made me think maybe some HRUs are flagged as non-contributing, and therefore excluding, making your estimate higher?

@jzwart
Copy link
Member Author

jzwart commented May 12, 2020

The figures above are from the 42 segment subbasin that Xiaowei has been working on. All segments in this subbasin have at least one HRU contributing based on the parameter file used by PRMS-SNTemp. There isn't a clear pattern in the difference in calculated precip (for precip difference greater than 1 mm) for the segments based on contributing HRUs
image

@jzwart
Copy link
Member Author

jzwart commented May 20, 2020

Main function that I used for calculating area-weighted average of segment driver input is here.
Main block of code that SNTemp uses for calculating area-weighted average of segment driver input is here.

@jsadler2
Copy link
Collaborator

I'm thinking that this wouldn't be that helpful after all. I mean it'd be fine either way, but I don't see a major benefit in splitting them like I thought I would have. So as long as they're together, maybe we leave them together, unless someone else feels strongly that it'd be easier to have the input and output as separate files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants