Verification of time integration for non-volatile species¶
Time convergence test of the calculation of sulfuric acid gas and sulfate aerosol.
Test code can be found in the mam_refactor
code repository
under
standalone/tests/gasaerexch/
.
Test design¶
Tests are set up to verify the convergence of sulfuric acid gas and sulfate aerosol in MAM for the following aspect:
-
In MAM, the analytical solution is used to solve the governing equation of sulfuric acid gas condensation, which can be machine precision with constant uptake rate.
-
With updated uptake rate for each timestep, first order convergence is expected for the linearized equations.
Test driver¶
The test driver file is skywalker_gasaerexch_timestep.F90
and skywalker_gasaerexch_timestep_update.F90
in the mam_refactor code repository, located under standalone/tests/gasaerexch/
The time integration of sulfuric acid gas and sulfate aerosol is implemented under core/modal_aero_gasaerexch.F90
mam_gasaerexch_1subarea_1gas_nonvolatile
subroutine. Because the non-volatile species and semi-volatile species are calculated seperatedly in the mam_gasaerexch_1subarea
subroutine and uptake rate need to be derived before the time integration, tests are conducted on the mam_gasaerexch_1subarea
subroutine.
Two sets of tests are conducted to verify the time convergence of sulfuric acid gas and sulfate aerosol.
- In
skywalker_gasaerexch_timestep.F90
test driver, we test on case where uptake rate remains constant for each timestep. - In
skywalker_gasaerexch_timestep_update.F90
test driver, we test on case where dry diameter of aerosol is updated according to the current aerosol concentration, namely uptake rate is updated every timestep as the uptake rate calculation depends on aerosol size.
Input parameters¶
-
Input parameters are specified using YAML files stored in the
mam_x_validation
repository. The YAML files are imported to each clone of the mam_refactor repository as part of a submodule. The YAML files for the tests described on this page are located understandalone/tests/mam_x_validation/gasaerexch/gasaerexch_timeconvergence.yaml
andstandalone/tests/mam_x_validation/gasaerexch/gasaerexch_timeconvergence_update.yaml
-
Different pressure, temperature and timesteps are used to generate input ensembles. Details are below:
Input ensemble
Variable | Range |
---|---|
Temperature(K) | 180, 200, 233, 273, 298 |
Pressure(Pa) | 1000, 100000 |
Timestep(s) | 0.1, 1, 2, 4, 10, 50, 100, 300, 900, 1800 |
- Because the \(H_{2}SO_{4}\) will deplete within 30min simulation time. A production rate of 10 ppb/timestep \(H_{2}SO_{4}\) gas is assigned in the test to ensure the consistent production of sulfate aerosols from H_{2}SO_{4}$ condensation. Time series plot of \(H_{2}SO_{4}\) and sulfate aerosol without(Figure S1) and with(Figure S2) \(H_{2}SO_{4}\) gas production are shown here.
Test output¶
After executing the verification tests, the output data and plots can be found in your build directory under standalone/tests/gasaerexch/
.
The plots are generated using the script standalone/tests/mam_x_validation/gasaerexch/plot_gasaerexch_timestep.py
and standalone/tests/mam_x_validation/gasaerexch/plot_gasaerexch_timestep_update.py
.
Reference results¶
Figure 1 shows the result of time convergence test for \(H_{2}SO_{4}\) and sulfate aerosol. X-axis denotes the timestep and y-axis is the relative error. Both \(H_{2}SO_{4}\) and sulfate aerosol show machine precision at varied timestep, which matches the feature of analytical solution to the linearized equation with constant coefficient (uptake rate).
Figure 2 shows the time scale of \(H_{2}SO_{4}\) and sulfate aerosol condensation. E-folding time of uptake process is short (on the order of seconds) at different temperature and pressure levels, except for the coarse mode.
Figure 3 shows the test results with dynamic dry diameter update at each timestep. The regression slopes are 1.05 and 1.05 for \(H_{2}SO_{4}\) and sulfate aerosol correspondingly at dt = 1s, 2s, 4s and 10s.
Future work
It is worth revisiting MAM’s time integration method for condensation with dynamic wet diameter update at each timestep.
Supplement Figures¶