From 5d44e73edbf35b5814836aa5dc3c38597dc9f713 Mon Sep 17 00:00:00 2001 From: Bruce Perry Date: Fri, 12 Jul 2024 16:55:31 -0600 Subject: [PATCH] fix a bunch of warnings --- Exec/DevTests/Bomex/prob.cpp | 2 +- Exec/DevTests/MetGrid/prob.cpp | 2 +- Exec/DevTests/MovingTerrain/prob.cpp | 1 - Source/IO/ERF_Write1DProfiles.cpp | 4 +++- Source/IO/ERF_Write1DProfiles_stag.cpp | 2 +- Source/IO/ERF_WriteScalarProfiles.cpp | 4 +--- Source/Initialization/ERF_init_from_input_sounding.cpp | 2 +- Source/SourceTerms/ERF_make_mom_sources.cpp | 4 ++-- Source/SourceTerms/ERF_make_sources.cpp | 1 - 9 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Exec/DevTests/Bomex/prob.cpp b/Exec/DevTests/Bomex/prob.cpp index f368c7acf..7a005367c 100644 --- a/Exec/DevTests/Bomex/prob.cpp +++ b/Exec/DevTests/Bomex/prob.cpp @@ -387,7 +387,7 @@ Problem::update_geostrophic_profile (const Real& /*time*/, reduce_to_max_per_level(zlevels, z_phys_cc); } - const Real coriolis = 2.0 * 2.0 * PI / 86400.0; // 0.376E-4; + // const Real coriolis = 2.0 * 2.0 * PI / 86400.0; // 0.376E-4; // Only apply temperature source below nominal inversion height for (int k = 0; k <= khi; k++) { diff --git a/Exec/DevTests/MetGrid/prob.cpp b/Exec/DevTests/MetGrid/prob.cpp index bedd22dbd..c01e06833 100644 --- a/Exec/DevTests/MetGrid/prob.cpp +++ b/Exec/DevTests/MetGrid/prob.cpp @@ -8,5 +8,5 @@ amrex_probinit(const amrex_real* problo, const amrex_real* probhi) return std::make_unique(problo, probhi); } -Problem::Problem(const amrex::Real* problo, const amrex::Real* probhi) +Problem::Problem(const amrex::Real* /*problo*/, const amrex::Real* /*probhi*/) {} diff --git a/Exec/DevTests/MovingTerrain/prob.cpp b/Exec/DevTests/MovingTerrain/prob.cpp index 82b7a346b..84efc9fde 100644 --- a/Exec/DevTests/MovingTerrain/prob.cpp +++ b/Exec/DevTests/MovingTerrain/prob.cpp @@ -46,7 +46,6 @@ Problem::init_custom_pert( const bool use_moisture = (sc.moisture_type != MoistureType::None); const Real T_sfc = parms.T_0; - const Real rho_sfc = p_0 / (R_d*T_sfc); //const Real thetabar = T_sfc; Real H = geomdata.ProbHi()[2]; diff --git a/Source/IO/ERF_Write1DProfiles.cpp b/Source/IO/ERF_Write1DProfiles.cpp index 3917e2ec0..36ad220b3 100644 --- a/Source/IO/ERF_Write1DProfiles.cpp +++ b/Source/IO/ERF_Write1DProfiles.cpp @@ -186,7 +186,7 @@ ERF::write_1D_profiles (Real time) * @param h_avg_pw Profile for pressure perturbation * z-velocity on Host */ void -ERF::derive_diag_profiles(Real time, +ERF::derive_diag_profiles(Real /*time*/, Gpu::HostVector& h_avg_u , Gpu::HostVector& h_avg_v , Gpu::HostVector& h_avg_w, Gpu::HostVector& h_avg_rho , Gpu::HostVector& h_avg_th , Gpu::HostVector& h_avg_ksgs, Gpu::HostVector& h_avg_kturb, @@ -246,9 +246,11 @@ ERF::derive_diag_profiles(Real time, Gpu::DeviceVector d_avg_v(hu_size, Real(0.0)); Gpu::DeviceVector d_avg_w(hu_size, Real(0.0)); +#if 0 auto* avg_u_ptr = d_avg_u.data(); auto* avg_v_ptr = d_avg_v.data(); auto* avg_w_ptr = d_avg_w.data(); +#endif Gpu::copy(Gpu::hostToDevice, h_avg_u.begin(), h_avg_u.end(), d_avg_u.begin()); Gpu::copy(Gpu::hostToDevice, h_avg_v.begin(), h_avg_v.end(), d_avg_v.begin()); diff --git a/Source/IO/ERF_Write1DProfiles_stag.cpp b/Source/IO/ERF_Write1DProfiles_stag.cpp index 6061e1114..22ba1422a 100644 --- a/Source/IO/ERF_Write1DProfiles_stag.cpp +++ b/Source/IO/ERF_Write1DProfiles_stag.cpp @@ -301,7 +301,7 @@ ERF::write_1D_profiles_stag (Real time) * @param h_avg_pw Profile for pressure perturbation * z-velocity on Host */ void -ERF::derive_diag_profiles_stag (Real time, +ERF::derive_diag_profiles_stag (Real /*time*/, Gpu::HostVector& h_avg_u , Gpu::HostVector& h_avg_v , Gpu::HostVector& h_avg_w, Gpu::HostVector& h_avg_rho , Gpu::HostVector& h_avg_th , Gpu::HostVector& h_avg_ksgs, Gpu::HostVector& h_avg_kturb, diff --git a/Source/IO/ERF_WriteScalarProfiles.cpp b/Source/IO/ERF_WriteScalarProfiles.cpp index c4ca7a0e5..b531afc85 100644 --- a/Source/IO/ERF_WriteScalarProfiles.cpp +++ b/Source/IO/ERF_WriteScalarProfiles.cpp @@ -170,12 +170,10 @@ ERF::sum_integrated_quantities (Real time) } Real -ERF::cloud_fraction (Real time) +ERF::cloud_fraction (Real /*time*/) { BL_PROFILE("ERF::cloud_fraction()"); - Real sum = 0.0; - int lev = 0; // This holds all of qc MultiFab qc(vars_new[lev][Vars::cons],make_alias,RhoQ2_comp,1); diff --git a/Source/Initialization/ERF_init_from_input_sounding.cpp b/Source/Initialization/ERF_init_from_input_sounding.cpp index 77e1fe145..7e630bba5 100644 --- a/Source/Initialization/ERF_init_from_input_sounding.cpp +++ b/Source/Initialization/ERF_init_from_input_sounding.cpp @@ -195,7 +195,7 @@ init_bx_scalars_from_input_sounding_hse (const Box &bx, Array4 const &pi_hse_arr, GeometryData const &geomdata, Array4 const &z_cc_arr, - const Real& l_gravity, + const Real& /*l_gravity*/, const Real& l_rdOcp, const bool& l_moist, InputSoundingData const &inputSoundingData) diff --git a/Source/SourceTerms/ERF_make_mom_sources.cpp b/Source/SourceTerms/ERF_make_mom_sources.cpp index c7d72a2d5..277331457 100644 --- a/Source/SourceTerms/ERF_make_mom_sources.cpp +++ b/Source/SourceTerms/ERF_make_mom_sources.cpp @@ -41,8 +41,8 @@ void make_mom_sources (int /*level*/, int /*nrk*/, Real dt, Vector& S_data, const MultiFab & S_prim, - const MultiFab & xvel, - const MultiFab & yvel, + const MultiFab & /*xvel*/, + const MultiFab & /*yvel*/, MultiFab & xmom_src, MultiFab & ymom_src, MultiFab & zmom_src, diff --git a/Source/SourceTerms/ERF_make_sources.cpp b/Source/SourceTerms/ERF_make_sources.cpp index 817fa2bdc..7a0b869fd 100644 --- a/Source/SourceTerms/ERF_make_sources.cpp +++ b/Source/SourceTerms/ERF_make_sources.cpp @@ -268,7 +268,6 @@ void make_sources (int level, // ************************************************************************************* if (solverChoice.custom_w_subsidence && (solverChoice.moisture_type != MoistureType::None)) { const int nv = RhoQ1_comp; - const int nc = RhoQ2_comp; if (solverChoice.custom_forcing_prim_vars) { const int nr = Rho_comp; ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept