Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions Code.v05-00/defaults/input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,11 @@ PARAMETER MENU:

# Temperature, RH, and wind shear can be overwritten if using meteorological input files
METEOROLOGICAL PARAMETERS SUBMENU:
# Can be overwritten if met file is passed
Temperature [K] (double): 217
# Can be overwritten if met file is passed
R.Hum. wrt water [%] (double): 63.94
# Pressure altitude at which the contrail is initialized
Pressure [hPa] (double): 265
Horiz. diff. coeff. [m^2/s] (double): 15.0
# Can be overwritten if met file is passed
Verti. diff. [m^2/s] (double): 0.15
Wind shear [1/s] (double): 0.002
Brunt-Vaisala Frequency [s^-1] (double): 0.013
LOCATION AND TIME SUBMENU:
# Affects for solar zenith angle and photolysis which affect EPM/diurnal variations of temperature
Expand Down Expand Up @@ -157,31 +152,6 @@ METEOROLOGY MENU:
Init vert. veloc. from met. data (T/F): T
Vert. veloc. time series input (T/F): F
Interpolate vert. veloc. met. data (T/F): F
# Option to modify NWP RH data
HUMIDITY SCALING OPTIONS:
# For reference on humidity scaling option, see
# Teoh et al, "Aviation contrail climate effects in the North Atlantic from 2016 to 2021" (2022)
# Constant is a fixed value at initialization
Humidity modification scheme (none / constant / scaling): none
# "Overwrite initial RHi":
Constant RHi [%] (double): 110.0
Humidity scaling constant a (double): 0.9779
Humidity scaling constant b (double): 1.635


#- OR -------------------+
IMPOSE MOIST LAYER DEPTH SUBMENU:
# Sets constant RHi for the entire layer defined by Moist layer depth
Impose moist layer depth (T/F): F
Moist layer depth [m] (double): 1000
Subsaturated air RHi [%] (double): 80
#- OR -----------------+
IMPOSE LAPSE RATE SUBMENU:
# Sets constant lapse rate
Impose lapse rate (T/F): F
Lapse rate [K/m] (T/F): -6.0E-03
# ---END MET INPUT OPTIONS ---
Add diurnal variations (T/F): F

# Perturbations to the temperature field can be added to the contrail simulation to account for some effects of
# atmospheric turbulence and gravity waves.
Expand Down
30 changes: 0 additions & 30 deletions Code.v05-00/include/Defaults/Input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,11 @@ PARAMETER MENU:

# Temperature, RH, and wind shear can be overwritten if using meteorological input files
METEOROLOGICAL PARAMETERS SUBMENU:
# Can be overwritten if met file is passed
Temperature [K] (double): 217
# Can be overwritten if met file is passed
R.Hum. wrt water [%] (double): 63.94
# Pressure altitude at which the contrail is initialized
Pressure [hPa] (double): 265
Horiz. diff. coeff. [m^2/s] (double): 15.0
# Can be overwritten if met file is passed
Verti. diff. [m^2/s] (double): 0.15
Wind shear [1/s] (double): 0.002
Brunt-Vaisala Frequency [s^-1] (double): 0.013
LOCATION AND TIME SUBMENU:
# Affects for solar zenith angle and photolysis which affect EPM/diurnal variations of temperature
Expand Down Expand Up @@ -158,31 +153,6 @@ METEOROLOGY MENU:
Init vert. veloc. from met. data (T/F): T
Vert. veloc. time series input (T/F): F
Interpolate vert. veloc. met. data (T/F): F
# Option to modify NWP RH data
HUMIDITY SCALING OPTIONS:
# For reference on humidity scaling option, see
# Teoh et al, "Aviation contrail climate effects in the North Atlantic from 2016 to 2021" (2022)
# Constant is a fixed value at initialization
Humidity modification scheme (none / constant / scaling): none
# "Overwrite initial RHi":
Constant RHi [%] (double): 110.0
Humidity scaling constant a (double): 0.9779
Humidity scaling constant b (double): 1.635


#- OR -------------------+
IMPOSE MOIST LAYER DEPTH SUBMENU:
# Sets constant RHi for the entire layer defined by Moist layer depth
Impose moist layer depth (T/F): F
Moist layer depth [m] (double): 1000
Subsaturated air RHi [%] (double): 80
#- OR -----------------+
IMPOSE LAPSE RATE SUBMENU:
# Sets constant lapse rate
Impose lapse rate (T/F): F
Lapse rate [K/m] (T/F): -6.0E-03
# ---END MET INPUT OPTIONS ---
Add diurnal variations (T/F): F

