Skip to content

Commit

Permalink
Pass correct widths to post when using metgrid. (#1403)
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi authored Jan 26, 2024
1 parent 30cf627 commit 8609801
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Source/TimeIntegration/TI_slow_rhs_fun.H
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,21 @@
Real slow_dt = new_stage_time - old_step_time;

#if defined(ERF_USE_NETCDF)
int width, set_width;
bool moist_zero = false;
if ( use_real_bcs && (solverChoice.moisture_type != MoistureType::None) && (level==0) )
{
// Flag for moisture relaxation zone
if (init_type=="real" && wrfbdy_set_width > 0) moist_zero = true;
if (init_type=="metgrid" && metgrid_bdy_set_width > 0) moist_zero = true;
if (init_type=="real") {
width = wrfbdy_width;
set_width = wrfbdy_set_width;
if (wrfbdy_set_width > 0) moist_zero = true;
}
if (init_type=="metgrid") {
width = metgrid_bdy_width;
set_width = metgrid_bdy_set_width;
if (metgrid_bdy_set_width > 0) moist_zero = true;
}
}
#endif

Expand Down Expand Up @@ -318,7 +327,7 @@
mapfac_m[level], mapfac_u[level], mapfac_v[level],
#if defined(ERF_USE_NETCDF)
moist_zero, bdy_time_interval, start_bdy_time, new_stage_time,
wrfbdy_width-1, wrfbdy_set_width,
width, set_width,
bdy_data_xlo, bdy_data_xhi, bdy_data_ylo, bdy_data_yhi,
#endif
fr_as_crse, fr_as_fine
Expand All @@ -334,7 +343,7 @@
mapfac_m[level], mapfac_u[level], mapfac_v[level],
#if defined(ERF_USE_NETCDF)
moist_zero, bdy_time_interval, start_bdy_time, new_stage_time,
wrfbdy_width-1, wrfbdy_set_width,
width, set_width,
bdy_data_xlo, bdy_data_xhi, bdy_data_ylo, bdy_data_yhi,
#endif
fr_as_crse, fr_as_fine
Expand Down

0 comments on commit 8609801

Please sign in to comment.