Skip to content

Moving smoke aerosol emissions for Thompson AA scheme into separate module#1715

Merged
weiwangncar merged 5 commits intowrf-model:release-v4.4from
twjuliano:add_fire_emit_module
Apr 22, 2022
Merged

Moving smoke aerosol emissions for Thompson AA scheme into separate module#1715
weiwangncar merged 5 commits intowrf-model:release-v4.4from
twjuliano:add_fire_emit_module

Conversation

@twjuliano
Copy link
Contributor

@twjuliano twjuliano commented Apr 13, 2022

TYPE: enhancement

KEYWORDS: real, Thompson aerosol-aware, microphysics

SOURCE: Timothy W. Juliano (NCAR/RAL)

DESCRIPTION OF CHANGES:
This is an update to a previous PR #1616 that added biomass burning aerosol emissions for the Thompson AA scheme. In general, this PR cleans up the implementation of the biomass burning aerosol emissions.

In the current PR, two things occurred:

  1. As requested by Greg Thompson, the emissions of smoke aerosols are now self-contained in a module separate from the Thompson AA scheme. The module is called immediately after mp_gt_driver, inside of the microphysics driver.
  2. As requested, the 2D aerosol emissions are removed from io stream 4.

LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M phys/module_microphysics_driver.F
M phys/module_mp_thompson.F
M phys/Makefile
N phys/module_fire_emis.F
M share/module_check_a_mundo.F
M test/em_real/examples.namelist

TESTS CONDUCTED:

  1. Conducted two simulations: one before and one after the code changes. Results are bit-for-bit equivalent.
  2. Jenkins tests are all passing.

RELEASE NOTE: Biomass burning aerosol emissions for the Thompson Aerosol-Aware microphysics scheme are now self-contained in a separate module and called outside of the Thompson scheme.

@twjuliano twjuliano requested review from a team as code owners April 13, 2022 22:10
@twjuliano
Copy link
Contributor Author

@gthompsnWRF I would be grateful if you could please approve of the new code changes. Thanks!

@dudhia
Copy link
Collaborator

dudhia commented Apr 14, 2022

Tests have not passed. Needs checking.

@twjuliano
Copy link
Contributor Author

Tests have not passed. Needs checking.

@dudhia Is it possible to share more details? I see build 410 doesn't like the changes, but I am not able to see anything more. Thanks

@dudhia
Copy link
Collaborator

dudhia commented Apr 14, 2022 via email

@weiwangncar
Copy link
Collaborator

@twjuliano @dudhia The regression tests failed on two bit-for-bit comparison tests, which we've occasionally seen before. For some reason, some PRs trigger more test runs (for example, 158 vs 156 runs). And when these two additional runs are made, these failed comparison tests show up. This two failed comparison tests use WSM3 microphysics, so it is unlikely due to your code change. In fact I made a PR last night, and it passed all tests but with only 156 test runs. I also tested this particular namelist that failed comparison test on Cheyenne, it has no problem there. I'd wait and see if Greg has any suggestions for change, that would trigger another tests. We will see if you can get away from this or not. We've seen other PRs got away on second try.

@weiwangncar
Copy link
Collaborator

@gthompsnWRF We would really appreciate your input soon, as we are planning for the release next week.

gthompsnWRF
gthompsnWRF previously approved these changes Apr 18, 2022
Copy link
Contributor

@gthompsnWRF gthompsnWRF left a comment

Choose a reason for hiding this comment

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

Thanks Tim for refactoring the emissions stuff outside the MP scheme. It makes much more sense this way.

@weiwangncar
Copy link
Collaborator

@twjuliano Good news! This time the reg tests have passed. We are good to go!

@weiwangncar
Copy link
Collaborator

Jenkins tests have passed:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           58
Number of Simulations  : 158           156        0
Number of Comparisons  : 95           92        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

@twjuliano
Copy link
Contributor Author

Thanks Tim for refactoring the emissions stuff outside the MP scheme. It makes much more sense this way.

Thanks, @gthompsnWRF !

@twjuliano
Copy link
Contributor Author

@twjuliano Good news! This time the reg tests have passed. We are good to go!

@weiwangncar Great news! Thanks, Wei

weiwangncar
weiwangncar previously approved these changes Apr 18, 2022
Copy link
Collaborator

@weiwangncar weiwangncar left a comment

Choose a reason for hiding this comment

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

This represents approval by Greg.

@dudhia
Copy link
Collaborator

dudhia commented Apr 18, 2022 via email

@weiwangncar
Copy link
Collaborator

@dudhia This is controlled by qna_update=1, not sst_update = 1.

@weiwangncar
Copy link
Collaborator

@dudhia If you are ok with this, can you approve it?

@twjuliano
Copy link
Contributor Author

@dudhia @weiwangncar I have run a simulation with both qna_update=1 and sst_update=1 and it does work as intended

@dudhia
Copy link
Collaborator

dudhia commented Apr 18, 2022

If this is controlled by the same frequency as sst_update, it seems someone could easily forget to set qna_update, and it would be a hard problem to detect in a run. Can we set this automatically based on aerosol option and sst_update?

@dudhia
Copy link
Collaborator

dudhia commented Apr 19, 2022

Another question is what happens if they forget to re-run real to create that file if switching to the aerosol option for wrf.exe.

@weiwangncar
Copy link
Collaborator

@dudhia These questions should be posted to the original PR. This PR only moves the code from mp module to outside it. I think we can leave those to a future PR should any problem arises.

@twjuliano
Copy link
Contributor Author

If this is controlled by the same frequency as sst_update, it seems someone could easily forget to set qna_update, and it would be a hard problem to detect in a run. Can we set this automatically based on aerosol option and sst_update?

@dudhia The qna_update is controlled separately thru auxinput17 options but in a similar manner as auxinput4 for sst_update. So, the user can specify aerosol frequency accordingly without worrying about sst_update

@twjuliano
Copy link
Contributor Author

Another question is what happens if they forget to re-run real to create that file if switching to the aerosol option for wrf.exe.

@dudhia If the file is not available then the model will crash and the user will see:

image

If the file is available but there is no data at the indicated time interval then the model will crash and the user will see:

image

@dudhia
Copy link
Collaborator

dudhia commented Apr 19, 2022 via email

@weiwangncar
Copy link
Collaborator

@twjuliano Can you help us to understand this? Does qna_update only use sources like GEOS-5, a real-time product, or can it use the climatological data too? If you can provide us some information, we can update this page on how to use this scheme. In particular what are the ways to use the data, whether it is climatological or real-time.

@gthompsnWRF
Copy link
Contributor

@twjuliano : I also have same question as @weiwangncar . Does this resolve the issue with using the older Climo data (that Trude and I created) to have wrflowinput contain the aerosol climo over time for long-duration simulations in which I was previously "hacking" this with sst_update? Or does this soley work only with your new BC additions? Obviously, I wish it to work for our older aerosol climo as well as your newer stuff.

@dudhia
Copy link
Collaborator

dudhia commented Apr 21, 2022

@twjuliano Can we assume these icbc switches are on when sst_update is on, or maybe we should test on those switches instead of sst_update?

@twjuliano
Copy link
Contributor Author

@twjuliano Can we assume these icbc switches are on when sst_update is on, or maybe we should test on those switches instead of sst_update?

@dudhia I think it makes more sense to test on the icbc switches since we are trying to separate the aerosol forcing from sst_update. I can make the code change if this sounds OK

@dudhia
Copy link
Collaborator

dudhia commented Apr 21, 2022 via email

@twjuliano
Copy link
Contributor Author

@dudhia @weiwangncar @gthompsnWRF Check has been added to check-a-mundo, which takes care of both real and wrf. I ran tests to confirm. Please let me know if this look good, thanks

@weiwangncar
Copy link
Collaborator

The Jenkins tests have passed:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           58
Number of Simulations  : 158           156        0
Number of Comparisons  : 95           92        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

@weiwangncar
Copy link
Collaborator

@twjuliano Thanks for adding the check. Can you show us this will work if someone does not set qna_update = 1?

@twjuliano
Copy link
Contributor Author

@weiwangncar Here is what the user will see if qna_update is not =1:

image

If the user then sets qna_update=1 but not the auxinput17 settings, then they will see:

