diff --git a/Source/SourceTerms/ERF_buoyancy_utils.H b/Source/SourceTerms/ERF_buoyancy_utils.H index 7e372672c..661f290ec 100644 --- a/Source/SourceTerms/ERF_buoyancy_utils.H +++ b/Source/SourceTerms/ERF_buoyancy_utils.H @@ -7,14 +7,14 @@ AMREX_GPU_HOST AMREX_FORCE_INLINE amrex::Real -buoyancy_dry_default (int& i, - int& j, - int& k, - amrex::Real const& grav_gpu, - amrex::Real const& rd_over_cp, - const amrex::Array4& p0_arr, - const amrex::Array4& r0_arr, - const amrex::Array4& cell_data) +buoyancy_dry_anelastic (int& i, + int& j, + int& k, + amrex::Real const& grav_gpu, + amrex::Real const& rd_over_cp, + const amrex::Array4& p0_arr, + const amrex::Array4& r0_arr, + const amrex::Array4& cell_data) { amrex::Real rt0_hi = getRhoThetagivenP(p0_arr(i,j,k)); amrex::Real t0_hi = getTgivenPandTh(p0_arr(i,j,k), rt0_hi/r0_arr(i,j,k), rd_over_cp); @@ -37,7 +37,6 @@ amrex::Real buoyancy_moist_anelastic (int& i, int& j, int& k, - const int& klo, amrex::Real const& grav_gpu, amrex::Real const& rv_over_rd, const amrex::Array4& p0_arr, diff --git a/Source/SourceTerms/ERF_make_buoyancy.cpp b/Source/SourceTerms/ERF_make_buoyancy.cpp index f2ff8e5d5..274e0e787 100644 --- a/Source/SourceTerms/ERF_make_buoyancy.cpp +++ b/Source/SourceTerms/ERF_make_buoyancy.cpp @@ -49,7 +49,6 @@ void make_buoyancy (Vector& S_data, Real rd_over_cp = solverChoice.rdOcp; Real rv_over_rd = R_v/R_d; - Real c_p = solverChoice.c_p; if (anelastic == 1) { #ifdef _OPENMP @@ -73,9 +72,9 @@ void make_buoyancy (Vector& S_data, if (solverChoice.moisture_type == MoistureType::None) { ParallelFor(tbz, [=] AMREX_GPU_DEVICE (int i, int j, int k) { - buoyancy_fab(i, j, k) = buoyancy_dry_default(i,j,k, - grav_gpu[2],rd_over_cp, - p0_arr,r0_arr,cell_data); + buoyancy_fab(i, j, k) = buoyancy_dry_anelastic(i,j,k, + grav_gpu[2],rd_over_cp, + p0_arr,r0_arr,cell_data); }); } else { // NOTE: For decomposition in the vertical direction, klo may not @@ -83,7 +82,7 @@ void make_buoyancy (Vector& S_data, // of bounds error since it depends upon the surface theta_l ParallelFor(tbz, [=] AMREX_GPU_DEVICE (int i, int j, int k) { - buoyancy_fab(i, j, k) = buoyancy_moist_anelastic(i,j,k,klo, + buoyancy_fab(i, j, k) = buoyancy_moist_anelastic(i,j,k, grav_gpu[2],rv_over_rd, p0_arr,r0_arr,cell_data); }); @@ -97,11 +96,11 @@ void make_buoyancy (Vector& S_data, // ****************************************************************************************** if (solverChoice.moisture_type == MoistureType::None) { + int n_q_dry = 0; if (solverChoice.buoyancy_type == 1) { #ifdef _OPENMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif - int n_q_dry = 0; for ( MFIter mfi(buoyancy,TilingIfNotGPU()); mfi.isValid(); ++mfi) { Box tbz = mfi.tilebox(); @@ -151,9 +150,9 @@ void make_buoyancy (Vector& S_data, ParallelFor(tbz, [=] AMREX_GPU_DEVICE (int i, int j, int k) { - buoyancy_fab(i, j, k) = buoyancy_dry_default(i,j,k, - grav_gpu[2],rd_over_cp, - p0_arr,r0_arr,cell_data); + buoyancy_fab(i, j, k) = buoyancy_dry_anelastic(i,j,k, + grav_gpu[2],rd_over_cp, + p0_arr,r0_arr,cell_data); }); } // mfi } // buoyancy_type