diff --git a/Docs/sphinx_doc/Inputs.rst b/Docs/sphinx_doc/Inputs.rst index 5fdaf7cc1..26c4d569c 100644 --- a/Docs/sphinx_doc/Inputs.rst +++ b/Docs/sphinx_doc/Inputs.rst @@ -172,7 +172,8 @@ This automatically activates **erf.use_terrain**. By default, the problem-specific terrain is initialized to be flat at an elevation of z=0. These inputs are used to automatically generate the staggered z levels used to calculate the grid metric transformation. Alternatively, arbitrary z levels may -be specified with the **erf.terrain_z_levels** parameter. +be specified with the **erf.terrain_z_levels** parameter, which should vary +from 0 (at the surface) to the domain height. .. _list-of-parameters-3: diff --git a/Exec/ABL/prob.H b/Exec/ABL/prob.H index b22c7d56b..7e2751a67 100644 --- a/Exec/ABL/prob.H +++ b/Exec/ABL/prob.H @@ -68,11 +68,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "ABL"; } diff --git a/Exec/ABL/prob.cpp b/Exec/ABL/prob.cpp index c0adb291b..3fa21566d 100644 --- a/Exec/ABL/prob.cpp +++ b/Exec/ABL/prob.cpp @@ -164,28 +164,3 @@ Problem::init_custom_pert( } }); } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,0) = 0.; - }); - } -} diff --git a/Exec/ABL_input_sounding/prob.H b/Exec/ABL_input_sounding/prob.H index c0a8a4e74..8fee85f36 100644 --- a/Exec/ABL_input_sounding/prob.H +++ b/Exec/ABL_input_sounding/prob.H @@ -67,11 +67,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "ABL with input sounding"; } diff --git a/Exec/ABL_input_sounding/prob.cpp b/Exec/ABL_input_sounding/prob.cpp index 80dddebe7..0fd460d2d 100644 --- a/Exec/ABL_input_sounding/prob.cpp +++ b/Exec/ABL_input_sounding/prob.cpp @@ -157,28 +157,3 @@ Problem::init_custom_pert( } }); } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,0) = 0.; - }); - } -} diff --git a/Exec/DevTests/MiguelDev/prob.H b/Exec/DevTests/MiguelDev/prob.H index 2bbf9bb93..b0f0955e4 100644 --- a/Exec/DevTests/MiguelDev/prob.H +++ b/Exec/DevTests/MiguelDev/prob.H @@ -57,11 +57,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "ABL test"; } diff --git a/Exec/DevTests/MiguelDev/prob.cpp b/Exec/DevTests/MiguelDev/prob.cpp index 035160882..088d3c869 100644 --- a/Exec/DevTests/MiguelDev/prob.cpp +++ b/Exec/DevTests/MiguelDev/prob.cpp @@ -140,31 +140,3 @@ Problem::init_custom_pert( }); } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Bottom of domain - int k0 = 0; - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k0) = 0.0; - }); - } -} diff --git a/Exec/DevTests/MultiBlock/prob.H b/Exec/DevTests/MultiBlock/prob.H index 4b58c8691..44b27ee2f 100644 --- a/Exec/DevTests/MultiBlock/prob.H +++ b/Exec/DevTests/MultiBlock/prob.H @@ -46,11 +46,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "MultiBlock"; } diff --git a/Exec/DevTests/MultiBlock/prob.cpp b/Exec/DevTests/MultiBlock/prob.cpp index 20be90ef0..5908aa55c 100644 --- a/Exec/DevTests/MultiBlock/prob.cpp +++ b/Exec/DevTests/MultiBlock/prob.cpp @@ -111,31 +111,3 @@ Problem::init_custom_pert( amrex::Gpu::streamSynchronize(); } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Bottom of domain - int k0 = 0; - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k0) = 0.0; - }); - } -} diff --git a/Exec/LLJ/prob.H b/Exec/LLJ/prob.H index 0d460d496..4bb8aa331 100644 --- a/Exec/LLJ/prob.H +++ b/Exec/LLJ/prob.H @@ -39,11 +39,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "Low-Level Jet"; } diff --git a/Exec/LLJ/prob.cpp b/Exec/LLJ/prob.cpp index 6f2ad9f38..9bc19a3e7 100644 --- a/Exec/LLJ/prob.cpp +++ b/Exec/LLJ/prob.cpp @@ -42,28 +42,3 @@ Problem::init_custom_pert( { amrex::Print() << "Dummy function..Needed for linking" << std::endl; } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,0) = 0.; - }); - } -} diff --git a/Exec/Radiation/prob.H b/Exec/Radiation/prob.H index 77933842f..04025026f 100644 --- a/Exec/Radiation/prob.H +++ b/Exec/Radiation/prob.H @@ -46,11 +46,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - void erf_init_rayleigh ( amrex::Vector& tau, amrex::Vector& ubar, diff --git a/Exec/Radiation/prob.cpp b/Exec/Radiation/prob.cpp index 23c967ad4..f1fd2c10d 100644 --- a/Exec/Radiation/prob.cpp +++ b/Exec/Radiation/prob.cpp @@ -212,34 +212,6 @@ Problem::init_custom_pert( amrex::Gpu::streamSynchronize(); } -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Bottom of domain - int k0 = 0; - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k0) = 0.0; - }); - } -} - void Problem::erf_init_rayleigh( amrex::Vector& tau, diff --git a/Exec/RegTests/Bubble/prob.H b/Exec/RegTests/Bubble/prob.H index 9df0b7400..87f555bda 100644 --- a/Exec/RegTests/Bubble/prob.H +++ b/Exec/RegTests/Bubble/prob.H @@ -72,11 +72,6 @@ public: std::unique_ptr& z_phys_nd, amrex::Geometry const& geom) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE amrex::Real compute_theta (const amrex::Real T_b, const amrex::Real p_b); diff --git a/Exec/RegTests/Bubble/prob.cpp b/Exec/RegTests/Bubble/prob.cpp index de5ff15d3..2d2a87f7d 100644 --- a/Exec/RegTests/Bubble/prob.cpp +++ b/Exec/RegTests/Bubble/prob.cpp @@ -457,31 +457,3 @@ Problem::init_custom_pert( amrex::Gpu::streamSynchronize(); } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Bottom of domain - int k0 = 0; - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k0) = 0.0; - }); - } -} diff --git a/Exec/RegTests/CouetteFlow/prob.H b/Exec/RegTests/CouetteFlow/prob.H index 570d2ef92..20dfde89a 100644 --- a/Exec/RegTests/CouetteFlow/prob.H +++ b/Exec/RegTests/CouetteFlow/prob.H @@ -41,11 +41,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "Couette Flow"; } diff --git a/Exec/RegTests/CouetteFlow/prob.cpp b/Exec/RegTests/CouetteFlow/prob.cpp index 0bc9be19e..c76c56b87 100644 --- a/Exec/RegTests/CouetteFlow/prob.cpp +++ b/Exec/RegTests/CouetteFlow/prob.cpp @@ -75,28 +75,3 @@ Problem::init_custom_pert( z_vel(i, j, k) = parms.w_0; }); } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,0) = 0.; - }); - } -} diff --git a/Exec/RegTests/DensityCurrent/prob.H b/Exec/RegTests/DensityCurrent/prob.H index 7d17e9d8a..6d9e59888 100644 --- a/Exec/RegTests/DensityCurrent/prob.H +++ b/Exec/RegTests/DensityCurrent/prob.H @@ -44,11 +44,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "Density Current"; } diff --git a/Exec/RegTests/DensityCurrent/prob.cpp b/Exec/RegTests/DensityCurrent/prob.cpp index 04ec271ce..9b92e7756 100644 --- a/Exec/RegTests/DensityCurrent/prob.cpp +++ b/Exec/RegTests/DensityCurrent/prob.cpp @@ -148,32 +148,3 @@ Problem::init_custom_pert( amrex::Gpu::streamSynchronize(); } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Bottom of domain - int k0 = 0; - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k0) = 0.0; - }); - } -} - diff --git a/Exec/RegTests/DynamicRefinement/prob.H b/Exec/RegTests/DynamicRefinement/prob.H index 1755d4979..8bae079aa 100644 --- a/Exec/RegTests/DynamicRefinement/prob.H +++ b/Exec/RegTests/DynamicRefinement/prob.H @@ -51,11 +51,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "Dynamic Refinement"; } diff --git a/Exec/RegTests/DynamicRefinement/prob.cpp b/Exec/RegTests/DynamicRefinement/prob.cpp index 0b2b549ad..3f59f0386 100644 --- a/Exec/RegTests/DynamicRefinement/prob.cpp +++ b/Exec/RegTests/DynamicRefinement/prob.cpp @@ -165,29 +165,6 @@ Problem::init_custom_pert( }); } -void -Problem::init_custom_terrain( - const Geometry& geom, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - auto dx = geom.CellSizeArray(); - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - const Box& gbx = mfi.growntilebox(1); - Array4 z_arr = z_phys_nd.array(mfi); - ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) { - - Real z = k * dx[2]; - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k) = z; - }); - } - z_phys_nd.FillBoundary(geom.periodicity()); -} - #if 0 AMREX_GPU_DEVICE Real diff --git a/Exec/RegTests/EkmanSpiral_custom/prob.H b/Exec/RegTests/EkmanSpiral_custom/prob.H index fedf5e9d9..d6cc4e3b1 100644 --- a/Exec/RegTests/EkmanSpiral_custom/prob.H +++ b/Exec/RegTests/EkmanSpiral_custom/prob.H @@ -39,11 +39,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "Ekman Spiral"; } diff --git a/Exec/RegTests/EkmanSpiral_custom/prob.cpp b/Exec/RegTests/EkmanSpiral_custom/prob.cpp index e608032ee..833e3570d 100644 --- a/Exec/RegTests/EkmanSpiral_custom/prob.cpp +++ b/Exec/RegTests/EkmanSpiral_custom/prob.cpp @@ -106,31 +106,3 @@ Problem::init_custom_pert( z_vel(i, j, k) = 0.0; }); } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Bottom of domain - int k0 = 0; - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k0) = 0.0; - }); - } -} diff --git a/Exec/RegTests/EkmanSpiral_ideal/prob.H b/Exec/RegTests/EkmanSpiral_ideal/prob.H index 192d96138..9ea7fb1e7 100644 --- a/Exec/RegTests/EkmanSpiral_ideal/prob.H +++ b/Exec/RegTests/EkmanSpiral_ideal/prob.H @@ -39,11 +39,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "Ekman Spiral (ideal)"; } diff --git a/Exec/RegTests/EkmanSpiral_ideal/prob.cpp b/Exec/RegTests/EkmanSpiral_ideal/prob.cpp index c69999a7b..bffe4924a 100644 --- a/Exec/RegTests/EkmanSpiral_ideal/prob.cpp +++ b/Exec/RegTests/EkmanSpiral_ideal/prob.cpp @@ -42,31 +42,3 @@ Problem::init_custom_pert( { amrex::Print() << "Dummy function..Needed for linking" << std::endl; } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Bottom of domain - int k0 = 0; - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k0) = 0.0; - }); - } -} diff --git a/Exec/RegTests/EkmanSpiral_input_sounding/prob.H b/Exec/RegTests/EkmanSpiral_input_sounding/prob.H index cd96fa98b..5415ffb5c 100644 --- a/Exec/RegTests/EkmanSpiral_input_sounding/prob.H +++ b/Exec/RegTests/EkmanSpiral_input_sounding/prob.H @@ -39,11 +39,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "Ekman Spiral (input sounding)"; } diff --git a/Exec/RegTests/EkmanSpiral_input_sounding/prob.cpp b/Exec/RegTests/EkmanSpiral_input_sounding/prob.cpp index ab357578e..0fefa5616 100644 --- a/Exec/RegTests/EkmanSpiral_input_sounding/prob.cpp +++ b/Exec/RegTests/EkmanSpiral_input_sounding/prob.cpp @@ -42,31 +42,3 @@ Problem::init_custom_pert( { amrex::Print() << "Dummy function..Needed for linking" << std::endl; } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Bottom of domain - int k0 = 0; - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k0) = 0.0; - }); - } -} diff --git a/Exec/RegTests/IsentropicVortex/prob.H b/Exec/RegTests/IsentropicVortex/prob.H index d2b51270f..fe9567010 100644 --- a/Exec/RegTests/IsentropicVortex/prob.H +++ b/Exec/RegTests/IsentropicVortex/prob.H @@ -50,11 +50,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "Isentropic Vortex"; } diff --git a/Exec/RegTests/IsentropicVortex/prob.cpp b/Exec/RegTests/IsentropicVortex/prob.cpp index 9c9aef46c..685c2c480 100644 --- a/Exec/RegTests/IsentropicVortex/prob.cpp +++ b/Exec/RegTests/IsentropicVortex/prob.cpp @@ -167,29 +167,6 @@ Problem::init_custom_pert( }); } -void -Problem::init_custom_terrain( - const Geometry& geom, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - auto dx = geom.CellSizeArray(); - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - const Box& gbx = mfi.growntilebox(1); - Array4 z_arr = z_phys_nd.array(mfi); - ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) { - - Real z = k * dx[2]; - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k) = z; - }); - } - z_phys_nd.FillBoundary(geom.periodicity()); -} - #if 0 AMREX_GPU_DEVICE Real diff --git a/Exec/RegTests/PoiseuilleFlow/prob.H b/Exec/RegTests/PoiseuilleFlow/prob.H index 120b23372..508934e86 100644 --- a/Exec/RegTests/PoiseuilleFlow/prob.H +++ b/Exec/RegTests/PoiseuilleFlow/prob.H @@ -40,11 +40,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "Poiseuille Flow"; } diff --git a/Exec/RegTests/PoiseuilleFlow/prob.cpp b/Exec/RegTests/PoiseuilleFlow/prob.cpp index 3defea69d..adfe1d958 100644 --- a/Exec/RegTests/PoiseuilleFlow/prob.cpp +++ b/Exec/RegTests/PoiseuilleFlow/prob.cpp @@ -89,28 +89,3 @@ Problem::init_custom_pert( z_vel(i, j, k) = 0.0; }); } - -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,0) = 0.; - }); - } -} diff --git a/Exec/RegTests/ScalarAdvDiff/prob.H b/Exec/RegTests/ScalarAdvDiff/prob.H index 5adca8818..00cbd5f83 100644 --- a/Exec/RegTests/ScalarAdvDiff/prob.H +++ b/Exec/RegTests/ScalarAdvDiff/prob.H @@ -52,11 +52,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - void erf_init_rayleigh ( amrex::Vector& tau, amrex::Vector& ubar, diff --git a/Exec/RegTests/ScalarAdvDiff/prob.cpp b/Exec/RegTests/ScalarAdvDiff/prob.cpp index f9e931dfc..f161da47a 100644 --- a/Exec/RegTests/ScalarAdvDiff/prob.cpp +++ b/Exec/RegTests/ScalarAdvDiff/prob.cpp @@ -162,29 +162,6 @@ Problem::init_custom_pert( }); } -void -Problem::init_custom_terrain( - const Geometry& geom, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - auto dx = geom.CellSizeArray(); - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - const Box& gbx = mfi.growntilebox(1); - Array4 z_arr = z_phys_nd.array(mfi); - ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) { - - Real z = k * dx[2]; - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k) = z; - }); - } - z_phys_nd.FillBoundary(geom.periodicity()); -} - #if 0 AMREX_GPU_DEVICE Real diff --git a/Exec/RegTests/ScalarAdvDiff/prob.cpp.convergence b/Exec/RegTests/ScalarAdvDiff/prob.cpp.convergence index ecc88cf4c..18ee86f46 100644 --- a/Exec/RegTests/ScalarAdvDiff/prob.cpp.convergence +++ b/Exec/RegTests/ScalarAdvDiff/prob.cpp.convergence @@ -162,27 +162,6 @@ init_custom_prob( }); } -void -init_custom_terrain(const Geometry& geom, MultiFab& z_phys_nd, - const Real& /*time*/) -{ - auto dx = geom.CellSizeArray(); - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - const Box& gbx = mfi.growntilebox(1); - Array4 z_arr = z_phys_nd.array(mfi); - ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) { - - Real z = k * dx[2]; - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k) = z; - }); - } - z_phys_nd.FillBoundary(geom.periodicity()); -} - void amrex_probinit( const amrex_real* /*problo*/, diff --git a/Exec/RegTests/StokesSecondProblem/prob.cpp b/Exec/RegTests/StokesSecondProblem/prob.cpp index cf141fa62..71fff7879 100644 --- a/Exec/RegTests/StokesSecondProblem/prob.cpp +++ b/Exec/RegTests/StokesSecondProblem/prob.cpp @@ -81,40 +81,6 @@ Problem::init_custom_pert( } -void -Problem::init_custom_terrain( - const Geometry& geom, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - - // Domain valid box (z_nd is nodal) - const amrex::Box& domain = geom.Domain(); - // int domlo_y = domain.smallEnd(1); int domhi_y = domain.bigEnd(1) + 1; - int domlo_z = domain.smallEnd(2); - - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Populate bottom plane - int k0 = domlo_z; - - for ( amrex::MFIter mfi(z_phys_nd,amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - amrex::Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - z_arr(i,j,k0) = 0.0; - - }); - } -} - Real Problem::compute_terrain_velocity(const Real time) { diff --git a/Exec/RegTests/TaylorGreenVortex/prob.H b/Exec/RegTests/TaylorGreenVortex/prob.H index 0635cacbb..65445a3bf 100644 --- a/Exec/RegTests/TaylorGreenVortex/prob.H +++ b/Exec/RegTests/TaylorGreenVortex/prob.H @@ -39,11 +39,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - protected: std::string name() override { return "Taylor-Green Vortex"; } diff --git a/Exec/RegTests/TaylorGreenVortex/prob.cpp b/Exec/RegTests/TaylorGreenVortex/prob.cpp index f90eee76c..68fe0ca8b 100644 --- a/Exec/RegTests/TaylorGreenVortex/prob.cpp +++ b/Exec/RegTests/TaylorGreenVortex/prob.cpp @@ -101,28 +101,3 @@ Problem::init_custom_pert( z_vel(i, j, k) = 0.0; }); } - -void -Problem::init_custom_terrain ( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,0) = 0.0; - }); - } -} diff --git a/Exec/SquallLine_2D/prob.H b/Exec/SquallLine_2D/prob.H index 28b637c59..4035fcfea 100644 --- a/Exec/SquallLine_2D/prob.H +++ b/Exec/SquallLine_2D/prob.H @@ -61,11 +61,6 @@ public: std::unique_ptr& z_phys_nd, amrex::Geometry const& geom) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - void erf_init_rayleigh ( amrex::Vector& tau, amrex::Vector& ubar, diff --git a/Exec/SquallLine_2D/prob.cpp b/Exec/SquallLine_2D/prob.cpp index a8c07a79f..469a24477 100644 --- a/Exec/SquallLine_2D/prob.cpp +++ b/Exec/SquallLine_2D/prob.cpp @@ -401,33 +401,6 @@ Problem::init_custom_pert ( amrex::Gpu::streamSynchronize(); } -void -Problem::init_custom_terrain (const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Bottom of domain - int k0 = 0; - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k0) = 0.0; - }); - } -} - void Problem::erf_init_rayleigh (amrex::Vector& tau, amrex::Vector& ubar, diff --git a/Exec/SuperCell/prob.H b/Exec/SuperCell/prob.H index 77933842f..04025026f 100644 --- a/Exec/SuperCell/prob.H +++ b/Exec/SuperCell/prob.H @@ -46,11 +46,6 @@ public: amrex::Array4 const& mf_v, const SolverChoice& sc) override; - void init_custom_terrain ( - const amrex::Geometry& geom, - amrex::MultiFab& z_phys_nd, - const amrex::Real& time) override; - void erf_init_rayleigh ( amrex::Vector& tau, amrex::Vector& ubar, diff --git a/Exec/SuperCell/prob.cpp b/Exec/SuperCell/prob.cpp index a16792591..ccd1d6242 100644 --- a/Exec/SuperCell/prob.cpp +++ b/Exec/SuperCell/prob.cpp @@ -212,34 +212,6 @@ Problem::init_custom_pert( amrex::Gpu::streamSynchronize(); } -void -Problem::init_custom_terrain( - const Geometry& /*geom*/, - MultiFab& z_phys_nd, - const Real& /*time*/) -{ - // Number of ghost cells - int ngrow = z_phys_nd.nGrow(); - - // Bottom of domain - int k0 = 0; - - for ( MFIter mfi(z_phys_nd, TilingIfNotGPU()); mfi.isValid(); ++mfi ) - { - // Grown box with no z range - amrex::Box xybx = mfi.growntilebox(ngrow); - xybx.setRange(2,0); - - Array4 const& z_arr = z_phys_nd.array(mfi); - - ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { - - // Flat terrain with z = 0 at k = 0 - z_arr(i,j,k0) = 0.0; - }); - } -} - void Problem::erf_init_rayleigh( amrex::Vector& tau, diff --git a/Source/Advection/AdvectionSrcForMom_T.H b/Source/Advection/AdvectionSrcForMom_T.H index 4cffdb653..646b49feb 100644 --- a/Source/Advection/AdvectionSrcForMom_T.H +++ b/Source/Advection/AdvectionSrcForMom_T.H @@ -47,7 +47,7 @@ AdvectionSrcForXMom_T (int i, int j, int k, // **************************************************************************************** rho_u_avg_hi = 0.5 * (rho_u(i+1, j, k) * mf_u_inv(i+1,j ,0) + rho_u(i, j, k) * mf_u_inv(i ,j ,0)); - interp_u_h.InterpolateInX(i,j,k+1,0,interp_hi,rho_u_avg_hi); + interp_u_h.InterpolateInX(i+1,j,k,0,interp_hi,rho_u_avg_hi); rho_u_avg_lo = 0.5 * (rho_u(i-1, j, k) * mf_u_inv(i-1,j ,0) + rho_u(i, j, k) * mf_u_inv(i ,j ,0)); interp_u_h.InterpolateInX(i,j,k,0,interp_lo,rho_u_avg_lo); diff --git a/Source/DataStructs/DataStruct.H b/Source/DataStructs/DataStruct.H index 08df800fb..b1a172518 100644 --- a/Source/DataStructs/DataStruct.H +++ b/Source/DataStructs/DataStruct.H @@ -60,6 +60,10 @@ struct SolverChoice { use_terrain = true; } pp.query("zsurface", zsurf); + if (zsurf != 0.0) { + amrex::Print() << "Nominal zsurface height != 0, may result in unexpected behavior" + << std::endl; + } pp.get("initial_dz", dz0); } diff --git a/Source/ERF.H b/Source/ERF.H index c7dcb83fa..8c3779580 100644 --- a/Source/ERF.H +++ b/Source/ERF.H @@ -556,7 +556,7 @@ private: amrex::Vector> SFS_diss_lev; // Terrain / grid stretching - amrex::Vector zlevels_stag; + amrex::Vector zlevels_stag; // nominal height levels amrex::Vector> z_phys_nd; amrex::Vector> z_phys_cc; amrex::Vector> detJ_cc; diff --git a/Source/ERF.cpp b/Source/ERF.cpp index b0a8c4ddf..699af21e1 100644 --- a/Source/ERF.cpp +++ b/Source/ERF.cpp @@ -119,9 +119,7 @@ ERF::ERF () const std::string& pv1 = "plot_vars_1"; setPlotVariables(pv1,plot_var_names_1); const std::string& pv2 = "plot_vars_2"; setPlotVariables(pv2,plot_var_names_2); - prob = amrex_probinit(geom[0].ProbLo(),geom[0].ProbHi()); - - // Geometry on all levels has been defined already. + // Initialize staggered vertical levels for grid stretching or terrain. if (solverChoice.use_terrain) { init_zlevels(zlevels_stag, @@ -129,8 +127,26 @@ ERF::ERF () solverChoice.grid_stretching_ratio, solverChoice.zsurf, solverChoice.dz0); + + int nz = geom[0].Domain().length(2) + 1; // staggered + if (zlevels_stag[nz-1] != geom[0].ProbHi(2)) { + amrex::Print() << "WARNING: prob_hi[2]=" << geom[0].ProbHi(2) + << " does not match highest requested z level " << zlevels_stag[nz-1] + << std::endl; + } + if (zlevels_stag[0] != geom[0].ProbLo(2)) { + amrex::Print() << "WARNING: prob_lo[2]=" << geom[0].ProbLo(2) + << " does not match lowest requested level " << zlevels_stag[0] + << std::endl; + } + + // Redefine the problem domain here? } + prob = amrex_probinit(geom[0].ProbLo(),geom[0].ProbHi()); + + // Geometry on all levels has been defined already. + // No valid BoxArray and DistributionMapping have been defined. // But the arrays for them have been resized. @@ -471,8 +487,14 @@ ERF::InitData () } #endif - if ( (init_type == "ideal" || init_type == "input_sounding") && solverChoice.use_terrain) { - amrex::Abort("We do not currently support init_type = ideal or input_sounding with terrain"); + if (solverChoice.use_terrain) { + if (init_type == "ideal") { + amrex::Abort("We do not currently support init_type = ideal with terrain"); + } else if (init_type == "input_sounding") { + amrex::Print() << "Note: use_terrain==true with input_sounding" + << " -- the expected use case is to enable grid stretching" + << std::endl; + } } // If using the Deardoff LES model, diff --git a/Source/Initialization/ERF_init1d.cpp b/Source/Initialization/ERF_init1d.cpp index 35d343cb6..f3bdd2cec 100644 --- a/Source/Initialization/ERF_init1d.cpp +++ b/Source/Initialization/ERF_init1d.cpp @@ -74,7 +74,7 @@ ERF::setRayleighRefFromSounding (bool restarting) // so we need to read it here // TODO: should we store this information in the checkpoint file instead? if (restarting) { - input_sounding_data.read_from_file(input_sounding_file, geom[0]); + input_sounding_data.read_from_file(input_sounding_file, geom[0], zlevels_stag); } const Real* z_inp_sound = input_sounding_data.z_inp_sound.dataPtr(); diff --git a/Source/Initialization/ERF_init_custom.cpp b/Source/Initialization/ERF_init_custom.cpp index 8758a164e..cef8c75ce 100644 --- a/Source/Initialization/ERF_init_custom.cpp +++ b/Source/Initialization/ERF_init_custom.cpp @@ -1,3 +1,4 @@ + /** * \file ERF_init_custom.cpp */ diff --git a/Source/Initialization/ERF_init_from_input_sounding.cpp b/Source/Initialization/ERF_init_from_input_sounding.cpp index 987415d51..8d68bb073 100644 --- a/Source/Initialization/ERF_init_from_input_sounding.cpp +++ b/Source/Initialization/ERF_init_from_input_sounding.cpp @@ -14,6 +14,7 @@ void init_bx_scalars_from_input_sounding (const amrex::Box &bx, amrex::Array4 const &state, amrex::GeometryData const &geomdata, + amrex::Array4 const &z_cc_arr, const bool& l_moist, InputSoundingData const &inputSoundingData); void @@ -23,6 +24,7 @@ init_bx_scalars_from_input_sounding_hse (const amrex::Box &bx, amrex::Array4 const &p_hse_arr, amrex::Array4 const &pi_hse_arr, amrex::GeometryData const &geomdata, + amrex::Array4 const &z_cc_arr, const amrex::Real& l_gravity, const amrex::Real& l_rdOcp, const bool& l_moist, @@ -34,6 +36,7 @@ init_bx_velocities_from_input_sounding (const amrex::Box &bx, amrex::Array4 const &y_vel, amrex::Array4 const &z_vel, amrex::GeometryData const &geomdata, + amrex::Array4 const &z_nd_arr, InputSoundingData const &inputSoundingData); /** @@ -50,8 +53,12 @@ ERF::init_from_input_sounding (int lev) if (input_sounding_file.empty()) amrex::Error("input_sounding file name must be provided via input"); - input_sounding_data.read_from_file(input_sounding_file, geom[lev]); + // this will interpolate the input profiles to the nominal height levels + // (ranging from 0 to the domain top) + input_sounding_data.read_from_file(input_sounding_file, geom[lev], zlevels_stag); + // this will calculate the hydrostatically balanced density and pressure + // profiles following WRF ideal.exe if (init_sounding_ideal) input_sounding_data.calc_rho_p(); } @@ -79,25 +86,32 @@ ERF::init_from_input_sounding (int lev) Array4 p_hse_arr = p_hse.array(mfi); Array4 pi_hse_arr = pi_hse.array(mfi); + Array4 z_cc_arr = (solverChoice.use_terrain) ? z_phys_cc[lev]->const_array(mfi) : Array4{}; + Array4 z_nd_arr = (solverChoice.use_terrain) ? z_phys_nd[lev]->const_array(mfi) : Array4{}; + if (init_sounding_ideal) { - // HSE will be calculated here, following WRF ideal.exe + // HSE will be initialized here, interpolated from values previously + // calculated by calc_rho_p() init_bx_scalars_from_input_sounding_hse( bx, cons_arr, r_hse_arr, p_hse_arr, pi_hse_arr, - geom[lev].data(), l_gravity, l_rdOcp, l_moist, input_sounding_data); + geom[lev].data(), z_cc_arr, + l_gravity, l_rdOcp, l_moist, input_sounding_data); } else { // HSE will be calculated later with call to initHSE init_bx_scalars_from_input_sounding( bx, cons_arr, - geom[lev].data(), l_moist, input_sounding_data); + geom[lev].data(), z_cc_arr, + l_moist, input_sounding_data); } init_bx_velocities_from_input_sounding( bx, xvel_arr, yvel_arr, zvel_arr, - geom[lev].data(), input_sounding_data); + geom[lev].data(), z_nd_arr, + input_sounding_data); } //mfi } @@ -115,6 +129,7 @@ void init_bx_scalars_from_input_sounding (const amrex::Box &bx, amrex::Array4 const &state, amrex::GeometryData const &geomdata, + amrex::Array4 const &z_cc_arr, const bool& l_moist, InputSoundingData const &inputSoundingData) { @@ -123,15 +138,17 @@ init_bx_scalars_from_input_sounding (const amrex::Box &bx, const Real* qv_inp_sound = inputSoundingData.qv_inp_sound_d.dataPtr(); const int inp_sound_size = inputSoundingData.size(); + // Geometry + const amrex::Real* prob_lo = geomdata.ProbLo(); + const amrex::Real* dx = geomdata.CellSize(); + // We want to set the lateral BC values, too Box gbx = bx; // Copy constructor gbx.grow(0,1); gbx.grow(1,1); // Grow by one in the lateral directions amrex::ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { - // Geometry - const amrex::Real* prob_lo = geomdata.ProbLo(); - const amrex::Real* dx = geomdata.CellSize(); - const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2]; + const amrex::Real z = (z_cc_arr) ? z_cc_arr(i,j,k) + : prob_lo[2] + (k + 0.5) * dx[2]; amrex::Real rho_0 = 1.0; @@ -172,6 +189,7 @@ init_bx_scalars_from_input_sounding_hse (const amrex::Box &bx, amrex::Array4 const &p_hse_arr, amrex::Array4 const &pi_hse_arr, amrex::GeometryData const &geomdata, + amrex::Array4 const &z_cc_arr, const amrex::Real& l_gravity, const amrex::Real& l_rdOcp, const bool& l_moist, @@ -183,16 +201,18 @@ init_bx_scalars_from_input_sounding_hse (const amrex::Box &bx, const Real* qv_inp_sound = inputSoundingData.qv_inp_sound_d.dataPtr(); const int inp_sound_size = inputSoundingData.size(); + // Geometry + int ktop = bx.bigEnd(2); + const amrex::Real* prob_lo = geomdata.ProbLo(); + const amrex::Real* dx = geomdata.CellSize(); + // We want to set the lateral BC values, too Box gbx = bx; // Copy constructor gbx.grow(0,1); gbx.grow(1,1); // Grow by one in the lateral directions amrex::ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { - // Geometry - const amrex::Real* prob_lo = geomdata.ProbLo(); - const amrex::Real* dx = geomdata.CellSize(); - const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2]; - int ktop = bx.bigEnd(2); + const amrex::Real z = (z_cc_arr) ? z_cc_arr(i,j,k) + : prob_lo[2] + (k + 0.5) * dx[2]; Real rho_k, rhoTh_k; @@ -253,6 +273,7 @@ init_bx_velocities_from_input_sounding (const amrex::Box &bx, amrex::Array4 const &y_vel, amrex::Array4 const &z_vel, amrex::GeometryData const &geomdata, + amrex::Array4 const &z_nd_arr, InputSoundingData const &inputSoundingData) { const Real* z_inp_sound = inputSoundingData.z_inp_sound_d.dataPtr(); @@ -260,6 +281,10 @@ init_bx_velocities_from_input_sounding (const amrex::Box &bx, const Real* V_inp_sound = inputSoundingData.V_inp_sound_d.dataPtr(); const int inp_sound_size = inputSoundingData.size(); + // Geometry + const amrex::Real* prob_lo = geomdata.ProbLo(); + const amrex::Real* dx = geomdata.CellSize(); + // We want to set the lateral BC values, too Box gbx = bx; // Copy constructor gbx.grow(0,1); gbx.grow(1,1); // Grow by one in the lateral directions @@ -275,18 +300,22 @@ init_bx_velocities_from_input_sounding (const amrex::Box &bx, amrex::ParallelFor(xbx, ybx, zbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { // Note that this is called on a box of x-faces - const amrex::Real* prob_lo = geomdata.ProbLo(); - const amrex::Real* dx = geomdata.CellSize(); - const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2]; + const amrex::Real z = (z_nd_arr) ? 0.25*( z_nd_arr(i,j ,k ) + + z_nd_arr(i,j+1,k ) + + z_nd_arr(i,j ,k+1) + + z_nd_arr(i,j+1,k+1)) + : prob_lo[2] + (k + 0.5) * dx[2]; // Set the x-velocity x_vel(i, j, k) = interpolate_1d(z_inp_sound, U_inp_sound, z, inp_sound_size); }, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { // Note that this is called on a box of y-faces - const amrex::Real* prob_lo = geomdata.ProbLo(); - const amrex::Real* dx = geomdata.CellSize(); - const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2]; + const amrex::Real z = (z_nd_arr) ? 0.25*( z_nd_arr(i ,j,k ) + + z_nd_arr(i+1,j,k ) + + z_nd_arr(i ,j,k+1) + + z_nd_arr(i+1,j,k+1)) + : prob_lo[2] + (k + 0.5) * dx[2]; // Set the y-velocity y_vel(i, j, k) = interpolate_1d(z_inp_sound, V_inp_sound, z, inp_sound_size); diff --git a/Source/Initialization/InputSoundingData.H b/Source/Initialization/InputSoundingData.H index 1f18033da..a15071a6f 100644 --- a/Source/Initialization/InputSoundingData.H +++ b/Source/Initialization/InputSoundingData.H @@ -22,13 +22,17 @@ public: InputSoundingData () {} void read_from_file (const std::string input_sounding_file, - amrex::Geometry const &geom) + const amrex::Geometry &geom, + const amrex::Vector& zlevels_stag) { - const amrex::Real zbot = geom.ProbLo(AMREX_SPACEDIM-1); - AMREX_ALWAYS_ASSERT(zbot == 0); - const amrex::Real ztop = geom.ProbHi(AMREX_SPACEDIM-1); - const amrex::Real dz = geom.CellSize(AMREX_SPACEDIM-1); + const int klo = 0; + const int khi = geom.Domain().bigEnd()[AMREX_SPACEDIM-1]; const int Nz = geom.Domain().size()[AMREX_SPACEDIM-1]; + const amrex::Real dz = geom.CellSize()[AMREX_SPACEDIM-1]; + + const bool use_terrain = (zlevels_stag.size() > 0); + const amrex::Real zbot = (use_terrain) ? zlevels_stag[klo] : geom.ProbLo(AMREX_SPACEDIM-1); + const amrex::Real ztop = (use_terrain) ? zlevels_stag[khi+1] : geom.ProbHi(AMREX_SPACEDIM-1); z_inp_sound.resize(Nz+2); theta_inp_sound.resize(Nz+2); @@ -36,12 +40,6 @@ public: U_inp_sound.resize(Nz+2); V_inp_sound.resize(Nz+2); - pm_integ.resize(Nz+2); - rhom_integ.resize(Nz+2); - - pd_integ.resize(Nz+2); - rhod_integ.resize(Nz+2); - // Read the input_sounding file amrex::Print() << "input_sounding file location : " << input_sounding_file << std::endl; std::ifstream input_sounding_reader(input_sounding_file); @@ -58,7 +56,7 @@ public: amrex::Vector z_inp_sound_tmp, theta_inp_sound_tmp, qv_inp_sound_tmp, U_inp_sound_tmp, V_inp_sound_tmp; - // Read the first line + // Read surface quantities from the first line std::getline(input_sounding_reader, line); std::istringstream iss(line); iss >> press_ref_inp_sound >> theta_ref_inp_sound >> qv_ref_inp_sound; @@ -66,7 +64,7 @@ public: qv_ref_inp_sound *= 0.001; // convert from g/kg to kg/kg // Add surface - z_inp_sound_tmp.push_back(0); // height AGL + z_inp_sound_tmp.push_back(zbot); // height above sea level [m] theta_inp_sound_tmp.push_back(theta_ref_inp_sound); qv_inp_sound_tmp.push_back(qv_ref_inp_sound); U_inp_sound_tmp.push_back(0); @@ -77,23 +75,23 @@ public: while(std::getline(input_sounding_reader, line)) { std::istringstream iss_z(line); iss_z >> z >> theta >> qv >> U >> V; - if (z == 0) { + if (z == zbot) { AMREX_ALWAYS_ASSERT(theta == theta_inp_sound_tmp[0]); - AMREX_ALWAYS_ASSERT(qv*0.001 == qv_inp_sound_tmp[0]); + AMREX_ALWAYS_ASSERT(qv*0.001 == qv_inp_sound_tmp[0]); // convert from g/kg to kg/kg U_inp_sound_tmp[0] = U; V_inp_sound_tmp[0] = V; } else { - AMREX_ALWAYS_ASSERT(z > z_inp_sound[z_inp_sound_tmp.size()-1]); // sounding is increasing in height + AMREX_ALWAYS_ASSERT(z > z_inp_sound_tmp[z_inp_sound_tmp.size()-1]); // sounding is increasing in height z_inp_sound_tmp.push_back(z); theta_inp_sound_tmp.push_back(theta); - qv_inp_sound_tmp.push_back(qv*0.001); + qv_inp_sound_tmp.push_back(qv*0.001); // convert from g/kg to kg/kg U_inp_sound_tmp.push_back(U); V_inp_sound_tmp.push_back(V); if (z >= ztop) break; } } - // At this point, we have an input_sounding from z=0 AGL up to + // At this point, we have an input_sounding from zbot up to // z_inp_sound_tmp[N-1] >= ztop. Now, interpolate to grid level 0 heights const int Ninp = z_inp_sound_tmp.size(); z_inp_sound[0] = zbot; @@ -102,7 +100,8 @@ public: U_inp_sound[0] = U_inp_sound_tmp[0]; V_inp_sound[0] = V_inp_sound_tmp[0]; for (int k=0; k < Nz; ++k) { - z_inp_sound[k+1] = zbot + (k + 0.5) * dz; + z_inp_sound[k+1] = (use_terrain) ? 0.5 * (zlevels_stag[k] + zlevels_stag[k+1]) + : zbot + (k + 0.5) * dz; theta_inp_sound[k+1] = interpolate_1d(z_inp_sound_tmp.dataPtr(), theta_inp_sound_tmp.dataPtr(), z_inp_sound[k+1], Ninp); qv_inp_sound[k+1] = interpolate_1d(z_inp_sound_tmp.dataPtr(), qv_inp_sound_tmp.dataPtr(), z_inp_sound[k+1], Ninp); U_inp_sound[k+1] = interpolate_1d(z_inp_sound_tmp.dataPtr(), U_inp_sound_tmp.dataPtr(), z_inp_sound[k+1], Ninp); @@ -235,11 +234,12 @@ public: void host_to_device () { - z_inp_sound_d.resize(size()); - theta_inp_sound_d.resize(size()); - qv_inp_sound_d.resize(size()); - U_inp_sound_d.resize(size()); - V_inp_sound_d.resize(size()); + const int Ninp = size(); + z_inp_sound_d.resize(Ninp); + theta_inp_sound_d.resize(Ninp); + qv_inp_sound_d.resize(Ninp); + U_inp_sound_d.resize(Ninp); + V_inp_sound_d.resize(Ninp); amrex::Gpu::copy(amrex::Gpu::hostToDevice, z_inp_sound.begin(), z_inp_sound.end(), diff --git a/Source/Utils/TerrainMetrics.cpp b/Source/Utils/TerrainMetrics.cpp index 175ccd2c3..e64d0d902 100644 --- a/Source/Utils/TerrainMetrics.cpp +++ b/Source/Utils/TerrainMetrics.cpp @@ -55,6 +55,11 @@ init_zlevels (amrex::Vector& zlevels_stag, } pp.queryarr("terrain_z_levels", zlevels_stag, 0, nz); + + // These levels should range from 0 at the surface to the height of the + // top of model domain (see the coordinate surface height, zeta, in + // Klemp 2011) + AMREX_ALWAYS_ASSERT(zlevels_stag[0] == 0); } } @@ -69,14 +74,14 @@ init_zlevels (amrex::Vector& zlevels_stag, void init_terrain_grid (const Geometry& geom, MultiFab& z_phys_nd, amrex::Vector const& z_levels_h) { - auto ProbHiArr = geom.ProbHiArray(); - // z_nd is nodal in all directions const amrex::Box& domain = geom.Domain(); int domlo_x = domain.smallEnd(0); int domhi_x = domain.bigEnd(0) + 1; int domlo_y = domain.smallEnd(1); int domhi_y = domain.bigEnd(1) + 1; int domlo_z = domain.smallEnd(2); int domhi_z = domain.bigEnd(2) + 1; - int nz = domain.length(2)+1; + int nz = domain.length(2)+1; // staggered + + Real ztop = z_levels_h[nz-1]; // User-selected method from inputs file (BTF default) ParmParse pp("erf"); @@ -104,7 +109,6 @@ init_terrain_grid (const Geometry& geom, MultiFab& z_phys_nd, amrex::Vector const& z_arr = z_phys_nd.array(mfi); + + ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) { + z_arr(i,j,k0) = 0.0; + }); + } } #ifdef ERF_USE_TERRAIN_VELOCITY diff --git a/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00000 b/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00000 index bc401bcdb..af499fdf7 100644 Binary files a/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00000 and b/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00000 differ diff --git a/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00001 b/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00001 index 696e5683f..0798b731b 100644 Binary files a/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00001 and b/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00001 differ diff --git a/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00002 b/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00002 index 45ec04223..41e8c9f85 100644 Binary files a/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00002 and b/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00002 differ diff --git a/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00003 b/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00003 index dfbfab81a..0a937a898 100644 Binary files a/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00003 and b/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_D_00003 differ diff --git a/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_H b/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_H index 69571cc4e..2f8f91511 100644 --- a/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_H +++ b/Tests/ERFGoldFiles/DensityCurrent_detJ2/Level_0/Cell_H @@ -15,14 +15,14 @@ FabOnDisk: Cell_D_00002 0 FabOnDisk: Cell_D_00003 0 4,8 -6.5098892847218914e-01,-2.0418926515225824e-03,0.0000000000000000e+00,-4.4803209745306613e-04,2.9999999984644012e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890017208032e+04, -6.4836907458556325e-01,-7.9258838839494761e-01,0.0000000000000000e+00,-2.1903664253692794e+00,2.8340212480781491e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4213573804382642e+04, -6.4836906407121120e-01,-9.5479317525800111e-01,0.0000000000000000e+00,-2.1903967155614268e+00,2.8340212487840739e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4213572800590300e+04, -6.5098892847219136e-01,-1.5669123878100885e-03,0.0000000000000000e+00,-4.4803547740064219e-04,2.9999999984644018e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890017208250e+04, +6.5098892847219159e-01,-2.0420913278615164e-03,0.0000000000000000e+00,-4.4806219893768506e-04,2.9999999984644018e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890017208279e+04, +6.4836911721903068e-01,-7.9261130506084754e-01,0.0000000000000000e+00,-2.1904634438320700e+00,2.8340212490314917e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4213577874547751e+04, +6.4836911721903068e-01,-9.5510070445028528e-01,0.0000000000000000e+00,-2.1904634438320700e+00,2.8340212490314917e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4213577874547751e+04, +6.5098892847219159e-01,-1.5668252573248582e-03,0.0000000000000000e+00,-4.4806219893768506e-04,2.9999999984644018e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890017208279e+04, 4,8 -1.1567295137467872e+00,1.5669984802413296e-03,0.0000000000000000e+00,7.4403622420572127e-04,3.0000000000000011e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432636567798909e+04, -1.1615308307187033e+00,9.5549509395764787e-01,0.0000000000000000e+00,3.2272405549403782e-01,3.0002669773989163e+02,9.9432624223818915e+04,1.1567294111744995e+00,1.0001092650537843e+05, -1.1615308687908172e+00,7.9264748064728541e-01,0.0000000000000000e+00,3.2304752435288608e-01,3.0002669810993694e+02,9.9432624223818915e+04,1.1567294111744995e+00,1.0001093109473436e+05, -1.1567295137456999e+00,2.0419460383189346e-03,0.0000000000000000e+00,7.4404942549219323e-04,3.0000000000000006e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432636567668014e+04, +1.1567295137476770e+00,1.5668252573248582e-03,0.0000000000000000e+00,7.4404952666944622e-04,3.0000000000000006e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432636567905967e+04, +1.1615311171044378e+00,9.5510070445028528e-01,0.0000000000000000e+00,3.2285807511693310e-01,3.0002669784901968e+02,9.9432624223818915e+04,1.1567294111744995e+00,1.0001096102739424e+05, +1.1615311171044378e+00,7.9261130506084754e-01,0.0000000000000000e+00,3.2285807511693310e-01,3.0002669784901968e+02,9.9432624223818915e+04,1.1567294111744995e+00,1.0001096102739424e+05, +1.1567295137476770e+00,2.0420913278615164e-03,0.0000000000000000e+00,7.4404952666944622e-04,3.0000000000000006e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432636567905967e+04, diff --git a/Tests/ERFGoldFiles/DensityCurrent_detJ2/job_info b/Tests/ERFGoldFiles/DensityCurrent_detJ2/job_info index 44f163761..5e84e0d8e 100644 --- a/Tests/ERFGoldFiles/DensityCurrent_detJ2/job_info +++ b/Tests/ERFGoldFiles/DensityCurrent_detJ2/job_info @@ -1,33 +1,33 @@ =============================================================================== ERF Job Information =============================================================================== -inputs file: /home/almgren/GitCode/ERF/build/Tests/test_files/DensityCurrent_detJ2/DensityCurrent_detJ2.i +inputs file: DensityCurrent_detJ2.i number of MPI processes: 4 -CPU time used since start of simulation (CPU-hours): 0.00168156 +CPU time used since start of simulation (CPU-hours): 0.0179131 =============================================================================== Plotfile Information =============================================================================== -output data / time: Wed Jan 3 15:08:04 2024 -output dir: /home/almgren/GitCode/ERF/build/Tests/test_files/DensityCurrent_detJ2 +output data / time: Fri Jan 5 14:44:52 2024 +output dir: /Users/equon/ERF/Tests/test_files/DensityCurrent_detJ2 =============================================================================== Build Information =============================================================================== -build date: Jan 3 2024 15:07:47 -build machine: Linux manda 5.15.0-76-generic #83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023 x86_64 -build dir: /home/almgren/GitCode/ERF/build/Exec -AMReX dir: /home/almgren/GitCode/ERF/Submodules/AMReX +build date: Jan 5 2024 14:41:33 +build machine: macOS equon-38562s 12.7 21G816 arm64 +build dir: /Users/equon/ERF/MyBuild/Exec +AMReX dir: /Users/equon/ERF/Submodules/AMReX -COMP: GNU -COMP version: 9.4.0 +COMP: AppleClang +COMP version: 14.0.0.14000029 -ERF git hash: 23.12-30-ga209eb38b6a7-dirty -AMReX git hash: 23.11-23-g9b733ec45cd9 +ERF git hash: 24.01-7-gefcb2720b399 +AMReX git hash: 24.01 =============================================================================== @@ -125,7 +125,7 @@ amrex.the_comms_arena_release_threshold = 9223372036854775807 amrex.the_async_arena_release_threshold = 9223372036854775807 amrex.the_arena_is_managed = 0 amrex.abort_on_out_of_gpu_memory = 0 -fab.init_snan = 0 +fab.init_snan = 1 DistributionMapping.v = 0 DistributionMapping.verbose = 0 DistributionMapping.efficiency = 0.90000000000000002 @@ -133,7 +133,7 @@ DistributionMapping.sfc_threshold = 0 DistributionMapping.node_size = 0 DistributionMapping.verbose_mapper = 0 fab.initval = nan -fab.do_initval = 0 +fab.do_initval = 1 fabarray.maxcomp = 25 vismf.v = 0 vismf.headerversion = 1 diff --git a/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_D_00001 b/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_D_00001 index 2577250e2..ed8b1507c 100644 Binary files a/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_D_00001 and b/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_D_00001 differ diff --git a/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_D_00002 b/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_D_00002 index 06ab80546..989082a97 100644 Binary files a/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_D_00002 and b/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_D_00002 differ diff --git a/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_H b/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_H index a5ac69281..f30e467f8 100644 --- a/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_H +++ b/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/Level_0/Cell_H @@ -16,13 +16,13 @@ FabOnDisk: Cell_D_00003 0 4,8 6.5098892858777990e-01,0.0000000000000000e+00,0.0000000000000000e+00,-1.3134182279350954e-13,2.9999999984644023e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890028261150e+04, -6.5098892858777846e-01,-2.3169203241291729e-02,0.0000000000000000e+00,-9.9658998253817288e-01,2.8339385800838681e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890028261041e+04, -6.5098892858777846e-01,-2.4648468227071507e-02,0.0000000000000000e+00,-9.9658998264230148e-01,2.8339385800838687e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890028261041e+04, +6.5098892858777846e-01,-2.3169226952403955e-02,0.0000000000000000e+00,-9.9658998271395927e-01,2.8339385800838687e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890028261041e+04, +6.5098892858777846e-01,-2.4648489613919831e-02,0.0000000000000000e+00,-9.9658998271395927e-01,2.8339385800838687e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890028261041e+04, 6.5098892858777990e-01,0.0000000000000000e+00,0.0000000000000000e+00,-1.3134182279350954e-13,2.9999999984644023e+02,4.4463890028261158e+04,6.5098892858777935e-01,4.4463890028261150e+04, 4,8 1.1567294111744995e+00,0.0000000000000000e+00,0.0000000000000000e+00,7.2733797713804275e-14,2.9999999999999989e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432624223818872e+04, -1.1567294132055008e+00,2.4648505713396766e-02,0.0000000000000000e+00,2.2906221594774004e-03,3.0002606237193504e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432624468238093e+04, -1.1567294132055008e+00,2.3169260262944212e-02,0.0000000000000000e+00,2.2906261786096033e-03,3.0002606237194084e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432624468238093e+04, +1.1567294132055008e+00,2.4648489613919831e-02,0.0000000000000000e+00,2.2906230397594677e-03,3.0002606237193800e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432624468238093e+04, +1.1567294132055008e+00,2.3169226952403955e-02,0.0000000000000000e+00,2.2906230397594677e-03,3.0002606237193800e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432624468238093e+04, 1.1567294111744995e+00,0.0000000000000000e+00,0.0000000000000000e+00,7.2733797713804275e-14,2.9999999999999989e+02,9.9432624223818915e+04,1.1567294111744995e+00,9.9432624223818872e+04, diff --git a/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/job_info b/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/job_info index 8b92c2c68..4e0a4a72f 100644 --- a/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/job_info +++ b/Tests/ERFGoldFiles/DensityCurrent_detJ2_nosub/job_info @@ -1,33 +1,33 @@ =============================================================================== ERF Job Information =============================================================================== -inputs file: /home/almgren/GitCode/ERF/build/Tests/test_files/DensityCurrent_detJ2_nosub/DensityCurrent_detJ2_nosub.i +inputs file: DensityCurrent_detJ2_nosub.i number of MPI processes: 4 -CPU time used since start of simulation (CPU-hours): 0.00218016 +CPU time used since start of simulation (CPU-hours): 0.0218262 =============================================================================== Plotfile Information =============================================================================== -output data / time: Wed Jan 3 15:08:06 2024 -output dir: /home/almgren/GitCode/ERF/build/Tests/test_files/DensityCurrent_detJ2_nosub +output data / time: Fri Jan 5 14:46:24 2024 +output dir: /Users/equon/ERF/Tests/test_files/DensityCurrent_detJ2_nosub =============================================================================== Build Information =============================================================================== -build date: Jan 3 2024 15:07:47 -build machine: Linux manda 5.15.0-76-generic #83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023 x86_64 -build dir: /home/almgren/GitCode/ERF/build/Exec -AMReX dir: /home/almgren/GitCode/ERF/Submodules/AMReX +build date: Jan 5 2024 14:41:33 +build machine: macOS equon-38562s 12.7 21G816 arm64 +build dir: /Users/equon/ERF/MyBuild/Exec +AMReX dir: /Users/equon/ERF/Submodules/AMReX -COMP: GNU -COMP version: 9.4.0 +COMP: AppleClang +COMP version: 14.0.0.14000029 -ERF git hash: 23.12-30-ga209eb38b6a7-dirty -AMReX git hash: 23.11-23-g9b733ec45cd9 +ERF git hash: 24.01-7-gefcb2720b399 +AMReX git hash: 24.01 =============================================================================== @@ -124,7 +124,7 @@ amrex.the_comms_arena_release_threshold = 9223372036854775807 amrex.the_async_arena_release_threshold = 9223372036854775807 amrex.the_arena_is_managed = 0 amrex.abort_on_out_of_gpu_memory = 0 -fab.init_snan = 0 +fab.init_snan = 1 DistributionMapping.v = 0 DistributionMapping.verbose = 0 DistributionMapping.efficiency = 0.90000000000000002 @@ -132,7 +132,7 @@ DistributionMapping.sfc_threshold = 0 DistributionMapping.node_size = 0 DistributionMapping.verbose_mapper = 0 fab.initval = nan -fab.do_initval = 0 +fab.do_initval = 1 fabarray.maxcomp = 25 vismf.v = 0 vismf.headerversion = 1