image

@weiwangncar
Copy link
Collaborator

@twjuliano Thanks! Let's see if @dudhia is happy about this.

@dudhia
Copy link
Collaborator

dudhia commented Apr 22, 2022 via email

@weiwangncar
Copy link
Collaborator

@twjuliano It may be helpful to add a section in test/em_real/examples.namelist file for the set of namelist required to generate low boundary file, similar to that for sst_update:

** Using qna_update option (add these to namelist records &time_control and
&physics respectively):

&time_control
auxinput17_inname = "wrfqnainp_d"
auxinput17_interval = 360, 360, 360,
io_form_auxinput17 = 2

&physics
qna_update = 1,

While you are doing this, can you also correct a typo in your print message in module_check_a_mundo.F: '... and control through auxinput17...'?

@twjuliano
Copy link
Contributor Author

twjuliano commented Apr 22, 2022

This looks fine. I don't see the auxinput17 check in the PR. Was it in the code already? Does aer_init_opt capture the icbc settings. I am not sure how many of these switches are automatically set.

@dudhia Yes, the auxinput17 check was already in the code from the previous PR. And yes, aer_init_opt is a derived variable used to capture the icbc settings: =1 is for climo and =2 is for first guess

@twjuliano
Copy link
Contributor Author

@twjuliano It may be helpful to add a section in test/em_real/examples.namelist file for the set of namelist required to generate low boundary file, similar to that for sst_update:

** Using qna_update option (add these to namelist records &time_control and &physics respectively):

&time_control auxinput17_inname = "wrfqnainp_d" auxinput17_interval = 360, 360, 360, io_form_auxinput17 = 2

&physics qna_update = 1,

While you are doing this, can you also correct a typo in your print message in module_check_a_mundo.F: '... and control through auxinput17...'?

@weiwangncar This is now done

@weiwangncar
Copy link
Collaborator

@twjuliano Thanks for adding the info. @dudhia Any other concerns?

@dudhia
Copy link
Collaborator

dudhia commented Apr 22, 2022 via email

dudhia
dudhia previously approved these changes Apr 22, 2022
@dudhia
Copy link
Collaborator

dudhia commented Apr 22, 2022

I notice a failed test

Add a few more mp schemes in comment
@weiwangncar
Copy link
Collaborator

@dudhia I'm re-doing one now. It means you will have to approve it again if it passes.

@weiwangncar
Copy link
Collaborator

On second try, the Jenkins tests have passed:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           58
Number of Simulations  : 158           156        0
Number of Comparisons  : 95           92        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

@weiwangncar
Copy link
Collaborator

@dudhia Can you review and approve one more time? Thanks.

@weiwangncar weiwangncar merged commit e44932e into wrf-model:release-v4.4 Apr 22, 2022
@dudhia
Copy link
Collaborator

dudhia commented Oct 11, 2022 via email

@dudhia
Copy link
Collaborator

dudhia commented Oct 11, 2022 via email

vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
…odule (wrf-model#1715)

TYPE: enhancement

KEYWORDS: real, Thompson aerosol-aware, microphysics

SOURCE: Timothy W. Juliano (NCAR/RAL)

DESCRIPTION OF CHANGES:
This is an update to a previous PR wrf-model#1616 that added biomass burning aerosol emissions for the Thompson AA scheme. In general, this PR cleans up the implementation of the biomass burning aerosol emissions.

In the current PR, two things occurred:

1. As requested by Greg Thompson, the emissions of smoke aerosols are now self-contained in a module separate from the Thompson AA scheme. The module is called immediately after mp_gt_driver, inside of the microphysics driver.
2. As requested, the 2D aerosol emissions are removed from io stream 4.
3. A check is added to stop users if use_aero_icbc or use_rap_aero_icbc is set, but not qna_update.

LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M phys/module_microphysics_driver.F
M phys/module_mp_thompson.F
M phys/Makefile
N phys/module_fire_emis.F
M share/module_check_a_mundo.F
M test/em_real/examples.namelist

TESTS CONDUCTED:

1. Conducted two simulations: one before and one after the code changes. Results are bit-for-bit equivalent.
2. Jenkins tests are all passing.
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.

4 participants