diff --git a/Exec/CMakeLists.txt b/Exec/CMakeLists.txt index 7e6bd77..d8a0305 100644 --- a/Exec/CMakeLists.txt +++ b/Exec/CMakeLists.txt @@ -7,3 +7,4 @@ add_subdirectory(Advection) add_subdirectory(DoublyPeriodic) add_subdirectory(Upwelling) add_subdirectory(Channel_Test) +add_subdirectory(DoubleGyre) diff --git a/Exec/DoubleGyre/CMakeLists.txt b/Exec/DoubleGyre/CMakeLists.txt new file mode 100644 index 0000000..22a40ec --- /dev/null +++ b/Exec/DoubleGyre/CMakeLists.txt @@ -0,0 +1,13 @@ +set(remora_exe_name doublegyre) + +add_executable(${remora_exe_name} "") +target_sources(${remora_exe_name} + PRIVATE + prob.H + prob.cpp +) + +target_include_directories(${remora_exe_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) + +include(${CMAKE_SOURCE_DIR}/CMake/BuildREMORAExe.cmake) +build_remora_exe(${remora_exe_name}) diff --git a/Exec/DoubleGyre/GNUmakefile b/Exec/DoubleGyre/GNUmakefile new file mode 100644 index 0000000..f12e700 --- /dev/null +++ b/Exec/DoubleGyre/GNUmakefile @@ -0,0 +1,33 @@ +# AMReX +COMP = gnu +PRECISION = DOUBLE + +# Profiling +PROFILE = FALSE +TINY_PROFILE = FALSE +COMM_PROFILE = FALSE +TRACE_PROFILE = FALSE +MEM_PROFILE = FALSE +USE_GPROF = FALSE + +# Performance +USE_MPI = TRUE +USE_OMP = TRUE +USE_CUDA = FALSE +USE_HIP = FALSE +USE_SYCL = FALSE + +# Debugging +DEBUG = FALSE + +TEST = TRUE +USE_ASSERTION = TRUE + +USE_NETCDF = FALSE + +# GNU Make +Bpack := ./Make.package +Blocs := . +REMORA_HOME := ../.. +REMORA_PROBLEM_DIR = $(REMORA_HOME)/Exec/DoubleGyre +include $(REMORA_HOME)/Exec/Make.REMORA diff --git a/Exec/DoubleGyre/Make.package b/Exec/DoubleGyre/Make.package new file mode 100644 index 0000000..aeacb72 --- /dev/null +++ b/Exec/DoubleGyre/Make.package @@ -0,0 +1,2 @@ +CEXE_headers += prob.H +CEXE_sources += prob.cpp diff --git a/Exec/DoubleGyre/inputs b/Exec/DoubleGyre/inputs new file mode 100644 index 0000000..531bcb6 --- /dev/null +++ b/Exec/DoubleGyre/inputs @@ -0,0 +1,85 @@ +# ------------------ INPUTS TO MAIN PROGRAM ------------------- +max_step = 100 #129600 + +amrex.fpe_trap_invalid = 1 + +# PROBLEM SIZE & GEOMETRY +geometry.prob_lo = 0. 0. -500. +geometry.prob_hi = 1000000. 2000000. 0. + +amr.n_cell = 54 108 4 + +#fabarray.mfiter_tile_size = 1024 1024 1024 + +geometry.is_periodic = 0 0 0 + +xlo.type = "SlipWall" +xhi.type = "SlipWall" + +ylo.type = "SlipWall" +yhi.type = "SlipWall" + +zlo.type = "SlipWall" +zhi.type = "SlipWall" + +# TIME STEP CONTROL +remora.fixed_dt = 3600.0 # Timestep size (seconds) + +remora.fixed_ndtfast_ratio = 20 + +#remora.fixed_ndtfast_ratio = 30 # Ratio of baroclinic to barotropic time step + +# DIAGNOSTICS & VERBOSITY +remora.sum_interval = 1 # timesteps between integrated/max quantities, if remora.v > 0 +remora.v = 0 # verbosity in REMORA.cpp (0: none, 1: integrated quantities, etc, 2: print boxes) +amr.v = 1 # verbosity in Amr.cpp + +# REFINEMENT / REGRIDDING +amr.max_level = 0 # maximum level number allowed + +# CHECKPOINT FILES +remora.check_file = chk # root name of checkpoint file +remora.check_int = -57600 # number of timesteps between checkpoints + +# PLOTFILES +remora.plot_file = plt # prefix of plotfile name +remora.plot_int = 100 # number of timesteps between plotfiles +remora.plot_vars = salt temp x_velocity y_velocity z_velocity +remora.plotfile_type = netcdf +remora.write_history_file=true + +# SOLVER CHOICE +remora.flat_bathymetry = false +remora.tracer_horizontal_advection_scheme = "upstream3" # upstream3 or centered4 +remora.spatial_order = 2 + +remora.Zob = 0.02 +remora.Zos = 0.02 + +remora.rdrag = 8.0e-7 + +# turbulence closure parameters +remora.Akk_bak = 5.0e-6 +remora.Akp_bak = 5.0e-6 +remora.Akv_bak = 1.0 +remora.Akt_bak = 1.0 + +remora.theta_s = 0.0 +remora.theta_b = 0.0 +remora.tcline = 1e16 + + +# Linear EOS parameters +remora.R0 = 1028.0 # background density value (Kg/m3) used in Linear Equation of State +remora.S0 = 35.0 # background salinity (nondimensional) constant +remora.T0 = 5.0 # background potential temperature (Celsius) constant +remora.Tcoef = 1.0e-4 # linear equation of state parameter (1/Celsius) +remora.Scoef = 7.6e-4 # linear equation of state parameter (nondimensional) +remora.rho0 = 1025.0 # Mean density (Kg/m3) used when Boussinesq approx is inferred + +# Coriolis params +remora.use_coriolis = true +remora.coriolis_type = beta_plane +remora.coriolis_f0 = 7.3e-5 +remora.coriolis_beta = 2.0e-11 + diff --git a/Exec/DoubleGyre/prob.H b/Exec/DoubleGyre/prob.H new file mode 100644 index 0000000..49636d7 --- /dev/null +++ b/Exec/DoubleGyre/prob.H @@ -0,0 +1,12 @@ +#ifndef _PROB_H_ +#define _PROB_H_ + +#include "AMReX_REAL.H" + +struct ProbParm { +}; // namespace ProbParm + +extern ProbParm parms; + +#endif + diff --git a/Exec/DoubleGyre/prob.cpp b/Exec/DoubleGyre/prob.cpp new file mode 100644 index 0000000..02aa8af --- /dev/null +++ b/Exec/DoubleGyre/prob.cpp @@ -0,0 +1,207 @@ +#include "prob.H" +#include "prob_common.H" + +#include "EOS.H" +#include "AMReX_ParmParse.H" +#include "AMReX_MultiFab.H" +#include "IndexDefines.H" +#include "DepthStretchTransform.H" + +using namespace amrex; + +void +amrex_probinit( + const amrex_real* /*problo*/, + const amrex_real* /*probhi*/) +{ +} + +/** + * \brief Initializes bathymetry h and surface height Zeta + */ +void +init_custom_bathymetry (int /*lev*/, const Geometry& /*geom*/, + MultiFab& mf_h, + const SolverChoice& /*m_solverChoice*/, + int /*rrx*/, int /*rry*/) +{ + mf_h.setVal(500.0_rt); +} + +/** + * \brief Initializes coriolis factor + */ +void +init_custom_coriolis (const Geometry& /*geom*/, + MultiFab& /*mf_fcor*/, + const SolverChoice& /*m_solverChoice*/) {} + +/** + * \brief Initializes custom sea surface height + */ +void +init_custom_zeta (const Geometry& geom, + MultiFab& mf_zeta, + const SolverChoice& m_solverChoice) +{ + mf_zeta.setVal(0.0_rt); +} + +void +init_custom_prob( + const Box& bx, + Array4 const& state, + Array4 const& x_vel, + Array4 const& y_vel, + Array4 const& z_vel, + Array4 const& /*z_w*/, + Array4 const& z_r, + Array4 const& /*Hz*/, + Array4 const& /*h*/, + Array4 const& /*Zt_avg1*/, + GeometryData const& geomdata, + const SolverChoice& m_solverChoice) +{ + bool l_use_salt = m_solverChoice.use_salt; + + const int khi = geomdata.Domain().bigEnd()[2]; + + AMREX_ALWAYS_ASSERT(bx.length()[2] == khi+1); + + auto T0 = m_solverChoice.T0; + Real val1 = (44.69_rt / 39.382_rt) * (44.69_rt / 39.382_rt); + Real val2 = val1 * (m_solverChoice.rho0 * 100.0_rt/m_solverChoice.g) * (5.0e-5_rt/((42.689_rt/44.69_rt) * (42.689_rt/44.69_rt))); + ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept + { + const auto prob_lo = geomdata.ProbLo(); + const auto prob_hi = geomdata.ProbHi(); + const auto dx = geomdata.CellSize(); + + const Real y = prob_lo[1] + (j + 0.5_rt) * dx[1]; + const Real z = z_r(i,j,k); + const Real yextent = prob_hi[1] - prob_lo[1]; + + const Real val3 = T0 + val2 * std::exp(z/100.0_rt) * (10.0_rt - 0.4_rt * std::tanh(z / 100.0_rt)); + const Real val4 = y / yextent; + + state(i,j,k,Temp_comp)=val3 - 3.0_rt * val4; + if (l_use_salt) { + state(i,j,k,Salt_comp)=34.5_rt - 0.001_rt * z - val4; + } + + // Set scalar = 0 everywhere + state(i, j, k, Scalar_comp) = 0.0_rt; + }); + + const Box& xbx = surroundingNodes(bx,0); + const Box& ybx = surroundingNodes(bx,1); + const Box& zbx = surroundingNodes(bx,2); + + ParallelFor(xbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept + { + x_vel(i,j,k) = 0.0_rt; + }); + ParallelFor(ybx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept + { + y_vel(i, j, k) = 0.0_rt; + }); + + ParallelFor(zbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept + { + z_vel(i, j, k) = 0.0_rt; + }); + + Gpu::streamSynchronize(); +} + +void +init_custom_vmix(const Geometry& /*geom*/, MultiFab& mf_Akv, MultiFab& mf_Akt, + MultiFab& mf_z_w, const SolverChoice& /*m_solverChoice*/) +{ + for ( MFIter mfi((mf_Akv), TilingIfNotGPU()); mfi.isValid(); ++mfi ) + { + Array4 const& Akv = (mf_Akv).array(mfi); + Array4 const& Akt = (mf_Akt).array(mfi); + Array4 const& z_w = (mf_z_w).array(mfi); + Box bx = mfi.tilebox(); + bx.grow(IntVect(NGROW,NGROW,0)); + Gpu::streamSynchronize(); + amrex::ParallelFor(bx, + [=] AMREX_GPU_DEVICE (int i, int j, int k) + { + Akv(i,j,k) = 1.0_rt; //2.0e-03_rt+8.0e-03_rt*std::exp(z_w(i,j,k)/150.0_rt); + + Akt(i,j,k,Temp_comp) = 1.0_rt; + Akt(i,j,k,Salt_comp) = 1.0_rt; + Akt(i,j,k,Scalar_comp) = 0.0_rt; + }); + } +} + +void +init_custom_hmix(const Geometry& /*geom*/, MultiFab& mf_visc2_p, MultiFab& mf_visc2_r, + MultiFab& mf_diff2, const SolverChoice& /*m_solverChoice*/) +{ + for ( MFIter mfi((mf_visc2_p), TilingIfNotGPU()); mfi.isValid(); ++mfi ) + { + Array4 const& visc2_p = (mf_visc2_p).array(mfi); + Array4 const& visc2_r = (mf_visc2_r).array(mfi); + Array4 const& diff2 = mf_diff2.array(mfi); + Box bx = mfi.tilebox(); + bx.grow(IntVect(NGROW,NGROW,0)); + Gpu::streamSynchronize(); + + int ncomp = mf_diff2.nComp(); + + amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) + { + visc2_p(i,j,k) = 1280.0_rt; + visc2_r(i,j,k) = 1280.0_rt; + + for (int n = 0; n < ncomp; n++) { + diff2(i,j,k,n) = 1280.0_rt; + } + }); + } +} + +void +init_custom_smflux(const Geometry& geom, const Real time, MultiFab& mf_sustr, MultiFab& mf_svstr, + const SolverChoice& m_solverChoice) +{ + auto geomdata = geom.data(); + bool EWPeriodic = geomdata.isPeriodic(0); + bool NSPeriodic = geomdata.isPeriodic(1); + + const auto prob_lo = geomdata.ProbLo(); + const auto prob_hi = geomdata.ProbHi(); + + //If we had wind stress and bottom stress we would need to set these: + Real pi = 3.14159265359_rt; + Real tdays=time/Real(24.0*60.0*60.0); + Real dstart=0.0_rt; + Real air_rho=1.0_rt; + + const Real yextent = prob_hi[1] - prob_lo[1]; + const Real windamp = -0.05_rt / m_solverChoice.rho0; + const Real val1 = 2.0_rt * pi / yextent; + for ( MFIter mfi((mf_sustr), TilingIfNotGPU()); mfi.isValid(); ++mfi ) + { + const Box& bx = mfi.tilebox(); + const Box& xbx = surroundingNodes(bx,0); + const Box& xbx2 = mfi.grownnodaltilebox(0, IntVect(NGROW,NGROW,0)); + + Array4 const& sustr = mf_sustr.array(mfi); + ParallelFor(xbx2, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept + { + // Create bounding box for x and y to make spatially-dependent T and S + const auto prob_lo = geomdata.ProbLo(); + const auto dx = geomdata.CellSize(); + + const Real y = prob_lo[1] + (j + 0.5) * dx[1];// - ycent; + + sustr(i,j,0) = windamp * std::cos(val1 * y); + }); + } + mf_svstr.setVal(0.0_rt); +} diff --git a/Tests/CTestList.cmake b/Tests/CTestList.cmake index 8ed1a36..9a5023a 100644 --- a/Tests/CTestList.cmake +++ b/Tests/CTestList.cmake @@ -101,6 +101,7 @@ if(WIN32) add_test_r(Upwelling "Upwelling/*/upwelling.exe" "plt00010") add_test_r(Upwelling_GLS "Upwelling/*/upwelling.exe" "plt00010") add_test_r(Channel_Test "Channel_Test/*/channel_test.exe" "plt00010") + add_test_r(DoubleGyre "DoubleGyre/*/doublegyre.exe" "plt00010") else() add_test_r(DoublyPeriodic "DoublyPeriodic/doublyperiodic" "plt00010") add_test_r(DoublyPeriodic_bathy "DoublyPeriodic/doublyperiodic" "plt00010") @@ -110,6 +111,7 @@ else() add_test_r(Upwelling "Upwelling/upwelling" "plt00010") add_test_r(Upwelling_GLS "Upwelling/upwelling" "plt00010") add_test_r(Channel_Test "Channel_Test/channel_test" "plt00010") + add_test_r(DoubleGyre "DoubleGyre/doublegyre" "plt00010") endif() #============================================================================= # Performance tests diff --git a/Tests/REMORA_Gold_Files/DoubleGyre/Header b/Tests/REMORA_Gold_Files/DoubleGyre/Header new file mode 100644 index 0000000..1f760bb --- /dev/null +++ b/Tests/REMORA_Gold_Files/DoubleGyre/Header @@ -0,0 +1,30 @@ +HyperCLaw-V1.1 +5 +temp +salt +x_velocity +y_velocity +z_velocity +3 +36000 +0 +0 0 -500 +1000000 2000000 0 + +((0,0,0) (53,107,3) (0,0,0)) +10 +18518.518518518518 18518.518518518518 125 +0 +0 +0 1 36000 +10 +0 1000000 +0 2000000 +-500 0 +Level_0/Cell +1 +3 +amrexvec_nu_x +amrexvec_nu_y +amrexvec_nu_z +Level_0/Nu_nd diff --git a/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Cell_D_00000 b/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Cell_D_00000 new file mode 100644 index 0000000..79497b7 Binary files /dev/null and b/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Cell_D_00000 differ diff --git a/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Cell_H b/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Cell_H new file mode 100644 index 0000000..e337df7 --- /dev/null +++ b/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Cell_H @@ -0,0 +1,16 @@ +1 +1 +5 +0 +(1 0 +((0,0,0) (53,107,3) (0,0,0)) +) +1 +FabOnDisk: Cell_D_00000 0 + +1,5 +2.9727853879226678e+00,3.3710599160291942e+01,-1.1815199859104297e-02,-1.4675355859916269e-02,0.0000000000000000e+00, + +1,5 +6.8557630875617486e+00,3.4789266711400060e+01,6.6367459998981065e-03,8.6934968717769876e-03,0.0000000000000000e+00, + diff --git a/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Nu_nd_D_00000 b/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Nu_nd_D_00000 new file mode 100644 index 0000000..20713c2 Binary files /dev/null and b/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Nu_nd_D_00000 differ diff --git a/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Nu_nd_H b/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Nu_nd_H new file mode 100644 index 0000000..599a3a0 --- /dev/null +++ b/Tests/REMORA_Gold_Files/DoubleGyre/Level_0/Nu_nd_H @@ -0,0 +1,16 @@ +1 +1 +3 +0 +(1 0 +((0,0,0) (54,108,4) (1,1,1)) +) +1 +FabOnDisk: Nu_nd_D_00000 0 + +1,3 +0.0000000000000000e+00,0.0000000000000000e+00,-5.0010311044819343e+02, + +1,3 +0.0000000000000000e+00,0.0000000000000000e+00,-4.9989252523326695e+02, + diff --git a/Tests/REMORA_Gold_Files/DoubleGyre/job_info b/Tests/REMORA_Gold_Files/DoubleGyre/job_info new file mode 100644 index 0000000..ff62290 --- /dev/null +++ b/Tests/REMORA_Gold_Files/DoubleGyre/job_info @@ -0,0 +1,169 @@ +=============================================================================== + REMORA Job Information +=============================================================================== +inputs file: DoubleGyre.i + +number of MPI processes: 1 +number of threads: 2 + +CPU time used since start of simulation (CPU-hours): 0.000307998 + +=============================================================================== + Plotfile Information +=============================================================================== +output data / time: Fri Aug 23 09:30:03 2024 +output dir: /home/klion/software/REMORA/Exec/DoubleGyre + + +=============================================================================== + Build Information +=============================================================================== +build date: 2024-08-21 14:53:27.013632 +build machine: Linux varan 5.15.0-113-generic #123~20.04.1-Ubuntu SMP Wed Jun 12 17:33:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux +build dir: /home/klion/software/REMORA/Exec/DoubleGyre +AMReX dir: ../../Submodules/AMReX + +COMP: gnu +COMP version: 9.4.0 + + +REMORA git hash: 1d912d0-dirty +AMReX git hash: 24.07-28-g930e75ea9 + + +=============================================================================== + Grid Information +=============================================================================== + level: 0 + number of boxes = 1 + maximum zones = 54 108 4 + + Boundary conditions + -x: SlipWall + +x: SlipWall + -y: SlipWall + +y: SlipWall + -z: SlipWall + +z: SlipWall + + +=============================================================================== + Inputs File Parameters +=============================================================================== +DistributionMapping.efficiency = 0.90000000000000002 +DistributionMapping.node_size = 0 +DistributionMapping.sfc_threshold = 0 +DistributionMapping.v = 0 +DistributionMapping.verbose = 0 +DistributionMapping.verbose_mapper = 0 +amr.blocking_factor = 1 +amr.check_input = 1 +amr.grid_eff = 0.69999999999999996 +amr.max_grid_size = 2048 +amr.max_level = 0 +amr.n_cell = 54 108 4 +amr.n_error_buf = 0 +amr.n_proper = 2 +amr.refine_grid_layout = 1 +amr.refine_grid_layout_x = 1 +amr.refine_grid_layout_y = 1 +amr.refine_grid_layout_z = 0 +amr.v = 1 +amrex.abort_on_out_of_gpu_memory = 0 +amrex.abort_on_unused_inputs = 0 +amrex.async_out = 0 +amrex.async_out_nfiles = 64 +amrex.call_addr2line = 1 +amrex.fpe_trap_invalid = 1 +amrex.fpe_trap_overflow = 0 +amrex.fpe_trap_zero = 0 +amrex.handle_sigabrt = 1 +amrex.handle_sigfpe = 1 +amrex.handle_sigill = 1 +amrex.handle_sigint = 1 +amrex.handle_sigsegv = 1 +amrex.handle_sigterm = 0 +amrex.init_snan = 1 +amrex.mf.alloc_single_chunk = 0 +amrex.omp_threads = system +amrex.regtest_reduction = 0 +amrex.signal_handling = 1 +amrex.the_arena_init_size = 0 +amrex.the_arena_is_managed = 0 +amrex.the_arena_release_threshold = 9223372036854775807 +amrex.the_async_arena_release_threshold = 9223372036854775807 +amrex.the_comms_arena_init_size = 8388608 +amrex.the_comms_arena_release_threshold = 9223372036854775807 +amrex.the_device_arena_init_size = 8388608 +amrex.the_device_arena_release_threshold = 9223372036854775807 +amrex.the_managed_arena_init_size = 8388608 +amrex.the_managed_arena_release_threshold = 9223372036854775807 +amrex.the_pinned_arena_init_size = 8388608 +amrex.the_pinned_arena_release_threshold = 9223372036854775807 +amrex.throw_exception = 0 +amrex.use_gpu_aware_mpi = 0 +amrex.v = 1 +amrex.vector_growth_factor = 1.5 +amrex.verbose = 1 +fab.do_initval = 1 +fab.init_snan = 1 +fab.initval = nan +fabarray.maxcomp = 25 +geometry.coord_sys = 0 +geometry.is_periodic = 0 0 0 +geometry.prob_hi = 1000000. 2000000. 0. +geometry.prob_lo = 0. 0. -500. +machine.verbose = 0 +machine.very_verbose = 0 +max_step = 10 +remora.Akk_bak = 5.0e-6 +remora.Akp_bak = 5.0e-6 +remora.Akt_bak = 1.0 +remora.Akv_bak = 1.0 +remora.R0 = 1028.0 +remora.S0 = 35.0 +remora.Scoef = 7.6e-4 +remora.T0 = 5.0 +remora.Tcoef = 1.0e-4 +remora.Zob = 0.02 +remora.Zos = 0.02 +remora.check_file = chk +remora.check_int = -57600 +remora.coriolis_beta = 2.0e-11 +remora.coriolis_f0 = 7.3e-5 +remora.coriolis_type = beta_plane +remora.fixed_dt = 3600.0 +remora.fixed_ndtfast_ratio = 20 +remora.flat_bathymetry = false +remora.plot_file = plt +remora.plot_int = 100 +remora.plot_vars = salt temp x_velocity y_velocity z_velocity +remora.plotfile_type = amrex +remora.rdrag = 8.0e-7 +remora.rho0 = 1025.0 +remora.spatial_order = 2 +remora.sum_interval = 1 +remora.tcline = 1e16 +remora.theta_b = 0.0 +remora.theta_s = 0.0 +remora.tracer_horizontal_advection_scheme = upstream3 +remora.use_coriolis = true +remora.v = 0 +vismf.allowsparsewrites = 1 +vismf.checkfilepositions = 0 +vismf.groupsets = 0 +vismf.headerversion = 1 +vismf.iobuffersize = 2097152 +vismf.setbuf = 1 +vismf.usedynamicsetselection = 1 +vismf.usepersistentifstreams = 0 +vismf.usesingleread = 0 +vismf.usesinglewrite = 0 +vismf.usesynchronousreads = 0 +vismf.v = 0 +xhi.type = SlipWall +xlo.type = SlipWall +yhi.type = SlipWall +ylo.type = SlipWall +zhi.type = SlipWall +zlo.type = SlipWall diff --git a/Tests/test_files/DoubleGyre/DoubleGyre.i b/Tests/test_files/DoubleGyre/DoubleGyre.i new file mode 100644 index 0000000..38eb901 --- /dev/null +++ b/Tests/test_files/DoubleGyre/DoubleGyre.i @@ -0,0 +1,82 @@ +# ------------------ INPUTS TO MAIN PROGRAM ------------------- +max_step = 10 + +amrex.fpe_trap_invalid = 1 + +# PROBLEM SIZE & GEOMETRY +geometry.prob_lo = 0. 0. -500. +geometry.prob_hi = 1000000. 2000000. 0. + +amr.n_cell = 54 108 4 + +geometry.is_periodic = 0 0 0 + +xlo.type = "SlipWall" +xhi.type = "SlipWall" + +ylo.type = "SlipWall" +yhi.type = "SlipWall" + +zlo.type = "SlipWall" +zhi.type = "SlipWall" + +# TIME STEP CONTROL +remora.fixed_dt = 3600.0 # Timestep size (seconds) + +remora.fixed_ndtfast_ratio = 20 + +#remora.fixed_ndtfast_ratio = 30 # Ratio of baroclinic to barotropic time step + +# DIAGNOSTICS & VERBOSITY +remora.sum_interval = 1 # timesteps between integrated/max quantities, if remora.v > 0 +remora.v = 0 # verbosity in REMORA.cpp (0: none, 1: integrated quantities, etc, 2: print boxes) +amr.v = 1 # verbosity in Amr.cpp + +# REFINEMENT / REGRIDDING +amr.max_level = 0 # maximum level number allowed + +# CHECKPOINT FILES +remora.check_file = chk # root name of checkpoint file +remora.check_int = -57600 # number of timesteps between checkpoints + +# PLOTFILES +remora.plot_file = plt # prefix of plotfile name +remora.plot_int = 100 # number of timesteps between plotfiles +remora.plot_vars = salt temp x_velocity y_velocity z_velocity +remora.plotfile_type = amrex + +# SOLVER CHOICE +remora.flat_bathymetry = false +remora.tracer_horizontal_advection_scheme = "upstream3" # upstream3 or centered4 +remora.spatial_order = 2 + +remora.Zob = 0.02 +remora.Zos = 0.02 + +remora.rdrag = 8.0e-7 + +# turbulence closure parameters +remora.Akk_bak = 5.0e-6 +remora.Akp_bak = 5.0e-6 +remora.Akv_bak = 1.0 +remora.Akt_bak = 1.0 + +remora.theta_s = 0.0 +remora.theta_b = 0.0 +remora.tcline = 1e16 + + +# Linear EOS parameters +remora.R0 = 1028.0 # background density value (Kg/m3) used in Linear Equation of State +remora.S0 = 35.0 # background salinity (nondimensional) constant +remora.T0 = 5.0 # background potential temperature (Celsius) constant +remora.Tcoef = 1.0e-4 # linear equation of state parameter (1/Celsius) +remora.Scoef = 7.6e-4 # linear equation of state parameter (nondimensional) +remora.rho0 = 1025.0 # Mean density (Kg/m3) used when Boussinesq approx is inferred + +# Coriolis params +remora.use_coriolis = true +remora.coriolis_type = beta_plane +remora.coriolis_f0 = 7.3e-5 +remora.coriolis_beta = 2.0e-11 +