Skip to content

Commit

Permalink
Merge branch 'pr1283' into gabls2_before_merge_c0a1c9f
Browse files Browse the repository at this point in the history
  • Loading branch information
ewquon committed Dec 15, 2023
2 parents 663583b + e8b228e commit 847edb2
Show file tree
Hide file tree
Showing 27 changed files with 625 additions and 659 deletions.
13 changes: 13 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
#23.11

-- AMReX submodule set to 23.11 release hash (ae7b64b)

-- Bug fix with vertical grid stretching and MOST (#1275)

-- Bug fix with negative K_turb below surface and MYNN2.5 PBL model (#1271)

-- Correction to equation of state with moisture (#1263)

-- Generalized multi-level sponge zones. This allows for nudging of fine solution
towards coarse solution with complex box arrays. (#1233)

# 23.10

-- First release since JOSS paper. Too many key ERF PRs to summarize.
Expand Down
27 changes: 17 additions & 10 deletions Source/BoundaryConditions/MOSTStress.H
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct adiabatic_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -202,7 +202,7 @@ struct adiabatic_mod_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -260,7 +260,7 @@ struct surface_flux
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -323,7 +323,7 @@ struct surface_flux_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -387,7 +387,7 @@ struct surface_flux_mod_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -447,7 +447,7 @@ struct surface_temp
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -512,7 +512,7 @@ struct surface_temp_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -578,7 +578,7 @@ struct surface_temp_mod_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -639,6 +639,7 @@ struct moeng_flux
rho = cons_arr(ic,jc,zlo,Rho_comp);
theta = cons_arr(ic,jc,zlo,RhoTheta_comp) / rho;
eta = eta_arr(ie,je,zlo,EddyDiff::Theta_v); // == rho * alpha [kg/m^3 * m^2/s]
eta = amrex::max(eta,eps);

amrex::Real theta_mean = tm_arr(ic,jc,zlo);
amrex::Real wsp_mean = umm_arr(ic,jc,zlo);
Expand All @@ -649,7 +650,7 @@ struct moeng_flux
amrex::Real wsp = sqrt(velx*velx+vely*vely);
amrex::Real num1 = (theta-theta_mean)*wsp_mean;
amrex::Real num2 = (theta_mean-theta_surf)*wsp;
amrex::Real moflux = (std::abs(tstar) > EPS) ?
amrex::Real moflux = (std::abs(tstar) > eps) ?
tstar*ustar*(num1+num2)/((theta_mean-theta_surf)*wsp_mean) : 0.0;
amrex::Real deltaz = dz * (zlo - k);

Expand Down Expand Up @@ -700,6 +701,7 @@ struct moeng_flux
+ cons_arr(ic ,jc,zlo,Rho_comp) );
eta = 0.5 *( eta_arr(ie-1,je,zlo,EddyDiff::Mom_v)
+ eta_arr(ie ,je,zlo,EddyDiff::Mom_v) );
eta = amrex::max(eta,eps);

amrex::Real umean = um_arr(i,j,zlo);
amrex::Real wsp_mean = 0.5 * ( umm_arr(ic-1,jc,zlo) + umm_arr(ic,jc,zlo) );
Expand Down Expand Up @@ -763,6 +765,7 @@ struct moeng_flux
+ cons_arr(ic,jc ,zlo,Rho_comp) );
eta = 0.5*( eta_arr(ie,je-1,zlo,EddyDiff::Mom_v)
+ eta_arr(ie,je ,zlo,EddyDiff::Mom_v) );
eta = amrex::max(eta,eps);

amrex::Real vmean = vm_arr(i,j,zlo);
amrex::Real wsp_mean = 0.5 * ( umm_arr(ic,jc-1,zlo) + umm_arr(ic,jc,zlo) );
Expand All @@ -784,7 +787,7 @@ struct moeng_flux

private:
int zlo;
static constexpr amrex::Real EPS = 1e-16;
const amrex::Real eps = 1e-16;
};


Expand Down Expand Up @@ -833,6 +836,7 @@ struct donelan_flux
rho = cons_arr(ic,jc,zlo,Rho_comp);
theta = cons_arr(ic,jc,zlo,RhoTheta_comp) / rho;
eta = eta_arr(ie,je,zlo,EddyDiff::Theta_v); // == rho * alpha [kg/m^3 * m^2/s]
eta = amrex::max(eta,eps);

amrex::Real Cd = 0.0012;
amrex::Real wsp_mean = umm_arr(ic,jc,zlo);
Expand Down Expand Up @@ -888,6 +892,7 @@ struct donelan_flux
+ cons_arr(ic ,jc,zlo,Rho_comp) );
eta = 0.5 *( eta_arr(ie-1,je,zlo,EddyDiff::Mom_v)
+ eta_arr(ie ,je,zlo,EddyDiff::Mom_v) );
eta = amrex::max(eta,eps);

