Skip to content

Commit

Permalink
added NWM_PONDED_DEPTH to the bmi output vars list, and updated reali…
Browse files Browse the repository at this point in the history
…zations files.
  • Loading branch information
ajkhattak committed Sep 10, 2024
1 parent 8cc8c44 commit ecd3bf1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion realizations/realization_cfe_pet_surfgiuh.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"Q_OUT",
"POTENTIAL_ET",
"ACTUAL_ET",
"SOIL_STORAGE"
"SOIL_STORAGE",
"NWM_PONDED_DEPTH"
],
"modules": [
{
Expand Down
3 changes: 2 additions & 1 deletion realizations/realization_cfe_pet_surfnash.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"Q_OUT",
"POTENTIAL_ET",
"ACTUAL_ET",
"SOIL_STORAGE"
"SOIL_STORAGE",
"NWM_PONDED_DEPTH"
],
"modules": [
{
Expand Down
16 changes: 11 additions & 5 deletions src/bmi_cfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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] = {
Expand All @@ -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] = {
Expand All @@ -236,6 +238,7 @@ static const int output_var_item_count[OUTPUT_VAR_NAME_COUNT] = {
1,
1,
1,
1,
1
};

Expand All @@ -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] = {
Expand All @@ -270,6 +274,7 @@ static const int output_var_grids[OUTPUT_VAR_NAME_COUNT] = {
0,
0,
0,
0,
0
};

Expand All @@ -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
Expand Down

0 comments on commit ecd3bf1

Please sign in to comment.