Skip to content

Commit

Permalink
Fix Deardorff overwrite of theta_v component. (#1641)
Browse files Browse the repository at this point in the history
* Fix Deardorff overwrite of theta_v component.

* fix indentation.

* fix logic error.
  • Loading branch information
AMLattanzi authored Jun 11, 2024
1 parent 79bd2a0 commit 33417f7
Show file tree
Hide file tree
Showing 3 changed files with 266 additions and 129 deletions.
100 changes: 100 additions & 0 deletions Exec/DevTests/Bomex/input_Kessler
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# ------------------ INPUTS TO MAIN PROGRAM -------------------
stop_time = 43200

amrex.fpe_trap_invalid = 1

fabarray.mfiter_tile_size = 1024 1024 1024

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 3200 3200 4000
amr.n_cell = 32 32 100

geometry.is_periodic = 1 1 0

# MOST BOUNDARY (DEFAULT IS ADIABATIC FOR THETA)
zlo.type = "Most"
erf.most.flux_type = "custom"
erf.most.ustar = 0.28 # ustar
erf.most.tstar = 8.0e-3 # theta flux
erf.most.qstar = 5.2e-5 # qv flux
erf.most.z0 = 0.1
erf.most.zref = 20.0

// NOTE: This should have a qv grad too (use hoextrapcc?!)
zhi.type = "SlipWall"
zhi.theta_grad = 0.00365

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

# DIAGNOSTICS & VERBOSITY
erf.sum_interval = 1 # timesteps between computing mass
erf.v = 1 # verbosity in ERF.cpp
amr.v = 1 # verbosity in Amr.cpp
erf.data_log = "surf" "mean" "flux" "subgrid"
erf.profile_int = 120

# REFINEMENT / REGRIDDING
amr.max_level = 0 # maximum level number allowed

# CHECKPOINT FILES
erf.check_file = chk # root name of checkpoint file
erf.check_int = 600 # number of timesteps between checkpoints

# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 120 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhotheta x_velocity y_velocity z_velocity pressure temp theta qt qp qv qc qi

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

erf.dycore_horiz_adv_type = Upwind_5th
erf.dycore_vert_adv_type = Upwind_5th
erf.dryscal_horiz_adv_type = WENOZ5
erf.dryscal_vert_adv_type = WENOZ5
erf.moistscal_horiz_adv_type = WENOZ5
erf.moistscal_vert_adv_type = WENOZ5

erf.moisture_model = "Kessler"

erf.molec_diff_type = "None"
erf.les_type = "Smagorinsky"
erf.Cs = 0.17
erf.Pr_t = 0.333333
erf.Sc_t = 0.333333

erf.init_type = "input_sounding"
erf.init_sounding_ideal = true

erf.add_custom_rhotheta_forcing = true
erf.add_custom_moisture_forcing = true
erf.add_custom_geostrophic_profile = true
erf.add_custom_w_subsidence = true
erf.custom_forcing_uses_primitive_vars = false

# Higher values of perturbations lead to instability
# Instability seems to be coming from BC
prob.U_0_Pert_Mag = 0.01
prob.V_0_Pert_Mag = 0.01
prob.W_0_Pert_Mag = 0.0

prob.pert_ref_height = 1600.0
prob.T_0_Pert_Mag = 0.1
prob.qv_0_Pert_Mag = 0.000025

prob.advection_heating_rate = -2.3148E-5
prob.source_cutoff = 1500.0
prob.source_cutoff_transition = 1500.0

prob.advection_moisture_rate = -1.2E-8
prob.moisture_source_cutoff = 300.0
prob.moisture_source_cutoff_transition = 200.0

prob.wbar_sub_max = -0.0065
prob.wbar_cutoff_max = 1500.0
prob.wbar_cutoff_min = 2100.0

prob.custom_TKE = true
32 changes: 18 additions & 14 deletions Exec/DevTests/Bomex/input_SAM
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# ------------------ INPUTS TO MAIN PROGRAM -------------------
stop_time = 21600
stop_time = 43200

amrex.fpe_trap_invalid = 1

fabarray.mfiter_tile_size = 1024 1024 1024

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 6400 6400 4000
amr.n_cell = 64 64 100
geometry.prob_extent = 3200 3200 4000
amr.n_cell = 32 32 100

geometry.is_periodic = 1 1 0

Expand All @@ -17,20 +17,22 @@ erf.most.flux_type = "custom"
erf.most.ustar = 0.28 # ustar
erf.most.tstar = 8.0e-3 # theta flux
erf.most.qstar = 5.2e-5 # qv flux
erf.most.z0 = 0.1
erf.most.z0 = 0.1
erf.most.zref = 20.0

// NOTE: This should have a qv grad too (use hoextrapcc?!)
zhi.type = "SlipWall"

zhi.theta_grad = 0.00365

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

# DIAGNOSTICS & VERBOSITY
erf.sum_interval = 1 # timesteps between computing mass
erf.v = 1 # verbosity in ERF.cpp
amr.v = 1 # verbosity in Amr.cpp
erf.data_log = "surf" "mean" "flux" "subgrid"
erf.profile_int = 60
erf.profile_int = 120

# REFINEMENT / REGRIDDING
amr.max_level = 0 # maximum level number allowed
Expand All @@ -41,12 +43,12 @@ erf.check_int = 600 # number of timesteps between checkpoints

# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 60 # number of timesteps between plotfiles
erf.plot_int_1 = 120 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhotheta x_velocity y_velocity z_velocity pressure temp theta qt qp qv qc qi

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

erf.dycore_horiz_adv_type = Upwind_5th
Expand All @@ -60,15 +62,17 @@ erf.moisture_model = "SAM"

erf.molec_diff_type = "None"
erf.les_type = "Smagorinsky"
erf.Cs = 0.1
erf.Cs = 0.17
erf.Pr_t = 0.333333
erf.Sc_t = 0.333333

erf.init_type = "input_sounding"
erf.init_sounding_ideal = true

erf.add_custom_rhotheta_forcing = true
erf.add_custom_moisture_forcing = true
erf.add_custom_geostrophic_profile = true
erf.add_custom_w_subsidence = true
erf.add_custom_rhotheta_forcing = true
erf.add_custom_moisture_forcing = true
erf.add_custom_geostrophic_profile = true
erf.add_custom_w_subsidence = true
erf.custom_forcing_uses_primitive_vars = false

# Higher values of perturbations lead to instability
Expand Down
Loading

0 comments on commit 33417f7

Please sign in to comment.