Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuding when spec width equals total width #1390

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Source/Initialization/ERF_init_from_metgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,11 @@ ERF::init_from_metgrid (int lev)
}
}

// NOTE: We must guarantee one halo cell in the bdy file.
// Otherwise, we make the total width match the set width.
if (metgrid_bdy_width-1 <= metgrid_bdy_set_width) metgrid_bdy_width = metgrid_bdy_set_width;
amrex::Print() << "Running with specification width: " << metgrid_bdy_set_width
<< " and relaxation width: " << metgrid_bdy_width - metgrid_bdy_set_width << std::endl;

// Set up boxes for lateral boundary arrays.
bdy_data_xlo.resize(ntimes);
Expand Down Expand Up @@ -928,7 +933,7 @@ init_base_state_from_metgrid (const bool use_moisture,
p_hse_arr(i,j,k) = Pd_vec[k];
if (mask_c_arr(i,j,k)) {
r_hse_arr(i,j,k) = Rhod_vec[k];
Q_arr(i,j,k) = (use_moisture) ? Rhod_vec[k]*Q_vec[k] : 0.0;
if (use_moisture) Q_arr(i,j,k) = Rhod_vec[k]*Q_vec[k];
Theta_arr(i,j,k) = Rhod_vec[k]*Thetad_vec[k];
}
} // k
Expand Down
3 changes: 1 addition & 2 deletions Source/TimeIntegration/TI_slow_rhs_fun.H
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,9 @@
} else if (init_type == "metgrid") {
width = metgrid_bdy_width;
set_width = metgrid_bdy_set_width;
if (width == set_width) width += 1;
}
wrfbdy_compute_interior_ghost_rhs(init_type, bdy_time_interval, start_bdy_time, new_stage_time, slow_dt,
width-1, set_width, fine_geom,
width, set_width, fine_geom,
S_rhs, S_data, bdy_data_xlo, bdy_data_xhi,
bdy_data_ylo, bdy_data_yhi);
}
Expand Down
Loading
Loading