respec / BASINS

BASINS source code development repository. For official releases see EPA:
https://www.epa.gov/exposure-assessment-models/basins
28 stars 16 forks source link

Harmonic mean adjusted per zero flow #51

Open TongZhai opened 2 years ago

TongZhai commented 2 years ago

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 commented 2 years ago

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

TongZhai commented 2 years ago

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

TongZhai commented 2 years ago

More clarifying statements:

TongZhai commented 2 years ago

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: