Skip to content

Commit

Permalink
Merge branch 'development' into turn_on_reflux
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren authored Nov 13, 2023
2 parents de4609d + fa25dc6 commit b772772
Show file tree
Hide file tree
Showing 53 changed files with 2,434 additions and 1,102 deletions.
4 changes: 3 additions & 1 deletion CMake/BuildERFExe.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function(build_erf_lib erf_lib_name)

if(ERF_ENABLE_NETCDF)
target_sources(${erf_lib_name} PRIVATE
${SRC_DIR}/IO/NCBuildFABs.cpp
${SRC_DIR}/IO/NCInterface.cpp
${SRC_DIR}/IO/NCPlotFile.cpp
${SRC_DIR}/IO/NCCheckpoint.cpp
Expand Down Expand Up @@ -79,6 +78,7 @@ function(build_erf_lib erf_lib_name)
${SRC_DIR}/Radiation/Aero_rad_props.cpp
${SRC_DIR}/Radiation/Optics.cpp
${SRC_DIR}/Radiation/Radiation.cpp
${SRC_DIR}/Radiation/Albedo.cpp
${CMAKE_SOURCE_DIR}/Submodules/RRTMGP/cpp/examples/mo_load_coefficients.cpp
${CMAKE_SOURCE_DIR}/Submodules/RRTMGP/cpp/extensions/fluxes_byband/mo_fluxes_byband_kernels.cpp
)
Expand Down Expand Up @@ -113,6 +113,7 @@ function(build_erf_lib erf_lib_name)
${SRC_DIR}/BoundaryConditions/BoundaryConditions_zvel.cpp
${SRC_DIR}/BoundaryConditions/BoundaryConditions_bndryreg.cpp
${SRC_DIR}/BoundaryConditions/BoundaryConditions_wrfbdy.cpp
${SRC_DIR}/BoundaryConditions/BoundaryConditions_metgrid.cpp
${SRC_DIR}/BoundaryConditions/ERF_FillPatch.cpp
${SRC_DIR}/BoundaryConditions/ERF_FillPatcher.cpp
${SRC_DIR}/BoundaryConditions/ERF_PhysBCFunct.cpp
Expand Down Expand Up @@ -146,6 +147,7 @@ function(build_erf_lib erf_lib_name)
${SRC_DIR}/TimeIntegration/ERF_TimeStep.cpp
${SRC_DIR}/TimeIntegration/ERF_advance_dycore.cpp
${SRC_DIR}/TimeIntegration/ERF_advance_microphysics.cpp
${SRC_DIR}/TimeIntegration/ERF_advance_radiation.cpp
${SRC_DIR}/TimeIntegration/ERF_make_buoyancy.cpp
${SRC_DIR}/TimeIntegration/ERF_make_condensation_source.cpp
${SRC_DIR}/TimeIntegration/ERF_make_fast_coeffs.cpp
Expand Down
1 change: 1 addition & 0 deletions Exec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ else ()
add_subdirectory(DevTests/MovingTerrain)
add_subdirectory(DevTests/ParticlesOverWoA)
add_subdirectory(DevTests/MiguelDev)
add_subdirectory(DevTests/MetGrid)
endif()
12 changes: 12 additions & 0 deletions Exec/DevTests/MetGrid/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set(erf_exe_name erf_metgrid_dev)

add_executable(${erf_exe_name} "")
target_sources(${erf_exe_name}
PRIVATE
prob.cpp
)

target_include_directories(${erf_exe_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

include(${CMAKE_SOURCE_DIR}/CMake/BuildERFExe.cmake)
build_erf_exe(${erf_exe_name})
7 changes: 6 additions & 1 deletion Exec/DevTests/MetGrid/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ USE_HIP = FALSE
USE_SYCL = FALSE

# Debugging
DEBUG = FALSE
#DEBUG = FALSE
DEBUG = TRUE

TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = TRUE

#USE_MOISTURE = FALSE
USE_MOISTURE = TRUE

#USE_WARM_NO_PRECIP = TRUE

# GNU Make
Bpack := ./Make.package
Blocs := .
Expand Down
27 changes: 17 additions & 10 deletions Exec/DevTests/MetGrid/inputs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# ------------------ INPUTS TO MAIN PROGRAM -------------------
max_step = 1
max_step = 100

amrex.fpe_trap_invalid = 1
amrex.fpe_trap_zero = 1
amrex.fpe_trap_overflow = 1

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 10600 5000 5000
amr.n_cell = 140 80 60
geometry.prob_extent = 28000 16000 8000
amr.n_cell = 140 80 100

geometry.is_periodic = 0 0 0

Expand All @@ -17,9 +19,10 @@ zlo.type = "NoSlipWall"
zhi.type = "SlipWall"

# TIME STEP CONTROL
erf.fixed_dt = 0.1 # fixed time step depending on grid resolution
erf.fixed_dt = 1.0 # fixed time step depending on grid resolution

erf.use_terrain = true
erf.terrain_smoothing = 2

# DIAGNOSTICS & VERBOSITY
erf.sum_interval = -1 # timesteps between computing mass
Expand All @@ -36,22 +39,26 @@ erf.check_int = 100 # number of timesteps between checkpoints

# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 10 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta z_phys
erf.plot_int_1 = 1 # number of timesteps between plotfiles
erf.plot_vars_1 = qv Rhoqv density dens_hse rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta z_phys mapfac pres_hse pert_pres KE QKE

# SOLVER CHOICE
erf.alpha_T = 0.0
erf.alpha_T = 1.0
erf.alpha_C = 1.0
erf.use_gravity = true

erf.molec_diff_type = "None"
erf.les_type = "Smagorinsky"
#erf.les_type = "Deardorff"
erf.Cs = 0.1

#erf.terrain_z_levels = 0 130 354 583 816 1054 1549 2068 2615 3193 3803 4450 5142 5892 6709 7603 8591 9702 10967 12442 14230 16610 18711 20752 22133 23960 26579 28493 31236 33699 36068 40000

# INITIALIZATION WITH ATM DATA
erf.init_type = "metgrid"
erf.nc_init_file_0 = "met_em_d01.nc"
#erf.nc_bdy_file = ""
erf.metgrid_bdy_width = 5
erf.metgrid_bdy_set_width = 1
erf.init_type = "metgrid"
erf.nc_init_file_0 = "met_em.d01.2022-06-18_00:00:00.nc" "met_em.d01.2022-06-18_06:00:00.nc" "met_em.d01.2022-06-18_12:00:00.nc" "met_em.d01.2022-06-18_18:00:00.nc"

#There will be no OpenMP tiling
fabarray.mfiter_tile_size = 1024 1024 1024
2 changes: 1 addition & 1 deletion Exec/DevTests/MetGrid/prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct ProbParm : ProbParmDefaults {
class Problem : public ProblemBase
{
public:
Problem();
Problem(const amrex::Real* problo, const amrex::Real* probhi);

protected:
std::string name() override { return "Metgrid"; }
Expand Down
2 changes: 1 addition & 1 deletion Exec/DevTests/MetGrid/prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ amrex_probinit(const amrex_real* problo, const amrex_real* probhi)
return std::make_unique<Problem>(problo, probhi);
}

Problem::Problem()
Problem::Problem(const amrex::Real* problo, const amrex::Real* probhi)
{}
2 changes: 1 addition & 1 deletion Exec/LLJ/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = TRUE
USE_HDF5 = TRUE
#USE_HDF5 = TRUE

# GNU Make
Bpack := ./Make.package
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/WPS_Test/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ USE_ASSERTION = TRUE
USE_MOISTURE = TRUE

USE_NETCDF = TRUE
USE_HDF5 = TRUE
#USE_HDF5 = TRUE

# GNU Make
Bpack := ./Make.package
Expand Down
Loading

0 comments on commit b772772

Please sign in to comment.