# Perturbations to the temperature field can be added to the contrail simulation to account for some effects of
# atmospheric turbulence and gravity waves.
Expand Down
18 changes: 0 additions & 18 deletions Code.v05-00/tests/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ PARAMETER MENU:
# : for MC runs where it should be 200 240 or 200:240)
Plume Process [hr] (double): 24
METEOROLOGICAL PARAMETERS SUBMENU:
Temperature [K] (double): 215:5:225
R.Hum. wrt water [%] (double): 43.9432
Pressure [hPa] (double): 220 230 240
Horiz. diff. coeff. [m^2/s] (double): 15.0
Verti. diff. [m^2/s] (double): 0.15
Wind shear [1/s] (double): 0.002
Brunt-Vaisala Frequency [s^-1] (double): 0.013
LOCATION AND TIME SUBMENU:
LON [deg] (double): -15
Expand Down Expand Up @@ -107,21 +104,6 @@ METEOROLOGY MENU:
Init vert. veloc. from met. data (T/F): T
Vert. veloc. time series input (T/F): T
Interpolate vert. veloc. met. data (T/F): T
HUMIDITY SCALING OPTIONS:
Humidity modification scheme (none / constant / scaling): none
Constant RHi [%] (double): 110.0
Humidity scaling constant a (double): 0.9779
Humidity scaling constant b (double): 1.635
#- OR -------------------+
IMPOSE MOIST LAYER DEPTH SUBMENU:
Impose moist layer depth (T/F): T
Moist layer depth [m] (double): 200
Subsaturated air RHi [%] (double): 80
#--- OR -----------------+
IMPOSE LAPSE RATE SUBMENU:
Impose lapse rate (T/F): T
Lapse rate [K/m] (T/F): -6.0E-03
Add diurnal variations (T/F): T
TEMPERATURE PERTURBATION SUBMENU:
Enable Temp. Pert. (T/F): T
Temp. Perturb. Amplitude (double): 2.0
Expand Down
18 changes: 0 additions & 18 deletions Code.v05-00/tests/test1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ PARAMETER MENU:
# : for MC runs where it should be 200 240 or 200:240)
Plume Process [hr] (double): 24
METEOROLOGICAL PARAMETERS SUBMENU:
Temperature [K] (double): 215:5:225
R.Hum. wrt water [%] (double): 43.9432
Pressure [hPa] (double): 220 230 240
Verti. diff. [m^2/s] (double): 0.15
Wind shear [1/s] (double): 0.002
Brunt-Vaisala Frequency [s^-1] (double): 0.013
LOCATION AND TIME SUBMENU:
LON [deg] (double): -15
Expand Down Expand Up @@ -107,21 +104,6 @@ METEOROLOGY MENU:
Init vert. veloc. from met. data (T/F): T
Vert. veloc. time series input (T/F): T
Interpolate vert. veloc. met. data (T/F): T
HUMIDITY SCALING OPTIONS:
Humidity modification scheme (none / constant / scaling): none
Constant RHi [%] (double): 110.0
Humidity scaling constant a (double): 0.9779
Humidity scaling constant b (double): 1.635
#- OR -------------------+
IMPOSE MOIST LAYER DEPTH SUBMENU:
Impose moist layer depth (T/F): T
Moist layer depth [m] (double): 200
Subsaturated air RHi [%] (double): 80
#--- OR -----------------+
IMPOSE LAPSE RATE SUBMENU:
Impose lapse rate (T/F): F
Lapse rate [K/m] (T/F): -6.0E-03
Add diurnal variations (T/F): T
TEMPERATURE PERTURBATION SUBMENU:
Enable Temp. Pert. (T/F): F
Temp. Perturb. Amplitude (double): 1.0
Expand Down
6 changes: 3 additions & 3 deletions Code.v05-00/tests/test_adv_diff_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ namespace FVM_ANDS{
// Solution: f(x,y,t) = exp(-t) * sin(pi*x) * sin(2*pi*y)

double u = 0, v = 0, shear = 0, Dh = 1.0, Dv = 1.0, xlim_left = 0.1, xlim_right = 0.8, ylim_bot = 0.2, ylim_top = 0.9;
int nx = 100, ny = 100;
int nx = 50, ny = 50;
// double dx = 1.0/nx;
// double dy = 1.0/ny;
//double dt = 0.24 * std::min( (dx*dx) / (2*Dh) , (dy*dy) / (2*Dv));
Expand All @@ -312,7 +312,7 @@ namespace FVM_ANDS{
FVM_Solver solver(params, mesh.x(), mesh.y(), bc, exact, false, 1000 , 1e-5);
//the convergence on this problem really sucks without ILUT precond
//Problem is, ILUT is way too expensive to use in APCEMM as a default. Maybe the code can be templated later to allow for customizability.
double t = 0, t_max = 3;
double t = 0, t_max = 1.5;
int n_timesteps = t_max/dt;
for(int i = 0; i < n_timesteps; i++){
t = dt*(i + 1);
Expand Down Expand Up @@ -404,7 +404,7 @@ namespace FVM_ANDS{
x(t) = 0.5 + \int u(t) dt
= 0.5 + u0t - shear * (y0*t + v0/2 t^2)
*/
int nx = 500, ny = 500;
int nx = 200, ny = 200;
double dx = 1.0/nx;
double dy = 1.0/ny;
double dt = 1;
Expand Down
6 changes: 2 additions & 4 deletions Code.v05-00/tests/test_yamlreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,6 @@ TEST_CASE("Read Yaml File"){
REQUIRE(input.MET_TEMP_PERTURB_AMPLITUDE == 2.0);
REQUIRE(input.MET_TEMP_PERTURB_TIMESCALE == 10);


REQUIRE(error == "Cannot fix both moist layer depth and lapse rate");
}
SECTION("Read Diagnostic Menu"){
OptInput input;
Expand Down Expand Up @@ -390,7 +388,7 @@ TEST_CASE("Generate Input Objects"){
OptInput input;
YamlInputReader::readYamlInputFiles(input, {filename});
vector<std::unordered_map<string,double>> cases = generateCases(input);
REQUIRE(cases.size() == 18);
REQUIRE(cases.size() == 6);
Input caseInput = Input(0, cases, "", "", "", "", "");
REQUIRE(caseInput.simulationTime() == 24);
REQUIRE(caseInput.pressure_Pa() == 22000);
Expand Down Expand Up @@ -428,7 +426,7 @@ TEST_CASE("Merge Input Files"){
OptInput input;
YamlInputReader::readYamlInputFiles(input, {filename1, filename2});
vector<std::unordered_map<string,double>> cases = generateCases(input);
REQUIRE(cases.size() == 18);
REQUIRE(cases.size() == 6);
Input caseInput = Input(0, cases, "", "", "", "", "");
REQUIRE(caseInput.simulationTime() == 24);
REQUIRE(caseInput.pressure_Pa() == 32000);
Expand Down