Skip to content

NSSL-MP bug fix and more#2345

Draft
MicroTed wants to merge 1 commit into
wrf-model:developfrom
MicroTed:nsslmp-hotfix3moment
Draft

NSSL-MP bug fix and more#2345
MicroTed wants to merge 1 commit into
wrf-model:developfrom
MicroTed:nsslmp-hotfix3moment

Conversation

@MicroTed

@MicroTed MicroTed commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Bug fix and enhancements to NSSL microphysics (mp_physics=18)

TYPE: bug fix, enhancements
module_mp_nssl_2mom.F:

  • Fixed error in interface that missed unit conversion for reflectivity moments, which resulted in advection errors (and units of m^6/m^3 instead of m^6/kg) Resolves issue NSSL-MP 3-moment bug in unit conversion #2344
  • Fixed reflectivity conservation in 2-moment graupel->hail conversion (could cause spurious large hail number concentrations). 3-moment now has this turned off by default. Turned off reflectivity check for drop freezing.
  • Increased the default rain breakup coefficient (from 1e6 to 2.5e6) for 3-moment and rewrote the Z-rate equation to prevent negative number concentrations. The higher value of rainbreakfac helps boost cold pools, which were a bit weak.
  • Added missing control flags in smallvalues for 3-moment consistency checks
  • Added subroutines to compute radar reflectivity from outside of the driver
  • 3-moment: turned off rescaling of Z for graupel and hail at lowest value of alpha (shape parameter), which allows larger Z to exist that normally would be require a negative shape parameter. (Rain still gets Z rescaled at alphamin)
  • 3-moment: Fixed lookup table for incwet=1 (default is 0) for calculating dry/wet growth over portions of the PSD instead of all or nothing. Also fixes a minor error with incwet=1 (small effect). incwet=1 is now safe to use [no default effect]
  • Fixed a non-WRF NaN issue with the ssfilt array [no default effect]
  • Moves a couple inline functions to separate routines [no default effect]
  • Other changes for future options
    Registry.EM_COMMON, module_physics_init.F:
  • Added nssl_alphar to registry (namelist) to allow easier setting of 2-moment rain shape parameter

KEYWORDS:
3-moment; hail conversion

SOURCE: Ted Mansell (NOAA)

DESCRIPTION OF CHANGES:
Problem: For 3-moment option, the reflectivity moments were not having their units converted between advection (m^6/kg) and in-scheme (m^6/m^3), resulting in advection errors and incorrect output units

Solution:
Added appropriate in-scheme flags to multiply and divide by air density

ISSUE:
Fixes #2344

LIST OF MODIFIED FILES:
Registry/Registry.EM_COMMON
phys/module_mp_nssl_2mom.F
phys/module_physics_init.F

TESTS CONDUCTED:

RELEASE NOTE:
NSSL Microphysics: Fixes a bug in the 3-moment option that caused advection errors; Enhances cold pools in 3-moment by increasing rain breakup (and correcting reflectivity change); Fixes a 2-moment reflectivity check in the hail conversion process; Allows greater graupel/hail reflectivities in 3-moment.

   - Fixed error in interface that missed unit conversion for reflectivity moments,
     which resulted in advection errors (and units of m^6/m^3 instead of m^6/kg)
   - Fixed reflectivity conservation in 2-moment graupel->hail conversion (could
     cause spurious large hail number concentrations). 3-moment now has this turned
     off by default. Turned off reflectivity check for drop freezing.
   - Increased the default rain breakup coefficient (from 1e6 to 2.5e6) for 3-moment
     and rewrote the Z-rate equation to prevent negative number concentrations.
     The higher value of rainbreakfac helps boost cold pools, which were a bit weak.
   - Added missing control flags in smallvalues for 3-moment consistency checks
   - Added subroutines to compute radar reflectivity from outside of the driver
   - 3-moment: turned off rescaling of Z for graupel and hail at lowest value of alpha
     (shape parameter), which allows larger Z to exist that normally would be require a
     negative shape parameter. (Rain still gets Z rescaled at alphamin)
   - 3-moment: Fixed lookup table for incwet=1 (default is 0) for calculating dry/wet
     growth over portions of the PSD instead of all or nothing. Also fixes a minor error
     with incwet=1 (small effect).
   - Fixed a non-WRF NaN issue with the ssfilt array
   - Moves a couple inline functions to separate routines
   - Other changes for future options
 Registry.EM_COMMON, module_physics_init.F:
   - Added nssl_alphar to registry (namelist) to allow easier setting of 2-moment rain
     shape parameter
@MicroTed MicroTed requested review from a team as code owners June 2, 2026 21:57
@MicroTed

MicroTed commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

The NSSL module could now be moved to a git submodule if desired, which would be consistent with pending inclusion in MPAS. I can go either way.

@weiwangncar

Copy link
Copy Markdown
Collaborator

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

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

@weiwangncar

Copy link
Copy Markdown
Collaborator

@MicroTed You have just missed our 4.8 release - which has been tested and staged for release very soon. Since you're making the code available to MPAS, we think it would be a benefit to move your code to a git submodule so that you can maintain one version of it. We will consider it in our next release - maybe a 4.8.1.

@dudhia

dudhia commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

@MicroTed You have just missed our 4.8 release - which has been tested and staged for release very soon. Since you're making the code available to MPAS, we think it would be a benefit to move your code to a git submodule so that you can maintain one version of it. We will consider it in our next release - maybe a 4.8.1.

I concur with @weiwangncar here. You can decide whether we should wait for the submodule or merge this on develop first.

@MicroTed

MicroTed commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@weiwangncar Would it be possible to do a quick 3-line bug fix instead? But if it's too late, then never mind.

@weiwangncar

Copy link
Copy Markdown
Collaborator

@MicroTed We will have a bug fix release some time after the 4.8 release. At this time, it is best to wait until then. Thanks for your understanding.

@MicroTed

MicroTed commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@weiwangncar No worries. I suppose could queue that fix up shortly as PR and switch this one to a draft.

@weiwangncar

Copy link
Copy Markdown
Collaborator

@MicroTed Yes, you can make the PR now and target the develop branch. Thanks!

@weiwangncar weiwangncar added Retest and removed Retest labels Jun 4, 2026
@MicroTed MicroTed marked this pull request as draft June 5, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants