I think the 1D Aerosol object used in the EPM for soot and SO4 has unit problem in the Aerosol::Coagulate function:
My understanding of the code is that the Aerosol.pdf represents dn/d(ln(r)), however it seems like it is used incorrectly when computing the volume of aerosol per bin:
|
{ |
|
v[iBin] = pdf[iBin] * bin_VCenters[iBin] * 1.0E+06; |
|
/* Unit check: |
|
* [#/cm^3] * [m^3] * [cm^3/m^3] = [cm^3/cm^3] */ |
|
} |
v is supposed to hold the volume concentration per bin which we should get by multiplying the number of particles per bin by the mean volume of a particle in that bin. However the code above does not convert the pdf to a number of particles, it is instead still dn/d(ln(r)).
The Grid_Aerosol version of this calculation is done in Grid_Aerosol::Volume() called by Grid_Aerosol::Coagulate. Looking at that version it correctly multiplies the pdf by the bin size to recover the number of particles:
|
for (iBin = 0; iBin < nBin; iBin++) |
|
{ |
|
ratio = log(bin_Edges[iBin + 1] / bin_Edges[iBin]); |
|
for (jNy = 0; jNy < Ny; jNy++) |
|
{ |
|
for (iNx = 0; iNx < Nx; iNx++) |
|
{ |
|
volume[iBin][jNy][iNx] = ratio * bin_VCenters[iBin][jNy][iNx] * |
|
pdf[iBin][jNy][iNx]; |
|
/* Unit check: [m^3] * \ |
|
* [#/cm^3] \ |
|
* = [m^3/cm^3] */ |
The log difference is instead simplified to a log(ratio) here but the calculation is mathematically the same. There is a test on this function that does not catch it so we should also investigate that.
Not 100% sure about this so I need someone else's eyes on this. @sdeastham @marcoslogrono
I think the 1D
Aerosolobject used in the EPM for soot and SO4 has unit problem in the Aerosol::Coagulate function:My understanding of the code is that the
Aerosol.pdfrepresents dn/d(ln(r)), however it seems like it is used incorrectly when computing the volume of aerosol per bin:APCEMM/Code.v05-00/src/AIM/Aerosol.cpp
Lines 170 to 174 in adf714b
vis supposed to hold the volume concentration per bin which we should get by multiplying the number of particles per bin by the mean volume of a particle in that bin. However the code above does not convert the pdf to a number of particles, it is instead still dn/d(ln(r)).The
Grid_Aerosolversion of this calculation is done inGrid_Aerosol::Volume()called byGrid_Aerosol::Coagulate. Looking at that version it correctly multiplies the pdf by the bin size to recover the number of particles:APCEMM/Code.v05-00/src/AIM/Aerosol.cpp
Lines 1244 to 1255 in adf714b
The log difference is instead simplified to a log(ratio) here but the calculation is mathematically the same. There is a test on this function that does not catch it so we should also investigate that.
Not 100% sure about this so I need someone else's eyes on this. @sdeastham @marcoslogrono