From 43d389418885d307f187bd286104dbe4ea2e8d30 Mon Sep 17 00:00:00 2001 From: Rob Hanna Date: Thu, 26 Sep 2024 20:17:50 +0000 Subject: [PATCH] Shut off hardcoded huc: Note flow not workign yet --- tools/generate_categorical_fim.py | 5 ++++- tools/generate_categorical_fim_flows.py | 29 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/tools/generate_categorical_fim.py b/tools/generate_categorical_fim.py index 63449ffa..5e3d2b92 100755 --- a/tools/generate_categorical_fim.py +++ b/tools/generate_categorical_fim.py @@ -172,7 +172,9 @@ def process_generate_categorical_fim( # if os.path.isdir(os.path.join(fim_run_dir, x)) and x[0] in ['0', '1', '2'] and x[:2] != "19" # ] - valid_ahps_hucs = ["04130003"] + + # valid_ahps_hucs = ["04130003"] + # # Code variation for KEEPING Alaska HUCS: @@ -509,6 +511,7 @@ def iterate_through_huc_stage_based( "lid_alt_m": pd.Series(dtype='float'), "mapped": pd.Series(dtype='str'), "status": pd.Series(dtype='str'), + "missing_stages_msg": pd.Series(dtype='str'), } diff --git a/tools/generate_categorical_fim_flows.py b/tools/generate_categorical_fim_flows.py index 1836da01..fb372170 100755 --- a/tools/generate_categorical_fim_flows.py +++ b/tools/generate_categorical_fim_flows.py @@ -94,6 +94,35 @@ def generate_flows_for_huc( MP_LOG.lprint(f"huc {huc} has no applicable nws_lids") return + df_cols = {"nws_lid": pd.Series(dtype='str'), + "name": pd.Series(dtype='str'), + "WFO": pd.Series(dtype='str'), + "rfc": pd.Series(dtype='str'), + "huc": pd.Series(dtype='str'), + "state": pd.Series(dtype='str'), + "county": pd.Series(dtype='str'), + "magnitude": pd.Series(dtype='str'), + "q": pd.Series(dtype='str'), + "q_uni": pd.Series(dtype='str'), + "q_src": pd.Series(dtype='str'), + "stage": pd.Series(dtype='float'), + "stage_uni": pd.Series(dtype='str'), + "s_src": pd.Series(dtype='str'), + "wrds_time": pd.Series(dtype='str'), + "nrldb_time": pd.Series(dtype='str'), + "nwis_time": pd.Series(dtype='str'), + "lat": pd.Series(dtype='float'), + "lon": pd.Series(dtype='float'), + "dtm_adj_ft": pd.Series(dtype='str'), + "dadj_w_ft": pd.Series(dtype='float'), + "dadj_w_m": pd.Series(dtype='float'), + "lid_alt_ft": pd.Series(dtype='float'), + "lid_alt_m": pd.Series(dtype='float'), + "mapped": pd.Series(dtype='str'), + "status": pd.Series(dtype='str'), + } + + # Loop through each lid in list to create flow file for lid in nws_lids: # Convert lid to lower case