amrex::Real Cd = 0.001;
const amrex::Real c = 7e-5;
Expand Down Expand Up @@ -955,6 +960,7 @@ struct donelan_flux
+ cons_arr(ic,jc ,zlo,Rho_comp) );
eta = 0.5*( eta_arr(ie,je-1,zlo,EddyDiff::Mom_v)
+ eta_arr(ie,je ,zlo,EddyDiff::Mom_v) );
eta = amrex::max(eta,eps);

amrex::Real Cd = 0.001;
const amrex::Real c = 7e-5;
Expand All @@ -980,5 +986,6 @@ struct donelan_flux

private:
int zlo;
const amrex::Real eps = 1e-16;
};
#endif
26 changes: 13 additions & 13 deletions Source/Derive.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

namespace derived {

void erf_derrhodivide(
void erf_derrhodivide (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
const amrex::FArrayBox& datfab,
const int scalar_index);

void erf_dernull(
void erf_dernull (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -23,7 +23,7 @@ void erf_dernull(
const int* bcrec,
const int level);

void erf_derpres(
void erf_derpres (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -34,7 +34,7 @@ void erf_derpres(
const int* bcrec,
const int level);

void erf_dersoundspeed(
void erf_dersoundspeed (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -45,7 +45,7 @@ void erf_dersoundspeed(
const int* bcrec,
const int level);

void erf_dertemp(
void erf_dertemp (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -56,7 +56,7 @@ void erf_dertemp(
const int* bcrec,
const int level);

void erf_dertheta(
void erf_dertheta (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -67,7 +67,7 @@ void erf_dertheta(
const int* bcrec,
const int level);

void erf_derscalar(
void erf_derscalar (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -78,7 +78,7 @@ void erf_derscalar(
const int* bcrec,
const int level);

void erf_derKE(
void erf_derKE (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -89,7 +89,7 @@ void erf_derKE(
const int* bcrec,
const int level);

void erf_derQKE(
void erf_derQKE (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -101,7 +101,7 @@ void erf_derQKE(
const int level);

#if defined(ERF_USE_MOISTURE)
void erf_derQt(
void erf_derQt (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -112,7 +112,7 @@ void erf_derQt(
const int* bcrec,
const int level);

void erf_derQp(
void erf_derQp (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -123,7 +123,7 @@ void erf_derQp(
const int* bcrec,
const int level);
#elif defined(ERF_USE_WARM_NO_PRECIP)
void erf_derQv(
void erf_derQv (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand All @@ -133,7 +133,7 @@ void erf_derQv(
amrex::Real time,
const int* bcrec,
const int level);
void erf_derQc(
void erf_derQc (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int dcomp,
Expand Down
26 changes: 13 additions & 13 deletions Source/Derive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace derived {
* @params[in] datfab array of data used to construct derived quantity
* @params[in] scalar_index index of quantity to be divided by density
*/
void erf_derrhodivide(
void erf_derrhodivide (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
const amrex::FArrayBox& datfab,
Expand All @@ -34,7 +34,7 @@ void erf_derrhodivide(
* Placeholder function that does nothing
*/
void
erf_dernull(
erf_dernull (
const amrex::Box& /*bx*/,
amrex::FArrayBox& /*derfab*/,
int /*dcomp*/,
Expand All @@ -54,7 +54,7 @@ erf_dernull(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_derpres(
erf_derpres (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand Down Expand Up @@ -92,7 +92,7 @@ erf_derpres(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_dersoundspeed(
erf_dersoundspeed (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand Down Expand Up @@ -125,7 +125,7 @@ erf_dersoundspeed(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_dertemp(
erf_dertemp (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand Down Expand Up @@ -155,7 +155,7 @@ erf_dertemp(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_dertheta(
erf_dertheta (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand All @@ -177,7 +177,7 @@ erf_dertheta(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_derscalar(
erf_derscalar (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand All @@ -199,7 +199,7 @@ erf_derscalar(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_derKE(
erf_derKE (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand All @@ -221,7 +221,7 @@ erf_derKE(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_derQKE(
erf_derQKE (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand All @@ -244,7 +244,7 @@ erf_derQKE(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_derQt(
erf_derQt (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand All @@ -266,7 +266,7 @@ erf_derQt(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_derQp(
erf_derQp (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand All @@ -288,7 +288,7 @@ erf_derQp(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_derQv(
erf_derQv (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand All @@ -309,7 +309,7 @@ erf_derQv(
* @params[in] datfab array of data used to construct derived quantity
*/
void
erf_derQc(
erf_derQc (
const amrex::Box& bx,
amrex::FArrayBox& derfab,
int /*dcomp*/,
Expand Down
Loading

0 comments on commit 847edb2

Please sign in to comment.