-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new aci and aerosol activation metrics from ARM Diags v3 #679
Changes from 9 commits
d4df19f
b005733
b0b0f90
25a9402
c7cbd32
4fc8b3c
a438eca
f5128a8
227561f
dde1ef7
ab041b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
from cdms2.fvariable import FileVariable | ||
|
||
AVOGADOR_CONS = 6.022e23 | ||
AIR_DENS = 1.225 # standard air density 1.225kg/m3 | ||
|
||
|
||
def rename(new_name): | ||
|
@@ -147,7 +148,23 @@ def molec_convert_units(var, molar_weight): | |
# Convert molec/cm2/s to kg/m2/s | ||
if var.units == "molec/cm2/s": | ||
var = var / AVOGADOR_CONS * molar_weight * 10.0 | ||
var.units == "kg/m2/s" | ||
var.units = "kg/m2/s" | ||
return var | ||
|
||
|
||
def a_num_sum(var): | ||
# Calculate: total aerosol number concentration (#/cm3) | ||
var = var * AIR_DENS / 1e6 | ||
var.units = "/cm3" | ||
var.long_name = "aerosol number concentration" | ||
return var | ||
|
||
|
||
def so4_mass_sum(var): | ||
# Calculate: SO4 mass conc. (ng/m3) (< 1um) | ||
var = var * AIR_DENS * 1e9 | ||
var.units = "\u03bcg/m3" | ||
var.long_name = "SO4 mass conc." | ||
return var | ||
|
||
|
||
|
@@ -1742,6 +1759,56 @@ def cosp_histogram_standardize(cld: "FileVariable"): | |
(("Mass_pom",), rename), | ||
] | ||
), | ||
# total aerosol number concentration (#/CC) | ||
"a_num": OrderedDict( | ||
[ | ||
(("cpc",), rename), | ||
# Aerosol concentration from Aitken, Accumu., and Coarse mode | ||
( | ||
( | ||
"num_a1", | ||
"num_a2", | ||
"num_a3", | ||
), | ||
lambda a1, a2, a3: a_num_sum(a1 + a2 + a3), | ||
), | ||
] | ||
), | ||
# total so4 mass concentration (ng/m3) | ||
"so4_mass": OrderedDict( | ||
[ | ||
(("sulfate",), rename), | ||
# Aerosol concentration from Aitken, Accumu., and Coarse mode | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: this only takes Aitken and Accumu. mode. remove Coarse in the comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lannyzxj Cheng and I are working on clearing up some documentation in preparation for E3SM Tutorial. When working on ARM Diags, I noticed that when computing so4 mass concentration, only Aitken and Accumu. mode are taking account. Could you remind me why is the case? Is it to make the model data comparable to obs? |
||
( | ||
( | ||
"so4_a1", | ||
"so4_a2", | ||
), | ||
lambda a1, a2: so4_mass_sum(a1 + a2), | ||
), | ||
] | ||
), | ||
# CCN 0.1%SS concentration (1/CC) | ||
"ccn01": OrderedDict( | ||
[ | ||
(("ccn01",), rename), | ||
(("CCN3",), rename), | ||
] | ||
), | ||
# CCN 0.2%SS concentration (1/CC) | ||
"ccn02": OrderedDict( | ||
[ | ||
(("ccn02",), rename), | ||
(("CCN4",), rename), | ||
] | ||
), | ||
# CCN 0.5%SS concentration (1/CC) | ||
"ccn05": OrderedDict( | ||
[ | ||
(("ccn05",), rename), | ||
(("CCN5",), rename), | ||
] | ||
), | ||
# Land variables | ||
"SOILWATER_10CM": OrderedDict([(("mrsos",), rename)]), | ||
"SOILWATER_SUM": OrderedDict([(("mrso",), rename)]), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lannyzxj Xiaojian,this formula converts so4 mass conc. from (kg/kg) to ug/m3 which gives comparable results to models. But in your version, the results are in ug/cm3. I might get something wrong here..would you help me double check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear Dr. Zhang @chengzhuzhang ,
Thanks for letting me know. I have cross-compared your plots and mine offline, the plots look good.
My units are also ug/m3 for the sulfate output in my plot, which looks comparable to yours.
I double-checked my processing code for the model so4,
it was first converted to ng/m3 after reading the data:
"
iso4_Acc_tmp= iso4_Acc_tmp * 1e12 * 1.225 #kg/kg to ng/kg then to ng/m3
"
and then further divided by 1000 in order to convert to ug/m3 in the data output part of the code:
"
#SO4
ivar=np.reshape(so4_all,(numday*24),order='C')
ivar=ivar/1000. #convert to ug/m3
Mvar=MV2.masked_array(ivar,mask=[np.isnan(ivar)],fill_value=-9999.)
Mvar.id="sulfate"
Mvar.long_name='Sulfate (<1um) Mass Conc.'
Mvar.units='ug/m3'
Mvar.missing_value=-9999.
Mvar.setAxis(0,hrtime_axes)
fout.write(Mvar)
"
The above processes should be equivalent to your "var = var * AIR_DENS * 1e9".
Would you point me to where my version states the unit as ug/cm3? That could be a typo in stating the unit, the actual calculation should indeed yield ug/m3.
Best,
Xiaojian
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your prompt reply! I missed the second units conversion step in your script when writing out files! It is good to know that our results are consistent.
I was looking at a version of ppt for ARM diags v3(for verification purpose), which includes aerosol diurnal cycle plots that has units in ug/cm3, which could be a typo. And I also confirmed that the ARM Diags standalone run provide the correct units!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know that! Thank you!