Skip to content

Commit

Permalink
Enable use of 3D FFT for uniform dz and hybrid FFT for stretched grid…
Browse files Browse the repository at this point in the history
… but still no terrain; also replace use_terrain flag by tests on terrain_type
  • Loading branch information
asalmgren committed Nov 17, 2024
1 parent 75c4749 commit d03ada3
Show file tree
Hide file tree
Showing 81 changed files with 503 additions and 281 deletions.
2 changes: 1 addition & 1 deletion Exec/ABL/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Problem::init_custom_pert(
{
const bool use_moisture = (sc.moisture_type != MoistureType::None);

const bool use_terrain = sc.use_terrain;
const bool use_terrain = SolverChoice::terrain_type != TerrainType::None;

if (parms.KE_decay_height > 0) {
amrex::Print() << "Initial KE profile (order " << parms.KE_decay_order
Expand Down
2 changes: 1 addition & 1 deletion Exec/ABL/inputs_deardorff_msf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

erf.test_mapfactor = 1
erf.use_terrain = 1
erf.terrain_type = Static

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 1024 1024 1024
Expand Down
2 changes: 1 addition & 1 deletion Exec/ABL/inputs_deardorff_no_msf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ amrex.fpe_trap_invalid = 1

fabarray.mfiter_tile_size = 1024 1024 1024

erf.use_terrain = 1
erf.terrain_type = Static

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 2048 2048 1024
Expand Down
2 changes: 1 addition & 1 deletion Exec/ABL/inputs_most_msf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

erf.test_mapfactor = 1
erf.use_terrain = 1
erf.terrain_type = Static

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 1024 1024 1024
Expand Down
2 changes: 1 addition & 1 deletion Exec/ABL/inputs_most_no_msf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ amrex.fpe_trap_invalid = 1

fabarray.mfiter_tile_size = 1024 1024 1024

erf.use_terrain = 1
erf.terrain_type = Static

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 2048 2048 1024
Expand Down
2 changes: 1 addition & 1 deletion Exec/ABL/inputs_smagorinsky_msf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

erf.test_mapfactor = 1
erf.use_terrain = 1
erf.terrain_type = Static

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 1024 1024 1024
Expand Down
2 changes: 1 addition & 1 deletion Exec/ABL/inputs_smagorinsky_no_msf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ amrex.fpe_trap_invalid = 1

fabarray.mfiter_tile_size = 1024 1024 1024

erf.use_terrain = 1
erf.terrain_type = Static

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 2048 2048 1024
Expand Down
1 change: 0 additions & 1 deletion Exec/DryRegTests/DensityCurrent/inputs_amr
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ erf.plot_vars_1 = density x_velocity y_velocity z_velocity pressure theta pr
# SOLVER CHOICE
erf.use_gravity = true
erf.use_coriolis = false
erf.use_terrain = false

erf.les_type = "None"
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ erf.alpha_T = 75.0 # [m^2/s]
erf.c_p = 1004.0

# TERRAIN SMOOTHING
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 1

# Z LEVELS
Expand Down
1 change: 0 additions & 1 deletion Exec/DryRegTests/IsentropicVortex/inputs_advecting_msf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

erf.test_mapfactor = 1
erf.use_terrain = 0

# PROBLEM SIZE & GEOMETRY
geometry.prob_lo = -12 -12 -1
Expand Down
2 changes: 0 additions & 2 deletions Exec/DryRegTests/IsentropicVortex/inputs_advecting_no_msf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ amrex.fpe_trap_invalid = 1

fabarray.mfiter_tile_size = 1024 1024 1024

erf.use_terrain = 0

# PROBLEM SIZE & GEOMETRY
geometry.prob_lo = -24 -24 -1
geometry.prob_hi = 24 24 1
Expand Down
1 change: 0 additions & 1 deletion Exec/DryRegTests/IsentropicVortex/inputs_stationary_msf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

erf.test_mapfactor = 1
erf.use_terrain = 0

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 64 64 64
Expand Down
2 changes: 0 additions & 2 deletions Exec/DryRegTests/IsentropicVortex/inputs_stationary_no_msf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ amrex.fpe_trap_invalid = 1

fabarray.mfiter_tile_size = 1024 1024 1024

erf.use_terrain = 0

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 128 128 64
amr.n_cell = 64 64 64 # Consider reducing n_cell in z-dir
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/ParticlesOverWoA/inputs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ erf.box1.in_box_lo = 2. 0.25
erf.box1.in_box_hi = 8. 0.75

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

erf.dycore_horiz_adv_type = Centered_2nd
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/ScalarAdvDiff/inputs_advect_shearU_msf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

erf.test_mapfactor = 1
erf.use_terrain = 1
erf.terrain_type = Static

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 8 8 8
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/ScalarAdvDiff/inputs_advect_shearU_no_msf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ amrex.fpe_trap_invalid = 1

fabarray.mfiter_tile_size = 1024 1024 1024

erf.use_terrain = 1
erf.terrain_type = Static

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 16 16 8
Expand Down
1 change: 0 additions & 1 deletion Exec/DryRegTests/ScalarAdvDiff/inputs_advect_uniformU_msf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

erf.test_mapfactor = 1
erf.use_terrain = 0

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 1 1 1
Expand Down
2 changes: 0 additions & 2 deletions Exec/DryRegTests/ScalarAdvDiff/inputs_advect_uniformU_no_msf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ amrex.fpe_trap_invalid = 1

fabarray.mfiter_tile_size = 1024 1024 1024

erf.use_terrain = 0

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 2 2 1
amr.n_cell = 64 64 4
Expand Down
1 change: 0 additions & 1 deletion Exec/DryRegTests/ScalarAdvDiff/inputs_diffuse_msf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

erf.test_mapfactor = 1
erf.use_terrain = 0

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 1 1 1
Expand Down
2 changes: 0 additions & 2 deletions Exec/DryRegTests/ScalarAdvDiff/inputs_diffuse_no_msf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ amrex.fpe_trap_invalid = 1

fabarray.mfiter_tile_size = 1024 1024 1024

erf.use_terrain = 0

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 2 2 1
amr.n_cell = 64 64 64
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/StokesSecondProblem/inputs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ erf.box1.in_box_lo = 2. 0.25
erf.box1.in_box_hi = 8. 0.75

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0
erf.specify_terrain_velocity = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ erf.box1.in_box_lo = 2. 0.25
erf.box1.in_box_hi = 8. 0.75

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

erf.terrain_z_levels = 0 0.000237889 0.000487134 0.000748273 0.00102187 0.00130852 0.00160884 0.00192347 0.0022531 0.00259843 0.00296021 0.0033392 0.00373623 0.00415215 0.00458784 0.00504424 0.00552231 0.00602309 0.00654763 0.00709704 0.0076725 0.00827522 0.00890647 0.0095676 0.01026 0.0109851 0.0117444 0.0125395 0.0133722 0.014244 0.0151568 0.0161126 0.0171133 0.0181609 0.0192575 0.0204056 0.0216073 0.022865 0.0241815 0.0255592 0.0270011 0.0285098 0.0300885 0.0317403 0.0334683 0.0352761 0.037167 0.0391448 0.0412133 0.0433764 0.0456381 0.0480028 0.0504749 0.053059 0.0557597 0.058582 0.061531 0.064612 0.0678303 0.0711917 0.0747019 0.0783668 0.0821928 0.0861861 0.0903533 0.0947011 0.0992364 0.103966 0.108898 0.114039 0.119397 0.12498 0.130795 0.136851 0.143155 0.149717 0.156544 0.163645 0.171028 0.178703 0.186677 0.194959 0.203559 0.212483 0.221742 0.231343 0.241294 0.251604 0.26228 0.27333 0.284761 0.296579 0.308792 0.321404 0.334422 0.347851 0.361694 0.375956 0.390639 0.405745 0.421276 0.437231 0.453611 0.470414 0.487636 0.505275 0.523326 0.541783 0.560638 0.579884 0.599511 0.619507 0.639862 0.660561 0.68159 0.702935 0.724576 0.746498 0.76868 0.791103 0.813746 0.836586 0.8596 0.882766 0.906059 0.929454 0.952927 0.97645 1
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/Terrain2d_Cylinder/inputs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ erf.box1.in_box_lo = 2. 0.25
erf.box1.in_box_hi = 8. 0.75

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

#erf.terrain_z_levels = 0 0.0236057 0.0486738 0.0752909 0.103548 0.133541 0.165372 0.199145 0.234973 0.272972 0.313264 0.355978 0.401247 0.449212 0.500017 0.553815 0.610764 0.671027 0.734774 0.802181 0.873428 0.948703 1.0282 1.1121 1.20063 1.29397 1.39234 1.49595 1.605 1.71971 1.84029 1.96694 2.09987 2.23928 2.38537 2.53831 2.69828 2.86545 3.03996 3.22194 3.41151 3.60875 3.81373 4.02649 4.24706 4.47539 4.71146 4.95516 5.20639 5.46498 5.73072 6.00339 6.28271 6.56834 6.85995 7.15712 7.45942 7.76639 8.07751 8.39226 8.71007 9.03036 9.35252 9.67594 10
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/Terrain2d_Cylinder/inputs.amr
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ erf.use_coriolis = false
erf.les_type = "None"

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

#erf.terrain_z_levels = 0 0.0236057 0.0486738 0.0752909 0.103548 0.133541 0.165372 0.199145 0.234973 0.272972 0.313264 0.355978 0.401247 0.449212 0.500017 0.553815 0.610764 0.671027 0.734774 0.802181 0.873428 0.948703 1.0282 1.1121 1.20063 1.29397 1.39234 1.49595 1.605 1.71971 1.84029 1.96694 2.09987 2.23928 2.38537 2.53831 2.69828 2.86545 3.03996 3.22194 3.41151 3.60875 3.81373 4.02649 4.24706 4.47539 4.71146 4.95516 5.20639 5.46498 5.73072 6.00339 6.28271 6.56834 6.85995 7.15712 7.45942 7.76639 8.07751 8.39226 8.71007 9.03036 9.35252 9.67594 10
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/Terrain2d_Cylinder/inputs_most_test
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ erf.les_type = "Smagorinsky"
erf.Cs = 0.1

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

# Diffusion coefficient from Straka, K = 75 m^2/s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ erf.box1.in_box_lo = 2. 0.25
erf.box1.in_box_hi = 8. 0.75

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

erf.terrain_z_levels = 0 0.0236057 0.0486738 0.0752909 0.103548 0.133541 0.165372 0.199145 0.234973 0.272972 0.313264 0.355978 0.401247 0.449212 0.500017 0.553815 0.610764 0.671027 0.734774 0.802181 0.873428 0.948703 1.0282 1.1121 1.20063 1.29397 1.39234 1.49595 1.605 1.71971 1.84029 1.96694 2.09987 2.23928 2.38537 2.53831 2.69828 2.86545 3.03996 3.22194 3.41151 3.60875 3.81373 4.02649 4.24706 4.47539 4.71146 4.95516 5.20639 5.46498 5.73072 6.00339 6.28271 6.56834 6.85995 7.15712 7.45942 7.76639 8.07751 8.39226 8.71007 9.03036 9.35252 9.67594 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ erf.box1.in_box_lo = 2. 0.25
erf.box1.in_box_hi = 8. 0.75

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

#erf.terrain_z_levels = 0 0.0236057 0.0486738 0.0752909 0.103548 0.133541 0.165372 0.199145 0.234973 0.272972 0.313264 0.355978 0.401247 0.449212 0.500017 0.553815 0.610764 0.671027 0.734774 0.802181 0.873428 0.948703 1.0282 1.1121 1.20063 1.29397 1.39234 1.49595 1.605 1.71971 1.84029 1.96694 2.09987 2.23928 2.38537 2.53831 2.69828 2.86545 3.03996 3.22194 3.41151 3.60875 3.81373 4.02649 4.24706 4.47539 4.71146 4.95516 5.20639 5.46498 5.73072 6.00339 6.28271 6.56834 6.85995 7.15712 7.45942 7.76639 8.07751 8.39226 8.71007 9.03036 9.35252 9.67594 10
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/Terrain3d_Hemisphere/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Problem::init_custom_pert (
const int khi = geomdata.Domain().bigEnd()[2];

const bool use_moisture = (sc.moisture_type != MoistureType::None);
const bool use_terrain = sc.use_terrain;
const bool use_terrain = (SolverChoice::terrain_type != TerrainType::None);

AMREX_ALWAYS_ASSERT(bx.length()[2] == khi+1);

Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/Terrain3d_Hemisphere/inputs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ erf.box1.in_box_lo = 2. 0.25
erf.box1.in_box_hi = 8. 0.75

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

# Diffusion coefficient from Straka, K = 75 m^2/s
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/Terrain3d_Hemisphere/inputs.amr
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ erf.use_coriolis = false
erf.les_type = "None"

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

# Diffusion coefficient from Straka, K = 75 m^2/s
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/Terrain3d_Hemisphere/inputs_most_test
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ erf.les_type = "Smagorinsky"
erf.Cs = 0.1

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

# Diffusion coefficient from Straka, K = 75 m^2/s
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/TurbulentInflow/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Problem::init_custom_pert(
{
const bool use_moisture = (sc.moisture_type != MoistureType::None);

const bool use_terrain = sc.use_terrain;
const bool use_terrain = (SolverChoice::terrain_type != TerrainType::None);

if (parms.KE_decay_height > 0) {
amrex::Print() << "Initial KE profile (order " << parms.KE_decay_order
Expand Down
3 changes: 1 addition & 2 deletions Exec/DryRegTests/WPS_Test/inputs_real_ChisholmView
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ erf.alpha_T = 0.0
erf.alpha_C = 0.0
erf.use_gravity = true

erf.use_terrain = true
erf.use_terrain = false
erf.terrain_type = Static

erf.moisture_model = "Kessler"

Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/WitchOfAgnesi/inputs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ erf.box3.in_box_lo = -5062.5 0 0
erf.box3.in_box_hi = 5062.5 1 1000

# TERRRAIN GRID TYPE
erf.use_terrain = 1
erf.terrain_type = Static
#erf.terrain_smoothing = 1 # Smoothed Terrain Following coords (Klemp 2011)
#erf.terrain_gamma_m = 0.5
erf.terrain_smoothing = 2 # Sullivan TF
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/WitchOfAgnesi/inputs_most_test
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ erf.les_type = "Smagorinsky"
erf.Cs = 0.1

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

# Diffusion coefficient from Straka, K = 75 m^2/s
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/WitchOfAgnesi/inputs_static_twolevel
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ erf.use_coriolis = false
erf.les_type = "None"

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

# Diffusion coefficient from Straka, K = 75 m^2/s
Expand Down
2 changes: 1 addition & 1 deletion Exec/DryRegTests/WitchOfAgnesi_JAMES/inputs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ erf.init_type = "input_sounding"
erf.init_sounding_ideal = true

# TERRRAIN GRID TYPE
erf.use_terrain = 1
erf.terrain_type = Static
#erf.terrain_smoothing = 1 # Smoothed Terrain Following coords (Klemp 2011)
#erf.terrain_gamma_m = 0.5
erf.terrain_smoothing = 2 # Sullivan TF
Expand Down
2 changes: 1 addition & 1 deletion Exec/SpongeTest/inputs_sponge_test
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ erf.box1.in_box_lo = 2. 0.25
erf.box1.in_box_hi = 8. 0.75

# TERRRAIN GRID TYPE
erf.use_terrain = true
erf.terrain_type = Static
erf.terrain_smoothing = 0

#erf.terrain_z_levels = 0 0.0236057 0.0486738 0.0752909 0.103548 0.133541 0.165372 0.199145 0.234973 0.272972 0.313264 0.355978 0.401247 0.449212 0.500017 0.553815 0.610764 0.671027 0.734774 0.802181 0.873428 0.948703 1.0282 1.1121 1.20063 1.29397 1.39234 1.49595 1.605 1.71971 1.84029 1.96694 2.09987 2.23928 2.38537 2.53831 2.69828 2.86545 3.03996 3.22194 3.41151 3.60875 3.81373 4.02649 4.24706 4.47539 4.71146 4.95516 5.20639 5.46498 5.73072 6.00339 6.28271 6.56834 6.85995 7.15712 7.45942 7.76639 8.07751 8.39226 8.71007 9.03036 9.35252 9.67594 10
Expand Down
Loading

0 comments on commit d03ada3

Please sign in to comment.