From ecd3bf13f20cd52bd2a601ca51e758021d3179f2 Mon Sep 17 00:00:00 2001 From: Ahmad Jan Date: Tue, 10 Sep 2024 18:06:50 -0400 Subject: [PATCH] added NWM_PONDED_DEPTH to the bmi output vars list, and updated realizations files. --- realizations/realization_cfe_pet_surfgiuh.json | 3 ++- realizations/realization_cfe_pet_surfnash.json | 3 ++- src/bmi_cfe.c | 16 +++++++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/realizations/realization_cfe_pet_surfgiuh.json b/realizations/realization_cfe_pet_surfgiuh.json index 0bfc418..e33b0a0 100644 --- a/realizations/realization_cfe_pet_surfgiuh.json +++ b/realizations/realization_cfe_pet_surfgiuh.json @@ -19,7 +19,8 @@ "Q_OUT", "POTENTIAL_ET", "ACTUAL_ET", - "SOIL_STORAGE" + "SOIL_STORAGE", + "NWM_PONDED_DEPTH" ], "modules": [ { diff --git a/realizations/realization_cfe_pet_surfnash.json b/realizations/realization_cfe_pet_surfnash.json index dc9b955..b7da7e1 100644 --- a/realizations/realization_cfe_pet_surfnash.json +++ b/realizations/realization_cfe_pet_surfnash.json @@ -19,7 +19,8 @@ "Q_OUT", "POTENTIAL_ET", "ACTUAL_ET", - "SOIL_STORAGE" + "SOIL_STORAGE", + "NWM_PONDED_DEPTH" ], "modules": [ { diff --git a/src/bmi_cfe.c b/src/bmi_cfe.c index 5bda44f..b7dbd8f 100644 --- a/src/bmi_cfe.c +++ b/src/bmi_cfe.c @@ -20,7 +20,7 @@ #define CFE_DEBUG 0 #define INPUT_VAR_NAME_COUNT 5 -#define OUTPUT_VAR_NAME_COUNT 14 +#define OUTPUT_VAR_NAME_COUNT 15 #define STATE_VAR_NAME_COUNT 95 // must match var_info array size @@ -202,7 +202,8 @@ static const char *output_var_names[OUTPUT_VAR_NAME_COUNT] = { "GW_STORAGE", "SOIL_STORAGE", "SOIL_STORAGE_CHANGE", - "SURF_RUNOFF_SCHEME" + "SURF_RUNOFF_SCHEME", + "NWM_PONDED_DEPTH" }; static const char *output_var_types[OUTPUT_VAR_NAME_COUNT] = { @@ -219,7 +220,8 @@ static const char *output_var_types[OUTPUT_VAR_NAME_COUNT] = { "double", "double", "double", - "int" + "int", + "double" }; static const int output_var_item_count[OUTPUT_VAR_NAME_COUNT] = { @@ -236,6 +238,7 @@ static const int output_var_item_count[OUTPUT_VAR_NAME_COUNT] = { 1, 1, 1, + 1, 1 }; @@ -253,7 +256,8 @@ static const char *output_var_units[OUTPUT_VAR_NAME_COUNT] = { "m", "m", "m", - "none" + "none", + "m" }; static const int output_var_grids[OUTPUT_VAR_NAME_COUNT] = { @@ -270,6 +274,7 @@ static const int output_var_grids[OUTPUT_VAR_NAME_COUNT] = { 0, 0, 0, + 0, 0 }; @@ -287,7 +292,8 @@ static const char *output_var_locations[OUTPUT_VAR_NAME_COUNT] = { "node", "node", "node", - "none" + "none", + "node" }; // Don't forget to update Get_value/Get_value_at_indices (and setter) implementation if these are adjusted