From b07c4297a39c3be60b8b9a892a911bd3dd5041fe Mon Sep 17 00:00:00 2001 From: elpamart Date: Tue, 19 Sep 2023 19:08:54 +0200 Subject: [PATCH] include description and checksum --- .../data_checksums/nutrient_load_reduction | 1 + .../nutrient_load_reduction/process_data.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 data/h3_data_importer/data_checksums/nutrient_load_reduction diff --git a/data/h3_data_importer/data_checksums/nutrient_load_reduction b/data/h3_data_importer/data_checksums/nutrient_load_reduction new file mode 100644 index 0000000000..387fca2daf --- /dev/null +++ b/data/h3_data_importer/data_checksums/nutrient_load_reduction @@ -0,0 +1 @@ +cd63dfeebf87434f7d0a79b04ca228f618c987bdb70a1760eca165cf6cf48a4e nutrient_load_reduction.shp diff --git a/data/preprocessing/nutrient_load_reduction/process_data.py b/data/preprocessing/nutrient_load_reduction/process_data.py index e77e9dd270..dff73a6026 100644 --- a/data/preprocessing/nutrient_load_reduction/process_data.py +++ b/data/preprocessing/nutrient_load_reduction/process_data.py @@ -39,11 +39,15 @@ def check_and_reproject_to_4326(gdf): return gdf -# Calculation of the required Load Reduction. -# This equation is applied to only the basin-specific limiting nutrient as identified by McDowell et al. (2020) -# The global concentration thresholds values for Total N (0.70 mg-N/L) and Total P (0.046 mg-P/L) represent acceptable levels of algal growth. -# More information can be found on the LandGriffon v2.0 methodology def calculate_perc_reduction(row): + """ + Calculation of the required Load Reduction. + + This equation is applied to only the basin-specific limiting nutrient as identified by McDowell et al. (2020) + The global concentration thresholds values for Total N (0.70 mg-N/L) and Total P (0.046 mg-P/L) represent acceptable levels of algal growth. + + More information can be found on the LandGriffon v2.0 methodology + """ if row['Cases_v2_1'] == 4 and row['TP_con_V2_']: return ((row['TP_con_V2_'] - 0.046) / row['TP_con_V2_']) * 100 elif row['Cases_v2_1'] == 2 and row['TN_con_V2_']: