Skip to content

Commit

Permalink
Fixed a bug introduced when cleaning up code for init_type="metgrid"
Browse files Browse the repository at this point in the history
  • Loading branch information
wiersema1 committed Oct 25, 2024
1 parent bb0cbb7 commit f969b8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Initialization/ERF_Metgrid_utils.H
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,6 @@ interpolate_column_metgrid (const bool& metgrid_use_below_sfc,
}

int ksta, kend;
count = 0;
if (metgrid_use_below_sfc && metgrid_use_sfc) {
// Use all levels.
int kord = 0;
Expand All @@ -575,6 +574,7 @@ interpolate_column_metgrid (const bool& metgrid_use_below_sfc,
ordered_z(k) = ordered_z(k+1);
ordered_data(k) = ordered_data(k+1);
}
count = 0;
for (int k=0; k < kmax_orig-1; k++) {
count++;
if (orig_z(kmax_orig-1) == ordered_z(k)) break;
Expand All @@ -584,6 +584,7 @@ interpolate_column_metgrid (const bool& metgrid_use_below_sfc,

} else if (!metgrid_use_below_sfc && metgrid_use_sfc) {
// Use all levels above and including the surface.
count = 0;
int kcount = k_above_sfc-1-zap_below;
for (int k=0; k < kmax_orig; k++) {
if (ordered_z(kcount) == orig_z(k)) {
Expand Down

0 comments on commit f969b8a

Please sign in to comment.