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

Harmonic mean adjusted per zero flow #51

Open
TongZhai opened this issue Jun 15, 2022 · 4 comments
Open

Harmonic mean adjusted per zero flow #51

TongZhai opened this issue Jun 15, 2022 · 4 comments

Comments

@TongZhai
Copy link
Collaborator

When calculating harmonic mean, it needs to be adjusted if the streamflow record contains zero flow values and gaps. The goal is that only non-missing values are used in harmonic mean adjustment.

This should be updated in both interactive mode and batch run mode.

@TongZhai
Copy link
Collaborator Author

The first update was done to deal with gaps in the harmonic mean adjustment.

@TongZhai
Copy link
Collaborator Author

The NWIS station 03022540 has data gaps in its streamflow record that can be used per this issue.

@TongZhai
Copy link
Collaborator Author

TongZhai commented Jun 15, 2022

More clarifying statements:

  • Missing values should NOT be treated as zeros. They should be left out of the analysis entirely. But the presence of missing values should be noted prominently in the output, because it can affect the results. This means the adjusted HM should be the same as HM if there is no zero flow value besides data gaps.
  • Adjusted harmonic mean should also discard missing values. The adjustment is for zeroes (positive values vs all values).

@TongZhai
Copy link
Collaborator Author

The ATC Integrated Design Flow module uses original EPA DFLOW code in the interface and in batch run. That original DFLOW code does its own harmonic mean (adj) calculations, so it will be different from the regular standard UI version of harmonic mean calculation when zeros and gaps exist in flow record. I saw two things in that piece of code:

  • it seems to only handle 1 continuous gap, if there are more than one gap then a few counters get reset to 0
  • its HM adjustment logic is unique

TongZhai added a commit that referenced this issue Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant