Skip to content

Commit

Permalink
Merge branch 'development' of github.com:erf-model/ERF into development
Browse files Browse the repository at this point in the history
  • Loading branch information
atmyers committed Nov 30, 2023
2 parents 9fca11d + f460464 commit 3d1f450
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 196 deletions.
17 changes: 12 additions & 5 deletions Exec/SquallLine_2D/inputs_moisture
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ amr.max_level = 0 # maximum level number allowed
# CHECKPOINT FILES
amr.check_file = chk # root name of checkpoint file
amr.check_int = 1000 # number of timesteps between checkpoints
#amr.restart = chk12000
#amr.restart = chk09000

# PLOTFILES
erf.plot_file_1 = plt # root name of plotfile
Expand All @@ -70,7 +70,7 @@ erf.molec_diff_type = "ConstantAlpha"
erf.rho0_trans = 1.0 # [kg/m^3], used to convert input diffusivities
erf.dynamicViscosity = 200.0 # [kg/(m-s)] ==> nu = 75.0 m^2/s
erf.alpha_T = 00.0 # [m^2/s]
erf.alpha_C = 50.0
erf.alpha_C = 25.0

erf.moisture_model = "Kessler"
erf.use_moist_background = true
Expand All @@ -79,6 +79,13 @@ erf.moistscal_horiz_adv_string = "Centered_2nd"
erf.moistscal_vert_adv_string = "Centered_2nd"

# PROBLEM PARAMETERS (optional)
prob.T_0 = 300.0
prob.U_0 = 0
prob.T_pert = 3
prob.z_tr = 12000.0
prob.height = 1200.0
prob.theta_0 = 300.0
prob.theta_tr = 343.0
prob.T_tr = 213.0
prob.x_c = 0.0
prob.z_c = 1500.0
prob.x_r = 4000.0
prob.z_r = 1500.0
prob.theta_c = 3.0
86 changes: 0 additions & 86 deletions Exec/SquallLine_2D/inputs_moisture_outflow

This file was deleted.

63 changes: 53 additions & 10 deletions Exec/SquallLine_2D/prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@
#include "TileNoZ.H"

struct ProbParm : ProbParmDefaults {
amrex::Real T_0 = 300.0; // surface temperature == mean potential temperature
amrex::Real U_0 = 10.0;
amrex::Real V_0 = 0.0;
amrex::Real x_c = 0.0; // center of thermal perturbation
amrex::Real z_c = 3200.0;
amrex::Real x_r = 1000.0;
amrex::Real z_r = 1000.0;
amrex::Real T_pert = 5.0; // perturbation temperature
// overridden physical constants
amrex::Real z_tr = 12000.0;
amrex::Real height = 1200.0;
amrex::Real theta_0 = 300.0;
amrex::Real theta_tr = 343.0;
amrex::Real T_tr = 213.0;

amrex::Real x_c = 0.0;
amrex::Real z_c = 1.5e3;
amrex::Real x_r = 4.0e3;
amrex::Real z_r = 1.5e3;
amrex::Real theta_c = 3.0;

amrex::Real C_p = 1004.0;
amrex::Real Theta_0 = 300.0;
}; // namespace ProbParm


Expand Down Expand Up @@ -63,7 +67,6 @@ public:

void erf_init_dens_hse_moist (amrex::MultiFab& rho_hse,
std::unique_ptr<amrex::MultiFab>& z_phys_nd,
std::unique_ptr<amrex::MultiFab>& z_phys_cc,
amrex::Geometry const& geom) override;

void init_custom_terrain (
Expand All @@ -79,6 +82,46 @@ public:
amrex::Vector<amrex::Real>& thetabar,
amrex::Geometry const& geom) override;

amrex::Real compute_theta (amrex::Real z);

amrex::Real compute_p_k (amrex::Real& p_k,
const amrex::Real p_k_minus_1,
amrex::Real& theta_k,
amrex::Real& rho_k,
amrex::Real& q_v_k,
amrex::Real& T_dp,
amrex::Real& T_b,
const amrex::Real dz,
const amrex::Real z,
const amrex::Real rho_k_minus_1);

amrex::Real compute_F (const amrex::Real& p_k,
const amrex::Real& p_k_minus_1,
amrex::Real &theta_k,
amrex::Real& rho_k,
amrex::Real& q_v_k,
amrex::Real& T_dp,
amrex::Real& T_b,
const amrex::Real& dz,
const amrex::Real& z,
const amrex::Real& rho_k_minus_1);

void compute_rho (const amrex::Real& z,
const amrex::Real& pressure,
amrex::Real &theta,
amrex::Real& rho,
amrex::Real& q_v,
amrex::Real& T_dp,
amrex::Real& T_b);

void init_isentropic_hse_no_terrain(amrex::Real *theta,
amrex::Real* r,
amrex::Real* p,
amrex::Real *q_v,
const amrex::Real& dz,
const amrex::Real& prob_lo_z,
const int& khi);

protected:
std::string name () override { return "Supercell"; }

Expand Down
Loading

0 comments on commit 3d1f450

Please sign in to comment.