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

Radiation diagnostics are not consistent with climate calculation #3468

Closed
yshi5 opened this issue Feb 25, 2020 · 6 comments · Fixed by #3932
Closed

Radiation diagnostics are not consistent with climate calculation #3468

yshi5 opened this issue Feb 25, 2020 · 6 comments · Fixed by #3932
Assignees

Comments

@yshi5
Copy link

yshi5 commented Feb 25, 2020

The calculation of diagnostic radiation package is not consistent with the climate list. When setting radiation diagnostic 1 identical to the climate diagnostic (rad_diag_1 = rad_climate), the calculated FSNT, FLNT, and AOD all change between the two packages. I attach figures for the difference in FSNT and aerosol AOD.
FSNT
AOD

@singhbalwinder
Copy link
Contributor

@yshi5 and @golaz : I looked into the code to find out why diagnostic calls with "rad_diag_1" (when it is identical to "rad_climate", i.e. rad_diag_1=rad_climate) produce different answers. I found the reason behind it but I would need advise on how to fix it in the code. There are two reasons why the diagnostic fields are not BFB:

  1. Diagnostic fields see updated state when dgnumwet (number mode wet diameter) and qaerwat (aerosol water) are computed using "modal_aero_wateruptake_dr" subroutine. That is, for "rad_climate", this calculation takes place just before we call aerosol wet chemistry (aero_model_wetdep) but for "rad_diag_1", this calculation takes place in radiation (radiation_tend). State changes twice between aerosol wet chemistry and radiation- once by aerosol wet chemistry and then by deep convection. If I force the state to stay the same, I get BFB answers, provided I also fix the following inconsistency.

  2. When we compute the diameter of aerosol modes (dgncur_a) for "rad_climate", there are logics to allow aitken to accum mode transfer( and vice versa) using "do_aitacc_transfer" and for size adjustment using "do_adjust". These logics are absent from the subroutine "modal_aero_calcsize_diag" which we use to compute dgncur_a for "rad_diag_1". Therefore we get a different dgncur_a, which leads to different dgnumwet (wet diameter) and qaerwat (aerosol water). This inconsistency results in non-BFB behavior.

Here are the changes I made to the code to produce BFB answers. These changes are obviously not what we want but it just shows how we can provide the same state and dgncur to "rad_diag_1" as seen by rad_climate.

I would like to thanks Zheng Lu to point me to the code where answers starts to diverge with rad_diag_1 and rad_climate when rad_diag_1=rad_climate.

Also, we can possibly fix the memory issue as well (#2575) as I saw some code which might cause the code to run out of memory if we use too many radiation diagnostics.

@golaz
Copy link
Contributor

golaz commented Mar 25, 2020

Seeking input from @hwangacme, @kaizhangpnl.

@yfenganl
Copy link
Contributor

I think that the two code changes made by @singhbalwinder seem to be reasonable, to ensure that the radiation diagnostic is called at the exactly same states as radiation_climate. The 'same states' include not only the meteorological conditions (T, RH, etc), but also the loadings and size of other aerosol species as well as water uptake. It looks like (1) the subroutines aero_model_wetdep and deep convection and (2) size adjustment would change the latter for non-BFB results

@singhbalwinder
Copy link
Contributor

Thanks @yfenganl. If you have any insights into how to fix it, please let us know.

@kaizhangpnl
Copy link
Contributor

@singhbalwinder Thanks for the investigation. This is also helpful for the aerosol development in the EAGLES project.

During the telecon, I mentioned why (as far as I understand) the aerosol dry and wet radius need to be re-calculated for the aerosol optical property estimation, when a certain aerosol component is removed from the radiation calculation.

When the forcing agent (e.g. SO4) is taken out, both the associated dry and wet radius changes should be considered. For example, SO4 contributes significant amount of mass in the aerosol particle, and it takes up a lot of water. If we don't consider the change in dry and wet radius, the estimated optical properties will be unrealistic, especially for the extinction associated with aerosol water. Therefore the recalculation of dry and wet radius is necessary.

As we noticed, there is also some inconsistency between the aerosol size estimate and the updated aerosol characteristics (mass/number) by wet removal in the current model for calculating the aerosol optical properties for radiation.

I think there are two possible solutions (please correct me if it's wrong):

  1. Move the dry/wet radius calculation into the radiation code, and use the dry size adjustment for both the prognostic call and the diagnostics calls. The benefit of this revision is that minimal code modification is needed. The downside is the size change and the associated mode transition will not be seen by the wet removal and possibly convective transport. The model result will change even without aerosol forcing diagnostics and the impact needs to be evaluated.

  2. Move the size re-calculation code for diagnostics calls out of radiation and move it to the place where the dry and wet size update for the prognostic call is done. Also, we need to use the same size adjustment for prognostic and diagnostics calls. The benefit of this implementation is that model can be BFB for the simulations without forcing diagnostics, but significant amount of extra coding work is needed and the code will look ugly if not rewriting it completely. Also, the inconsistency between the size and the updated aerosol fields (by wet removal) still exists. I would not take this option.

@hwangacme what do you think?

@hwangacme
Copy link
Contributor

hwangacme commented Mar 26, 2020

Thanks @singhbalwinder for the test and @kaizhangpnl for the suggestions. I agree that Option 1 is more desirable to involve less changes in coding. If this change were going to be included in v2, we don't need to worry too much about answer changes, although it still needs to be separately evaluated to also allow for a possibility of v1 fix.

wlin7 added a commit that referenced this issue Nov 30, 2020
…1 into next (PR #3932)

Fixes and enables radiation diagnostics

Radiation diagnostic calls are enabled where aerosol species mentioned in
radiation diagnostics list (rad_diag_* in atm_in file) can participate in
all the same processes as prognostic radiation calls (mentioned in
rad_climate list in atm_in). The missing processes for the diagnostic calls were:

Aerosol size adjustment
Aitken<->Accumulation aerosol transfer

Enabling these calculations ensure that radiation diagnostic call with
exactly the same species as radiation climate call, produces BFB diagnostic
fields (issue #3468).

Since, radiation diagnostic lists (rad_diag_*) can exclude species or even
an entire mode (or modes), I have relied on rad_cnst_* calls to get info
about mode numbers, number of species in a mode and mode (or species)
properties. rad_cnst_* calls guarantee that only species/modes present in
the rad_diag_* lists are accessed. I have tested the following cases:

Excluding all aerosols
Excluding BC from all modes
Excluding SOA from all modes
Excluding Aitken mode
Excluding Accumulation modes
Radiation diagnostic list exactly the same as radiation climate list

For diagnostic lists, "Aerosol size adjustment" process is always ON but
"Aiken<->Accumulation transfer" is turned off for diagnostic calls where
Aitken or Accumulation mode is absent. I have reworked the mapping so that missing
species in aitken and accumulation modes are accounted for.

The modal_aero_calcsize_sub subroutine is heavily refactored where different
processes are refactored into their own routines (for readability) and similar
calculations are combined together.

This code also fixes the memory leak issue mentioned in #2575. It also fixes
another memory leak recently introduced by PR #3885 (thanks for Andrew Bradley
for finding this!). This PR also cleans up logic for clear_rh variables
following Ben Hillman's suggestions.

Fixes #2575
Fixes #3468
[BFB] (for prognostic radiation calls, the answers will change for the
       diagnostic calls as this PR fixes a bug identified in issue #3468)
wlin7 added a commit that referenced this issue Dec 1, 2020
…1 into next (PR #3932)

Fixes and enables radiation diagnostics

Radiation diagnostic calls are enabled where aerosol species mentioned in
radiation diagnostics list (rad_diag_* in atm_in file) can participate in
all the same processes as prognostic radiation calls (mentioned in
rad_climate list in atm_in). The missing processes for the diagnostic calls were:

Aerosol size adjustment
Aitken<->Accumulation aerosol transfer

Enabling these calculations ensure that radiation diagnostic call with
exactly the same species as radiation climate call, produces BFB diagnostic
fields (issue #3468).

Since, radiation diagnostic lists (rad_diag_*) can exclude species or even
an entire mode (or modes), I have relied on rad_cnst_* calls to get info
about mode numbers, number of species in a mode and mode (or species)
properties. rad_cnst_* calls guarantee that only species/modes present in
the rad_diag_* lists are accessed. I have tested the following cases:

Excluding all aerosols
Excluding BC from all modes
Excluding SOA from all modes
Excluding Aitken mode
Excluding Accumulation modes
Radiation diagnostic list exactly the same as radiation climate list

For diagnostic lists, "Aerosol size adjustment" process is always ON but
"Aiken<->Accumulation transfer" is turned off for diagnostic calls where
Aitken or Accumulation mode is absent. I have reworked the mapping so that missing
species in aitken and accumulation modes are accounted for.

The modal_aero_calcsize_sub subroutine is heavily refactored where different
processes are refactored into their own routines (for readability) and similar
calculations are combined together.

This code also fixes the memory leak issue mentioned in #2575. It also fixes
another memory leak recently introduced by PR #3885 (thanks for Andrew Bradley
for finding this!). This PR also cleans up logic for clear_rh variables
following Ben Hillman's suggestions.

Fixes #2575
Fixes #3468
[BFB] (for prognostic radiation calls, the answers will change for the
       diagnostic calls as this PR fixes a bug identified in issue #3468)
wlin7 added a commit that referenced this issue Dec 1, 2020
…1 into next (PR #3932)

Fixes and enables radiation diagnostics

Radiation diagnostic calls are enabled where aerosol species mentioned in
radiation diagnostics list (rad_diag_* in atm_in file) can participate in
all the same processes as prognostic radiation calls (mentioned in
rad_climate list in atm_in). The missing processes for the diagnostic calls were:

Aerosol size adjustment
Aitken<->Accumulation aerosol transfer

Enabling these calculations ensure that radiation diagnostic call with
exactly the same species as radiation climate call, produces BFB diagnostic
fields (issue #3468).

Since, radiation diagnostic lists (rad_diag_*) can exclude species or even
an entire mode (or modes), I have relied on rad_cnst_* calls to get info
about mode numbers, number of species in a mode and mode (or species)
properties. rad_cnst_* calls guarantee that only species/modes present in
the rad_diag_* lists are accessed. I have tested the following cases:

Excluding all aerosols
Excluding BC from all modes
Excluding SOA from all modes
Excluding Aitken mode
Excluding Accumulation modes
Radiation diagnostic list exactly the same as radiation climate list

For diagnostic lists, "Aerosol size adjustment" process is always ON but
"Aiken<->Accumulation transfer" is turned off for diagnostic calls where
Aitken or Accumulation mode is absent. I have reworked the mapping so that missing
species in aitken and accumulation modes are accounted for.

The modal_aero_calcsize_sub subroutine is heavily refactored where different
processes are refactored into their own routines (for readability) and similar
calculations are combined together.

This code also fixes the memory leak issue mentioned in #2575. It also fixes
another memory leak recently introduced by PR #3885 (thanks for Andrew Bradley
for finding this!). This PR also cleans up logic for clear_rh variables
following Ben Hillman's suggestions.

Fixes #2575
Fixes #3468
[BFB] (for prognostic radiation calls, the answers will change for the
       diagnostic calls as this PR fixes a bug identified in issue #3468)
wlin7 added a commit that referenced this issue Dec 1, 2020
…1 into next (PR #3932)

Fixes and enables radiation diagnostics

Radiation diagnostic calls are enabled where aerosol species mentioned in
radiation diagnostics list (rad_diag_* in atm_in file) can participate in
all the same processes as prognostic radiation calls (mentioned in
rad_climate list in atm_in). The missing processes for the diagnostic calls were:

Aerosol size adjustment
Aitken<->Accumulation aerosol transfer

Enabling these calculations ensure that radiation diagnostic call with
exactly the same species as radiation climate call, produces BFB diagnostic
fields (issue #3468).

Since, radiation diagnostic lists (rad_diag_*) can exclude species or even
an entire mode (or modes), I have relied on rad_cnst_* calls to get info
about mode numbers, number of species in a mode and mode (or species)
properties. rad_cnst_* calls guarantee that only species/modes present in
the rad_diag_* lists are accessed. I have tested the following cases:

Excluding all aerosols
Excluding BC from all modes
Excluding SOA from all modes
Excluding Aitken mode
Excluding Accumulation modes
Radiation diagnostic list exactly the same as radiation climate list

For diagnostic lists, "Aerosol size adjustment" process is always ON but
"Aiken<->Accumulation transfer" is turned off for diagnostic calls where
Aitken or Accumulation mode is absent. I have reworked the mapping so that missing
species in aitken and accumulation modes are accounted for.

The modal_aero_calcsize_sub subroutine is heavily refactored where different
processes are refactored into their own routines (for readability) and similar
calculations are combined together.

This code also fixes the memory leak issue mentioned in #2575. It also fixes
another memory leak recently introduced by PR #3885 (thanks for Andrew Bradley
for finding this!). This PR also cleans up logic for clear_rh variables
following Ben Hillman's suggestions.

Fixes #2575
Fixes #3468
[BFB] (for prognostic radiation calls, the answers will change for the
       diagnostic calls as this PR fixes a bug identified in issue #3468)
wlin7 added a commit that referenced this issue Feb 10, 2021
…1 into next (PR #3932)

Fixes and enables radiation diagnostics

Radiation diagnostic calls are enabled where aerosol species mentioned in
radiation diagnostics list (rad_diag_* in atm_in file) can participate in
all the same processes as prognostic radiation calls (mentioned in rad_climate
list in atm_in). The missing processes for the diagnostic calls were:

Aerosol size adjustment
Aitken<->Accumulation aerosol transfer

Enabling these calculations ensure that radiation diagnostic call with
exactly the same species as radiation climate call, produces BFB diagnostic
fields (issue #3468).

Since, radiation diagnostic lists (rad_diag_*) can exclude species or even
an entire mode (or modes), I have relied on rad_cnst_* calls to get info
about mode numbers, number of species in a mode and mode (or species) properties.
rad_cnst_* calls guarantee that only species/modes present in the rad_diag_*
lists are accessed. I have tested the following cases:

Excluding all aerosols
Excluding BC from all modes
Excluding SOA from all modes
Excluding Aitken mode
Excluding Accumulation modes
Radiation diagnostic list exactly the same as radiation climate list

For diagnostic lists, "Aerosol size adjustment" process is always ON but
"Aiken<->Accumulation transfer" is turned off for diagnostic calls where Aitken
or Accumulation mode is absent. I have reworked the mapping so that missing
species in aitken and accumulation modes are accounted for.

The modal_aero_calcsize_sub subroutine is heavily refactored where different
processes are refactored into their own routines (for readability) and similar
calculations are combined together.

This code also fixes the memory leak issue mentioned in #2575. It also fixes
another memory leak recently introduced by PR #3885 (thanks for Andrew Bradley for
finding this!). This PR also cleans up logic for clear_rh variables following
Ben Hillman's suggestions.

Fixes #2575
Fixes #3468
[BFB] (for prognostic radiation calls, the answers will change for the
      diagnostic calls as this PR fixes a bug identified in issue #3468)
@wlin7 wlin7 closed this as completed in 31f2a75 Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment