KateriSalk / Alaska_IR_Automation

0 stars 1 forks source link

Investigate fecal coliform geomean exceedances #20

Open petjen25 opened 4 months ago

petjen25 commented 4 months ago

https://github.com/KateriSalk/Alaska_IR_Automation/blob/8e41f9af5db921fea947befa4ac87371ef312cf2/Code/6_Analysis/magdurfreq_functions.R#L150

Code is finding exceedances of fecal coliform geomean where there shouldn't be any. One example is AK_L_2040108_063. All 5 samples were collected in the same 30-day period. When using geomean() in excel, the five samples' geomean is well below the 20 fecal coliform unit geomean criteria.

Our WQS and listing methodology state that the 30-day geometric mean may not exceed 20 fecal coliform units in a 30-day period. So we interpret that as the geomean not being reportable until there are 5 samples used to calculate the geomean, because 5 samples are required for the frequency component. I'm wondering if rollapplyr() is calculating several geomeans for portions of the 5 samples (or a rolling geomean in other words)? If it is calculating a rolling geomean, this would cause an exceedance where there shouldn't be.

petjen25 commented 4 months ago

I'm noticing a similar issue with e. coli. The code is calling an AU impaired when it only exceeds criteria for one year. It needs to exceed either the geomean or the 10% individual sample result criteria for both years. AK_L_8030709_001 exceeds the individual sample result criteria the second year, but not the first year. From our listing methodology: "At least one 30-day sampling period per water year must demonstrate an exceedance of one or both parts of the criterion during both years of sampling." I'm assuming that both the WQS table and the MDF analysis will need to be updated to make sure something is impaired only if it exceeds one or more of the criteria for both years. This is the same for all pathogens.

I think the e. coli geomean calculation makes sense for AU AK_L_8030709_001, but AK_R_2040106_001 shows it is exceeding the e. coli geomean criteria via the code. Our geomean calculation for that second AU shows no geomean exceedance against the 125 CFU criteria.

I'm editing this to add that any changes will need to be made with care to the specific uses that apply to pathogens in marine and fresh water. The listing methodology gets confusing, because each pathogen has different listing requirements depending on the use and the water type!