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

Bug fix for aerosol optics Mie extrapolation WRFchem #1592

Merged
merged 6 commits into from
Dec 15, 2021

Conversation

cenlinhe
Copy link
Contributor

@cenlinhe cenlinhe commented Dec 7, 2021

TYPE: bug fix

KEYWORDS: aerosol optics, Mie calculation, interpolation, extrapolation

SOURCE: Cenlin He and Rajesh Kumar (NCAR)

DESCRIPTION OF CHANGES:
Problem:
When the aerosol refractive indices are outside the lookup table ranges (which are very rare occasions), the
extrapolation in the parameterized Mie calculation ('mieaer' subroutine) will create unrealistic values for the
extrapolated aerosol optical parameters. These unphysical fluctuations cause unrealistically high AOD
values (10^10 and greater) and the model crashes.

Solution:
Force the out-of-range aerosol refractive index to be the min or max boundary values of the lookup table.

LIST OF MODIFIED FILES:
chem/module_optical_averaging.F

TESTS CONDUCTED:

  1. This solution fixes the issue and has been tested in NCAR Cheyenne HPC by Cenlin He (NCAR).
  2. Jenkins testing is all PASS.

RELEASE NOTE: Minor bugfix for aerosol optics Mie extrapolation cases in chemistry. When the aerosol refractive indices are outside the lookup table ranges, the extrapolation in the parameterized Mie calculation will create unrealistic values for the extrapolated aerosol optical parameters. These unphysical fluctuations cause unrealistically high AOD values and the model crashes. The solution is to force the out-of-range aerosol refractive index to be the minimum or maximum boundary values of the lookup table.

@jordanschnell
Copy link
Contributor

@cenlinhe - There is an error check above your lines that with hard coded values for the range. What do you think about adding a warning in your check and/or harmonizing it with the 1e-3 - 10 range check?

@cenlinhe
Copy link
Contributor Author

cenlinhe commented Dec 8, 2021

@cenlinhe - There is an error check above your lines that with hard coded values for the range. What do you think about adding a warning in your check and/or harmonizing it with the 1e-3 - 10 range check?

@jordanschnell That is actually the inconsistent place in the current chemistry. The 1e-3 - 10 range check does not prevent the extrapolation bug, because the minimum bound of the lookup table is close to 1.0. If the refractive index is much smaller than 1.0, the unstable extrapolation will occur, leading to unrealistic aerosol optics.

@jordanschnell
Copy link
Contributor

@cenlinhe - There is an error check above your lines that with hard coded values for the range. What do you think about adding a warning in your check and/or harmonizing it with the 1e-3 - 10 range check?

@jordanschnell That is actually the inconsistent place in the current chemistry. The 1e-3 - 10 range check does not prevent the extrapolation bug, because the minimum bound of the lookup table is close to 1.0. If the refractive index is much smaller than 1.0, the unstable extrapolation will occur, leading to unrealistic aerosol optics.

@cenlinhe I see, I think putting a debug print statement for when they are reset to the bounds would be nice but not necessary

@cenlinhe
Copy link
Contributor Author

cenlinhe commented Dec 9, 2021

@jordanschnell Thanks for the suggestion. I have added a debug printout statement to warn that the values are reset to bounds. Please see the updated commit and file.

@davegill
Copy link
Contributor

@jordanschnell
Let us know if you are OK with these mods, with a review. We are trying to move the develop branch along.

Copy link
Contributor

@jordanschnell jordanschnell left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for adding the warning/print.

@davegill davegill merged commit 23c5db5 into wrf-model:develop Dec 15, 2021
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: bug fix

KEYWORDS: aerosol optics, Mie calculation, interpolation, extrapolation

SOURCE: Cenlin He and Rajesh Kumar (NCAR)

DESCRIPTION OF CHANGES:
Problem:
When the aerosol refractive indices are outside the lookup table ranges (which are very rare occasions), the 
extrapolation in the parameterized Mie calculation ('mieaer' subroutine) will create unrealistic values for the 
extrapolated aerosol optical parameters. These unphysical fluctuations cause unrealistically high AOD 
values (10^10 and greater) and the model crashes.

Solution:
Force the out-of-range aerosol refractive index to be the min or max boundary values of the lookup table.

LIST OF MODIFIED FILES:
chem/module_optical_averaging.F

TESTS CONDUCTED: 
1. This solution fixes the issue and has been tested in NCAR Cheyenne HPC by Cenlin He (NCAR).
2. Jenkins testing is all PASS.

RELEASE NOTE: Minor bugfix for aerosol optics Mie extrapolation cases in chemistry. When the aerosol refractive indices are outside the lookup table ranges, the extrapolation in the parameterized Mie calculation will create unrealistic values for the extrapolated aerosol optical parameters. These unphysical fluctuations cause unrealistically high AOD values and the model crashes. The solution is to force the out-of-range aerosol refractive index to be the minimum or maximum boundary values of the lookup table.
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.

3 participants