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

Metgrid interpolator bugfixes #2037

Merged
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
4 changes: 2 additions & 2 deletions Source/ERF.H
Original file line number Diff line number Diff line change
Expand Up @@ -1090,9 +1090,9 @@ private:
bool metgrid_use_below_sfc{true};
bool metgrid_use_sfc{true};
bool metgrid_retain_sfc{false};
amrex::Real metgrid_proximity{1000.0};
amrex::Real metgrid_proximity{500.0};
int metgrid_order{2};
int metgrid_force_sfc_k{0};
int metgrid_force_sfc_k{6};

// 1D CDF output (for ingestion in AMR-Wind)
static int output_1d_column;
Expand Down
7 changes: 7 additions & 0 deletions Source/Initialization/ERF_InitFromMetgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ ERF::init_from_metgrid (int lev)
if (real_width > real_set_width)
AMREX_ALWAYS_ASSERT(real_width-real_set_width >= 3);

// Ensure a reasonable value for the order of the vertical interpolation scheme.
AMREX_ALWAYS_ASSERT(metgrid_order > 0 && metgrid_order <= 9);

// Odd behavior can occur if not using the surface and also omitting some near-surface levels.
if (metgrid_force_sfc_k > 0)
AMREX_ALWAYS_ASSERT(metgrid_use_sfc);

// Size the SST and LANDMASK
sst_lev[lev].resize(ntimes);
lmask_lev[lev].resize(ntimes);
Expand Down
Loading
Loading