Skip to content
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 pH diagnostics for mozart_mosaic_4bin_aq chemistry option #999

Closed
wants to merge 2 commits into from

Conversation

stacywalters
Copy link
Contributor

@stacywalters stacywalters commented Oct 23, 2019

TYPE: new feature

KEYWORDS: pH, cloud water, aerosols, mozart_mosaic_4bin_aq

SOURCE: Mary Barth (ACOM/MMM NCAR)

DESCRIPTION OF CHANGES:

  1. Alter Registry/registry.chem to include diagnostic pH variables ph_cw, ph_aer01, ph_aer02,
    ph_aer03, and ph_aer04.
  2. Modify files, listed below, to calculate and set pH diagnostic variables

MOZART is a gas-phase chemistry mechanism (set of reactions) in WRF-Chem

MOSAIC is one of the aerosol models in WRF-Chem that represents the size distribution
of the aerosols with 4 size bins (hence "4bin")

The pH is calculated for each of the 4 aerosol size bins. That is why there are 4 variables: pH_aer1,
aer2, aer3, aer4.

pH is a diagnostic variable and is calculated as part of the aerosol model. However what we added
was the ability to write out the field to the history file. It is by default turned off as an output field,
but can be "turned on" using the iofields.txt file.

There is also cloud water pH (pH_CW) which is calculated as part of the cloud chemistry routine.
Same thing as aerosol pH, by default it is not an output field, but can be included in history files
via iofields.txt.

For pretty pictures and a description of what we learned, feel free to look at the report for the
ACOM lab: https://nar.ucar.edu/2019/acom/predicting-acidity-aerosols-and-cloud-water.

Sample:
Screen Shot 2019-10-24 at 1 50 33 PM

LIST OF MODIFIED FILES:
Registry/registry.chem
chem/chem_driver.F
chem/cloudchem_driver.F
chem/module_mosaic_cloudchem.F
chem/aerosol_driver.F
chem/module_mosaic_driver.F
chem/module_mosaic_therm.F
chem/module_chem_cup.F

TESTS CONDUCTED:

  1. Small GNU-only WTF on MMM classroom machines (status=0 means bit-for-bit)
Thu Oct 24 09:23:40 MDT 2019
SUCCESS_RUN_WRF_d01_em_real_32_em_real_03FD vs SUCCESS_RUN_WRF_d01_em_real_33_em_real_03FD status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_03FD vs SUCCESS_RUN_WRF_d01_em_real_34_em_real_03FD status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_10 vs SUCCESS_RUN_WRF_d01_em_real_33_em_real_10 status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_10 vs SUCCESS_RUN_WRF_d01_em_real_34_em_real_10 status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_11 vs SUCCESS_RUN_WRF_d01_em_real_33_em_real_11 status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_11 vs SUCCESS_RUN_WRF_d01_em_real_34_em_real_11 status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_20NE vs SUCCESS_RUN_WRF_d01_em_real_33_em_real_20NE status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_20NE vs SUCCESS_RUN_WRF_d01_em_real_34_em_real_20NE status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_conus vs SUCCESS_RUN_WRF_d01_em_real_33_em_real_conus status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_conus vs SUCCESS_RUN_WRF_d01_em_real_34_em_real_conus status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_tropical vs SUCCESS_RUN_WRF_d01_em_real_33_em_real_tropical status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_real_tropical vs SUCCESS_RUN_WRF_d01_em_real_34_em_real_tropical status = 0
SUCCESS_RUN_WRF_d01_nmm_real_32_nmm_nest_01 vs SUCCESS_RUN_WRF_d01_nmm_real_34_nmm_nest_01 status = 0
SUCCESS_RUN_WRF_d01_nmm_real_32_nmm_nest_03 vs SUCCESS_RUN_WRF_d01_nmm_real_34_nmm_nest_03 status = 0
SUCCESS_RUN_WRF_d01_nmm_real_32_nmm_nest_04a vs SUCCESS_RUN_WRF_d01_nmm_real_34_nmm_nest_04a status = 0
SUCCESS_RUN_WRF_d01_nmm_real_32_nmm_nest_06 vs SUCCESS_RUN_WRF_d01_nmm_real_34_nmm_nest_06 status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_chem_1 vs SUCCESS_RUN_WRF_d01_em_real_34_em_chem_1 status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_chem_2 vs SUCCESS_RUN_WRF_d01_em_real_34_em_chem_2 status = 0
SUCCESS_RUN_WRF_d01_em_real_32_em_chem_5 vs SUCCESS_RUN_WRF_d01_em_real_34_em_chem_5 status = 0

@stacywalters stacywalters requested a review from a team as a code owner October 23, 2019 20:37
@stacywalters stacywalters changed the title Stacy Add pH diagnostics for mozart_mosaic_4bin_aq chemistry option Oct 23, 2019
@davegill
Copy link
Contributor

@stacywalters
Stacy,
The purpose of the regression test is to make sure that we have not broken anything. We also want a "postive" test. Generate a few plots to show the pH diagnostics, and include that in the commit message.

@@ -20,6 +20,12 @@ state real QC_B4MP ikj misc 1 - - "Q
state real QI_B4MP ikj misc 1 - - "QI_B4MP" "CLOUD ICE BEFORE MICROPHYSICS" "kg kg-1"
state real QS_B4MP ikj misc 1 - - "QS_B4MP" "SNOW BEFORE MICROPHYSICS" "kg kg-1"

state real ph_cw ikj misc 1 - - "ph_cw" "pH of cloud water" "unitless"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stacy,
If these diagnostics are only to be activated when a specific namelist option is selected, these should all be in a package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ravanah @kayeekayee
If this is indeed an optional diagnostic, then the namelist option that activates the pH for Mozart should be used for a package for the ph_cw, ph_aer01 through 04.

@@ -135,6 +135,7 @@ subroutine mosaic_aerchem_driver( &
id, curr_secs, ktau, dtstep, ktauc, dtstepc, config_flags, &
t_phy, rho_phy, p_phy, &
moist, chem, vbs_nbin, &
ph_aer01, ph_aer02, ph_aer03, ph_aer04, &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stacy,
Line these up

@davegill
Copy link
Contributor

@stacywalters
Stacy,
For the benefit of the non-Chem people ...
Would you please add a few sentences in the description concerning

  1. why there are 4 new fields
  2. what is "in" aer1, 2, 3, 4
  3. brief explanation of what the mozart, mosaic, 4bin pieces all mean
  4. is there a way to turn this off?

@davegill
Copy link
Contributor

@stacywalters
Stacy,
I have incorporated Mary's text in the PR. Thanks!

@stacywalters
Copy link
Contributor Author

stacywalters commented Oct 24, 2019 via email

Copy link
Contributor

@ravanah ravanah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the packaging of the arrays done as suggested by Dave?

@jordanschnell
Copy link
Contributor

@stacywalters - Can you package the ph_* diagnostics as suggested by the others?

trigger jenkins
jordanschnell added a commit to jordanschnell/WRF that referenced this pull request Dec 22, 2020
KEYWORDS: pH, cloud water, aerosols, mozart_mosaic_4bin_aq

SOURCE: Mary Barth (ACOM/MMM NCAR) and Stacy Walters (formerly NCAR)

DESCRIPTION OF CHANGES:

Originally submitted as PR wrf-model#999, but was resubmitted due to inconsistencies

Alter Registry/registry.chem to include diagnostic pH variables ph_cw, ph_aer01, ph_aer02,
ph_aer03, and ph_aer04.
Modify files, listed below, to calculate and set pH diagnostic variables
MOZART is a gas-phase chemistry mechanism (set of reactions) in WRF-Chem
Diagnostics are activated with namelist,chem option mozart_ph_diag=1

MOSAIC is one of the aerosol models in WRF-Chem that represents the size distribution
of the aerosols with 4 size bins (hence "4bin")

The pH is calculated for each of the 4 aerosol size bins. That is why there are 4 variables: pH_aer1,
aer2, aer3, aer4.

pH is a diagnostic variable and is calculated as part of the aerosol model. However what we added
was the ability to write out the field to the history file. It is by default turned off as an output field,
but can be "turned on" using the iofields.txt file.

There is also cloud water pH (pH_CW) which is calculated as part of the cloud chemistry routine.
Same thing as aerosol pH, by default it is not an output field, but can be included in history files
via iofields.txt.

For pretty pictures and a description of what we learned, feel free to look at the report for the
ACOM lab: https://nar.ucar.edu/2019/acom/predicting-acidity-aerosols-and-cloud-water.

LIST OF MODIFIED FILES:
Registry/registry.chem
chem/chem_driver.F
chem/cloudchem_driver.F
chem/module_mosaic_cloudchem.F
chem/aerosol_driver.F
chem/module_mosaic_driver.F
chem/module_mosaic_therm.F
chem/module_chem_cup.F
jordanschnell added a commit that referenced this pull request Feb 9, 2021
KEYWORDS: pH, cloud water, aerosols, mozart_mosaic_4bin_aq

SOURCE: Mary Barth (ACOM/MMM NCAR) and Stacy Walters (formerly NCAR)

DESCRIPTION OF CHANGES:

Originally submitted as PR #999, but was resubmitted due to inconsistencies

Alter Registry/registry.chem to include diagnostic pH variables ph_cw, ph_aer01, ph_aer02,
ph_aer03, and ph_aer04.
Modify files, listed below, to calculate and set pH diagnostic variables
MOZART is a gas-phase chemistry mechanism (set of reactions) in WRF-Chem

Diagnostics are activated with namelist,chem option mozart_ph_diag=1

MOSAIC is one of the aerosol models in WRF-Chem that represents the size distribution
of the aerosols with 4 size bins (hence "4bin")

The pH is calculated for each of the 4 aerosol size bins. That is why there are 4 variables: pH_aer1,
aer2, aer3, aer4.

pH is a diagnostic variable and is calculated as part of the aerosol model. However what we added
was the ability to write out the field to the history file. It is by default turned off as an output field,
but can be "turned on" using the iofields.txt file.

There is also cloud water pH (pH_CW) which is calculated as part of the cloud chemistry routine.
Same thing as aerosol pH, by default it is not an output field, but can be included in history files
via iofields.txt.

For pretty pictures and a description of what we learned, feel free to look at the report for the
ACOM lab: https://nar.ucar.edu/2019/acom/predicting-acidity-aerosols-and-cloud-water.

LIST OF MODIFIED FILES:
Registry/registry.chem
chem/chem_driver.F
chem/cloudchem_driver.F
chem/module_mosaic_cloudchem.F
chem/aerosol_driver.F
chem/module_mosaic_driver.F
chem/module_mosaic_therm.F
chem/module_chem_cup.F
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
KEYWORDS: pH, cloud water, aerosols, mozart_mosaic_4bin_aq

SOURCE: Mary Barth (ACOM/MMM NCAR) and Stacy Walters (formerly NCAR)

DESCRIPTION OF CHANGES:

Originally submitted as PR wrf-model#999, but was resubmitted due to inconsistencies

Alter Registry/registry.chem to include diagnostic pH variables ph_cw, ph_aer01, ph_aer02,
ph_aer03, and ph_aer04.
Modify files, listed below, to calculate and set pH diagnostic variables
MOZART is a gas-phase chemistry mechanism (set of reactions) in WRF-Chem

Diagnostics are activated with namelist,chem option mozart_ph_diag=1

MOSAIC is one of the aerosol models in WRF-Chem that represents the size distribution
of the aerosols with 4 size bins (hence "4bin")

The pH is calculated for each of the 4 aerosol size bins. That is why there are 4 variables: pH_aer1,
aer2, aer3, aer4.

pH is a diagnostic variable and is calculated as part of the aerosol model. However what we added
was the ability to write out the field to the history file. It is by default turned off as an output field,
but can be "turned on" using the iofields.txt file.

There is also cloud water pH (pH_CW) which is calculated as part of the cloud chemistry routine.
Same thing as aerosol pH, by default it is not an output field, but can be included in history files
via iofields.txt.

For pretty pictures and a description of what we learned, feel free to look at the report for the
ACOM lab: https://nar.ucar.edu/2019/acom/predicting-acidity-aerosols-and-cloud-water.

LIST OF MODIFIED FILES:
Registry/registry.chem
chem/chem_driver.F
chem/cloudchem_driver.F
chem/module_mosaic_cloudchem.F
chem/aerosol_driver.F
chem/module_mosaic_driver.F
chem/module_mosaic_therm.F
chem/module_chem_cup.F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants