Skip to content

Verification of numerical quadrature in the calculation of gas-aerosol mass transfer rates

Test code can be found in the mam_refactor code repository under standalone/tests/gasaerexch/.

Test design

Tests are set up to verify the gas-aerosol mass transfer rates(uptake rates) in MAM. There are four methods to solve the uptake rate:

  • MAM’s method with beta assumption and Gauss-Hermite quadrature method.
  • Direct Gauss-Hermite quadrature method.
  • Riemann Sum (approximate area under curve with rectangles).
  • One quadrature point method: geometric mean diameter, number mean diameter, surface mean diameter or volume mean diameter.

The riemann sum method is treated as the reference method to solve the uptake rates. 6000 rectangles are used to calculate the integration. In the MAM method and direct quadrature method, 2, 4, 10 and 20 quadrature points are used to calculate the integration. The one quadrature point method directly uses a single approximated size to calculate instead of doing integration over the whole size distribution.

Test driver

The test driver file is skywalker_gasaerexch_uptkrates_1box1gas_4sub.F90 in the mam_refactor code repository, located under standalone/tests/gasaerexch/

All four method is implemented under core/modal_aero_gasaerexch.F90. Different methods can be used in MAM by calling different subroutines. The corresponding subroutines are shown as follow:

  • MAM’s method is implemented in the gas_aer_uptkrates_1box1gas subroutine. It is called in MAM by default.
  • Direct Gauss-Hermite quadrature method is implemented in the gas_aer_uptkrates_1box1gas_ghq_direct subroutine.
  • Riemann Sum is implemented in the gas_aer_uptkrates_1box1gas_rect subroutine.
  • One quadrature point method is implemented in the gas_aer_uptkrates_1box1gas_mean subroutine. The calculation of mean geometric, number, surface and volume diameter is in the mean_different_diameter subroutine.

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 under standalone/tests/mam_x_validation/gasaerexch/uptkrates_1box1gas_4sub.yaml
  • Different pressure, temperature and quadrature points are used to generate input ensembles. The distribution(\(\sigma\)) and the wet diameter of the aerosol are constant in the test. Details are below:

Input ensemble

Variable Range
Temperature(K) 180, 233, 273, 298
Pressure(Pa) 1000, 10000, 100000
Number of quadrature points(#) 2, 4, 10, 20

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.py.

Reference results

Figure 1 shows the relative error of uptake rates using MAM method(dark blue line), direct Guass-Hermite method(light blue line) and one quadrature method with geometric mean(green dot), number mean(yellow dot), surface mean(pink dot) and volume mean(red dot) diameter compared to riemann sum method using 6000 rectangles in the accumulation mode. X-axis denotes the number of Guass-Hermite quadrature points used in the calculation. Y-axis denotes the absolute relative error. The error bar denotes the error range with different temperature and pressure levels.

fig

Figure 1. Relative errors of uptake rates calculation using four methods
Back to top