Skip to content

Commit 87d94de

Browse files
authored
loop top cell to interpolate. (#3302)
1 parent 421f94a commit 87d94de

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Source/IO/ERF_ReadFromWRFBdy.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ convert_wrfbdy_data (const int itime,
359359
z_lo_src = bdy_c_z_src(i,j,kstart);
360360

361361
bool found = false;
362-
for (int lk(kstart+1); lk<khi; ++lk) {
362+
for (int lk(kstart+1); lk<=khi; ++lk) {
363363
z_hi_src = bdy_c_z_src(i,j,lk);
364364
if (z_dst >= z_lo_src && z_dst <= z_hi_src) {
365365
found = true;
@@ -392,7 +392,7 @@ convert_wrfbdy_data (const int itime,
392392
z_lo_src = bdy_u_z_src(i,j,kstart);
393393

394394
bool found = false;
395-
for (int lk(kstart+1); lk<khi; ++lk) {
395+
for (int lk(kstart+1); lk<=khi; ++lk) {
396396
z_hi_src = bdy_u_z_src(i,j,lk);
397397
if (z_dst >= z_lo_src && z_dst <= z_hi_src) {
398398
found = true;
@@ -423,7 +423,7 @@ convert_wrfbdy_data (const int itime,
423423
z_lo_src = bdy_v_z_src(i,j,kstart);
424424

425425
bool found = false;
426-
for (int lk(kstart+1); lk<khi; ++lk) {
426+
for (int lk(kstart+1); lk<=khi; ++lk) {
427427
z_hi_src = bdy_v_z_src(i,j,lk);
428428
if (z_dst >= z_lo_src && z_dst <= z_hi_src) {
429429
found = true;

0 commit comments

Comments
 (0)