Skip to content

MP38 Thompson 2-mom graupel/hail#1667

Closed
mefrediani wants to merge 24 commits intowrf-model:developfrom
mefrediani:mp_phys38
Closed

MP38 Thompson 2-mom graupel/hail#1667
mefrediani wants to merge 24 commits intowrf-model:developfrom
mefrediani:mp_phys38

Conversation

@mefrediani
Copy link
Contributor

@mefrediani mefrediani commented Feb 4, 2022

Option to compute two-moment prognostics for graupel/hail

TYPE: enhancement, new feature

KEYWORDS: microphysics, Thompson microphysics, graupel, hail, double-moment

SOURCE: Code developed by Greg Thompson (JCSDA, UCAR) and Anders Jensen (RAL, NCAR).
Implemented in WRF v4.4 by Maria Frediani (RAL, NCAR)

DESCRIPTION OF CHANGES:

This code update includes

  1. a package to compute two-moment prognostics for graupel/hail and a predicted density graupel category (mp_physics=38);
  2. an update to the Y-intercept relationship for one-moment graupel; and
  3. it replaces air temperature for wet-bulb temperature in riming and mixed phase processes.

Problem:

  1. One-dimensional graupel/hail growth does not couple to the storm dynamics and is insufficient for predicting more detailed microphysical storm characteristics and hazards such as hail size, density, and fall speed, which can be used to provide guidance on the timing and spatial extent of damaging hail.

  2. Sensitivity studies have shown that using a constant intercept parameter and a constant density can significantly constrain predicted hail size: simulated storms either produced only pea-size or baseball-size hail (Gilmore et al. 2004).

  3. Improving the representation of riming and mixed phase processes leads to improvements in predicted storm dynamics and propagation speed through microphysical feedbacks and also improves the spatial distribution and type of precipitation at the surface.

Solution:

Changes related with the new package mp_physics=38 include:

  • Variable density for graupel (rho_g)
  • Parameters become a function of rho_g (am_g, av_g, bv_g, cge, cgg, oamg)
  • Extra dimension in lookup tables to account for graupel variable density (rho_g)
  • New source/sink terms for 3-moment graupel
  • Computation of radar reflectivity and nwp diagnostics using graupel volume mixing ratio

Additional modifications affecting mp_physics=8 and mp_physics=28 include:

  • Fall speed power law relations (av_i from 1847.5 to 1493.9)
  • Reduced dimension of cse, csg (from 18 to 17)
  • Use of wet-bulb temperature for riming and mixed-phase process
  • Modified relationship for the Y-intercept of one-moment graupel to shift the properties of the graupel category to become more hail-like, resulting in a category that represents both graupel and hail.

ISSUE: NA

LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M phys/module_diag_nwp.F
M phys/module_diagnostics_driver.F
M phys/module_microphysics_driver.F
M phys/module_mp_thompson.F
M phys/module_physics_init.F

TESTS CONDUCTED:
The modifications were initially demonstrated using the original development made for WRF v4.0 (Jensen et al 2021, under review, MWR-D-21-0319). The operational mp28, mp28 with modified graupel Y-intercept, and mp38 were evaluated for a case study during the PECAN campaign using observed hail sizes from storm reports and estimated from radar. The evaluation showed clear improvement of the simulated reflectivity values in the upper-levels of discrete storms, coinciding with a significant reduction in the areal extent of graupel aloft, also seen when using the updated one-moment scheme. The two-moment and predicted density graupel scheme was also better able to predict a wide variety of hail sizes at the surface, including large (>2-inch in diameter) hail that was observed during this case.

The implementation for this develop branch (aiming at the release v4.4) was tested using a case study from the Relampago campaign and results from mp28, mp38-v4.0, mp38-develop-v4.4 were compared. This comparison indicates that the implementation was successful.

  1. Are the Jenkins tests all passing?
    Yes, but I haven't received the emails.

RELEASE NOTE: Include a stand-alone message suitable for the inclusion in the minor and annual releases. A publication citation is appropriate.

@weiwangncar
Copy link
Collaborator

@mefrediani Did you receive an email from Jenkins test? If you did, please post the summary here. If you did not, can you follow the instruction shown here so that it may increase your chance receiving the email? Once you've revised the setup, could you make a small, non-consequential change (such as remove an empty line, spaces, etc.) so that another Jenkins test may be triggered? Thanks.

@mefrediani
Copy link
Contributor Author

@weiwangncar I followed the instruction and made a small change to the code as you described but I still haven't received the email. I searched my inbox and found the jenkins test result from the firebrand_spotting PR but not from this one. Is it possible that I haven't received it because it's still a draft PR?

@mefrediani mefrediani marked this pull request as ready for review February 8, 2022 16:38
@mefrediani mefrediani requested review from a team as code owners February 8, 2022 16:38
@mefrediani
Copy link
Contributor Author

@weiwangncar I changed the PR status to ready for review and it ran 5 checks but when I click to see the details. it takes me to a page that says "site can't be reached" on this address: https://ncar_jenkins.scalacomputing.com/job/WRF-Prod-with-label/100/console.
I still haven't received an email with the test results.

@weiwangncar
Copy link
Collaborator

@mefrediani Thanks for trying. I am supposed to receive an email too, but I didn't. I'm trying to see if we can resolve this issue. We really need to see the results from the test email to know if the code has succeeded. In the meantime, if you can try to a bit-for-bit test and a restart time manually, that would be greatly appreciated. You can find the instructions on our Wiki page.

@dudhia
Copy link
Collaborator

dudhia commented Feb 8, 2022 via email

@mefrediani
Copy link
Contributor Author

@weiwangncar it seems that there's an issue with the Noah LSM and I had to create new input files to try a different surface scheme. I'll send you an update on that soon. If it helps, the issue when sf_surface_physics=2 is described below.

While using sf_surface_physics=2, the identical results test using the -d executable was crashing in the LSM, so I compiled the develop branch with the latest commit (a49fe58), also using -d, and it also crashed with the same error (see below). For the restart test, I got a difference in variable that seems to be unrelated with the microphysics scheme: SFROFF. I wonder if it also relates to the LSM...

./diffwrf mp38-restart/wrfout_d01_2018-12-13_07:00:00 mp38-restart/write_restart/wrfout_d01_2018-12-13_07:00:00
Just plot F
Diffing mp38-restart/wrfout_d01_2018-12-13_07:00:00 mp38-restart/write_restart/wrfout_d01_2018-12-13_07:00:00
Next Time 2018-12-13_07:00:00
Field Ndifs Dims RMS (1) RMS (2) DIGITS RMSE pntwise max
SFROFF 1 2 0.3113502861E-01 0.3113502861E-01 15 0.2676E-14 0.5623E-12

SegFault with -d compilation (develop branch):

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x2ac5d51d4aff in ???
#1 0x2ac5d5ce9b85 in ???
#2 0x2ac5d5cea6ca in ???
#3 0x2b32448 in __module_sf_noahdrv_MOD_lsm
at /glade/work/frediani/Projects/Relampago/wrf-v4.4/WRF/phys/module_sf_noahdrv.f90:662
#4 0x2380a2e in __module_surface_driver_MOD_surface_driver
at /glade/work/frediani/Projects/Relampago/wrf-v4.4/WRF/phys/module_surface_driver.f90:2774
#5 0x1ae4017 in module_first_rk_step_part1_MOD_first_rk_step_part1
at /glade/work/frediani/Projects/Relampago/wrf-v4.4/WRF/dyn_em/module_first_rk_step_part1.f90:562
#6 0x1547c64 in solve_em

at /glade/work/frediani/Projects/Relampago/wrf-v4.4/WRF/dyn_em/solve_em.f90:973
#7 0x13ff3a3 in solve_interface

at /glade/work/frediani/Projects/Relampago/wrf-v4.4/WRF/share/solve_interface.f90:141
#8 0x47c64a in __module_integrate_MOD_integrate
at /glade/work/frediani/Projects/Relampago/wrf-v4.4/WRF/frame/module_integrate.f90:329
#9 0x4082aa in __module_wrf_top_MOD_wrf_run
at ../main/module_wrf_top.f90:326
#10 0x407369 in wrf
at /glade/work/frediani/Projects/Relampago/wrf-v4.4/WRF/main/wrf.f90:29
#11 0x4073be in main
at /glade/work/frediani/Projects/Relampago/wrf-v4.4/WRF/main/wrf.f90:6

@weiwangncar
Copy link
Collaborator

@mefrediani Thanks for testing these two functions. You may want to wait for us to sort out some PRs to address Noah LSM, for example (see PR#1668).
I also got words that a few regression tests for your PR have failed. I will look into what tests it has trouble with and let you know. It is possible that some fixes we are doing for the release branch may help you too.

@mefrediani
Copy link
Contributor Author

@weiwangncar @dudhia @gthompsnWRF
I was able to run the bit for bit tests using sf_surface = 1.
Both tests passed. Please let me know once you have more information about the issue with the Jenkins tests. From the message here on github, it looks like the tests passed.

Here's the bit for bit test results:

./diffwrf mp38-write-restart/wrfout_d01_2018-12-13_07:00:00 mp38-from-restart/wrfout_d01_2018-12-13_07:00:00
Just plot F
Diffing mp38-write-restart/wrfout_d01_2018-12-13_07:00:00 mp38-from-restart/wrfout_d01_2018-12-13_07:00:00
Next Time 2018-12-13_07:00:00
Field Ndifs Dims RMS (1) RMS (2) DIGITS RMSE pntwise max

./diffwrf mp38-b4b-serial/wrfout_d01_2018-12-13_06:05:00 mp38-b4b-mpi/wrfout_d01_2018-12-13_06:05:00
Just plot F
Diffing mp38-b4b-serial/wrfout_d01_2018-12-13_06:05:00 mp38-b4b-mpi/wrfout_d01_2018-12-13_06:05:00
Next Time 2018-12-13_06:05:00
Field Ndifs Dims RMS (1) RMS (2) DIGITS RMSE pntwise max

You can access the files on /glade/scratch/frediani/Relampago/runs/tests

in these folders:
mp38-b4b-mpi
mp38-b4b-serial
mp38-from-restart
mp38-write-restart

@weiwangncar
Copy link
Collaborator

@mefrediani Thanks for doing the bit-for-bit and restart tests. Regarding your reg tests, I got the information from Scala who provides the computing resources for the tests. I received some output from them. The first group of tests the code failed on is for WRF-Chem - the code did not compile. If you never compiled WRF-Chem, see instructions provided on this page, scroll down the page, and following the links provided by the 'Code Preparation and Testing Requirements' near the bottom of the page.

@dudhia
Copy link
Collaborator

dudhia commented Feb 15, 2022

Is this one for V4.4 because it is not labeled that way yet?

@weiwangncar
Copy link
Collaborator

@dudhia It is labeled for develop branch.

@gthompsnWRF
Copy link
Contributor

Is this one for V4.4 because it is not labeled that way yet?

We would love to make it possible for inclusion into V4.4 - I realize there has been some conversation about this.

@dudhia
Copy link
Collaborator

dudhia commented Feb 15, 2022

As this new option overlaps a lot with the older options, tests need to be done on those to make sure that there are no unexpected changes to results.

@mefrediani
Copy link
Contributor Author

As this new option overlaps a lot with the older options, tests need to be done on those to make sure that there are no unexpected changes to results.

@dudhia Please let me know what tests you'd like me to run.

@dudhia
Copy link
Collaborator

dudhia commented Feb 15, 2022 via email

@dudhia
Copy link
Collaborator

dudhia commented Feb 15, 2022 via email

@mefrediani
Copy link
Contributor Author

@dudhia are you referring to the modifications you requested specifically for the module_diagnostics_driver? Because some of the modifications made for this PR (mp=38) will affect the results of the old thompson (mp=8 and 28), as described in the PR, so the results will not be identical. Cloud you please clarify?

@weiwangncar I believe I fixed the issue affecting the WRF-Chem compilation. Could you please let me know?

@mefrediani mefrediani requested review from dudhia and removed request for a team February 16, 2022 21:28
@mefrediani
Copy link
Contributor Author

mefrediani commented Apr 26, 2022

@weiwangncar @kkeene44 I wasn't able to push the code fixes after the new develop merge. I ended up using git difftool to create new commits on top of 8fe2a9c. The content of these commits are a bit scrambled in that the code modification is disorganized. I hope that's not an issue.

@weiwangncar
Copy link
Collaborator

@mefrediani It looks like you were able to push a commit. I will forward the test output to you.

@mefrediani
Copy link
Contributor Author

I can't resolve the conflicts that originated after merging with v4.4. I rebased this branch to 9c1d3cc (develop) to start over but I can't push it:
To github.com:mefrediani/WRF.git
! [rejected] mp_phys38 -> mp_phys38 (non-fast-forward)
error: failed to push some refs to 'github.com:mefrediani/WRF.git'

@mefrediani mefrediani closed this Apr 28, 2022
@mgduda
Copy link
Collaborator

mgduda commented Apr 28, 2022

I can't resolve the conflicts that originated after merging with v4.4. I rebased this branch to 9c1d3cc (develop) to start over but I can't push it: To github.com:mefrediani/WRF.git ! [rejected] mp_phys38 -> mp_phys38 (non-fast-forward) error: failed to push some refs to 'github.com:mefrediani/WRF.git'

If you're sure you want to overwrite the remote branch, you can add --force, i.e., git push --force ....

@mefrediani
Copy link
Contributor Author

Do I start a new PR? It looks like I'm not able to reopen it because the branch was "force-pushed or recreated"

@weiwangncar
Copy link
Collaborator

@mefrediani It is better to start a new PR.

@weiwangncar
Copy link
Collaborator

@mefrediani Some of the conflict may be due to the update in the submodule code. Normally you may be able to update your local branch by doing something like 'git fetch upstream' followed by 'git pull upstream develop' (here upstream points to wrf-model/WRF). But with submodule, you may need to do an additional step to update the code in the submodule: git submodule update --init --recursive (from WRF/ directory). Looking at the files changed at this point, it shows you have some differences from the submodule in WRF/phys/noahmp/, and not doing 'git submodule update' may be the cause.

@weiwangncar
Copy link
Collaborator

@mefrediani If you'd like to give this a try, I can re-open the PR for you.

@mefrediani
Copy link
Contributor Author

Sure, I can try that. Thanks, Wei.

@weiwangncar
Copy link
Collaborator

@mefrediani It doesn't look that I can re-open this PR.
@kkeene44 Can you re-open this PR?

@dudhia
Copy link
Collaborator

dudhia commented Apr 28, 2022

The message is that the mp38 branch was recreated, so it can't re-open. You may need to find the original code and do another PR from it.

@mefrediani
Copy link
Contributor Author

That's ok. I'll start another PR. Thanks for trying :)

weiwangncar pushed a commit that referenced this pull request Jan 26, 2023
Option to compute two-moment prognostics for graupel/hail

TYPE: enhancement, new feature

KEYWORDS: microphysics, Thompson microphysics, graupel, hail, double-moment

SOURCE: Code developed by Greg Thompson (JCSDA, UCAR) and Anders Jensen (RAL, NCAR).
Implemented in WRF v4.4 by Maria Frediani (RAL, NCAR)

DESCRIPTION OF CHANGES:

This code update includes

a package to compute two-moment prognostics for graupel/hail and a predicted density graupel category (mp_physics=38); an update to the Y-intercept relationship for one-moment graupel; and it replaces air temperature for wet-bulb temperature in riming and mixed phase processes.

Problem:

One-dimensional graupel/hail growth does not couple to the storm dynamics and is insufficient for predicting more detailed microphysical storm characteristics and hazards such as hail size, density, and fall speed, which can be used to provide guidance on the timing and spatial extent of damaging hail.

Sensitivity studies have shown that using a constant intercept parameter and a constant density can significantly constrain predicted hail size: simulated storms either produced only pea-size or baseball-size hail (Gilmore et al. 2004).

Improving the representation of riming and mixed phase processes leads to improvements in predicted storm dynamics and propagation speed through microphysical feedbacks and also improves the spatial distribution and type of precipitation at the surface.

Solution:

Changes related with the new package mp_physics=38 include:

Variable density for graupel (rho_g)
Parameters become a function of rho_g (am_g, av_g, bv_g, cge, cgg, oamg)
Extra dimension in lookup tables to account for graupel variable density (rho_g)
New source/sink terms for 3-moment graupel
Computation of radar reflectivity and nwp diagnostics using graupel volume mixing ratio
Additional modifications affecting mp_physics=8 and mp_physics=28 include:

Fall speed power law relations (av_i from 1847.5 to 1493.9)
Reduced dimension of cse, csg (from 18 to 17)
Use of wet-bulb temperature for riming and mixed-phase process
Modified relationship for the Y-intercept of one-moment graupel to shift the properties of the graupel category to become more hail-like, resulting in a category that represents both graupel and hail.

LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M phys/module_diag_nwp.F
M phys/module_diagnostics_driver.F
M phys/module_microphysics_driver.F
M phys/module_mp_thompson.F
M phys/module_physics_init.F

TESTS CONDUCTED:
1. The modifications were initially demonstrated using the original development made for WRF v4.0 (Jensen et al 2021, under review, MWR-D-21-0319). The operational mp28, mp28 with modified graupel Y-intercept, and mp38 were evaluated for a case study during the PECAN campaign using observed hail sizes from storm reports and estimated from radar. The evaluation showed clear improvement of the simulated reflectivity values in the upper-levels of discrete storms, coinciding with a significant reduction in the areal extent of graupel aloft, also seen when using the updated one-moment scheme. The two-moment and predicted density graupel scheme was also better able to predict a wide variety of hail sizes at the surface, including large (>2-inch in diameter) hail that was observed during this case.

The implementation for this develop branch (aiming at the release v4.4) was tested using a case study from the Relampago campaign and results from mp28, mp38-v4.0, mp38-develop-v4.4 were compared. This comparison indicates that the implementation was successful.

2. It passed regression tests.

RELEASE NOTES: A package to compute two-moment prognostics for graupel/hail and a predicted density graupel category is added in the Thompson scheme (mp_physics=38); Other updates to the scheme include a change to the Y-intercept relationship for one-moment graupel; and replacement of air temperature for wet-bulb temperature in riming and mixed phase processes.

The code requires a data file to run. This data file: qr_acr_qg_mp38V1.dat can be found on NCAR's computer under /glade/work/wrfhelp/WRF_files/, and online at http://www2.mmm.ucar.edu/wrf/src/wrf_files/. If you prefer to compute this file, set namelist write_thompson_mp38table = true. Note that it can take up to 18 min to compute this table using a 12-CPU job, 4 min on 128-CPU, and several hours if computed on a single CPU.
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
wrf-model#1808)

Option to compute two-moment prognostics for graupel/hail

TYPE: enhancement, new feature

KEYWORDS: microphysics, Thompson microphysics, graupel, hail, double-moment

SOURCE: Code developed by Greg Thompson (JCSDA, UCAR) and Anders Jensen (RAL, NCAR).
Implemented in WRF v4.4 by Maria Frediani (RAL, NCAR)

DESCRIPTION OF CHANGES:

This code update includes

a package to compute two-moment prognostics for graupel/hail and a predicted density graupel category (mp_physics=38); an update to the Y-intercept relationship for one-moment graupel; and it replaces air temperature for wet-bulb temperature in riming and mixed phase processes.

Problem:

One-dimensional graupel/hail growth does not couple to the storm dynamics and is insufficient for predicting more detailed microphysical storm characteristics and hazards such as hail size, density, and fall speed, which can be used to provide guidance on the timing and spatial extent of damaging hail.

Sensitivity studies have shown that using a constant intercept parameter and a constant density can significantly constrain predicted hail size: simulated storms either produced only pea-size or baseball-size hail (Gilmore et al. 2004).

Improving the representation of riming and mixed phase processes leads to improvements in predicted storm dynamics and propagation speed through microphysical feedbacks and also improves the spatial distribution and type of precipitation at the surface.

Solution:

Changes related with the new package mp_physics=38 include:

Variable density for graupel (rho_g)
Parameters become a function of rho_g (am_g, av_g, bv_g, cge, cgg, oamg)
Extra dimension in lookup tables to account for graupel variable density (rho_g)
New source/sink terms for 3-moment graupel
Computation of radar reflectivity and nwp diagnostics using graupel volume mixing ratio
Additional modifications affecting mp_physics=8 and mp_physics=28 include:

Fall speed power law relations (av_i from 1847.5 to 1493.9)
Reduced dimension of cse, csg (from 18 to 17)
Use of wet-bulb temperature for riming and mixed-phase process
Modified relationship for the Y-intercept of one-moment graupel to shift the properties of the graupel category to become more hail-like, resulting in a category that represents both graupel and hail.

LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M phys/module_diag_nwp.F
M phys/module_diagnostics_driver.F
M phys/module_microphysics_driver.F
M phys/module_mp_thompson.F
M phys/module_physics_init.F

TESTS CONDUCTED:
1. The modifications were initially demonstrated using the original development made for WRF v4.0 (Jensen et al 2021, under review, MWR-D-21-0319). The operational mp28, mp28 with modified graupel Y-intercept, and mp38 were evaluated for a case study during the PECAN campaign using observed hail sizes from storm reports and estimated from radar. The evaluation showed clear improvement of the simulated reflectivity values in the upper-levels of discrete storms, coinciding with a significant reduction in the areal extent of graupel aloft, also seen when using the updated one-moment scheme. The two-moment and predicted density graupel scheme was also better able to predict a wide variety of hail sizes at the surface, including large (>2-inch in diameter) hail that was observed during this case.

The implementation for this develop branch (aiming at the release v4.4) was tested using a case study from the Relampago campaign and results from mp28, mp38-v4.0, mp38-develop-v4.4 were compared. This comparison indicates that the implementation was successful.

2. It passed regression tests.

RELEASE NOTES: A package to compute two-moment prognostics for graupel/hail and a predicted density graupel category is added in the Thompson scheme (mp_physics=38); Other updates to the scheme include a change to the Y-intercept relationship for one-moment graupel; and replacement of air temperature for wet-bulb temperature in riming and mixed phase processes.

The code requires a data file to run. This data file: qr_acr_qg_mp38V1.dat can be found on NCAR's computer under /glade/work/wrfhelp/WRF_files/, and online at http://www2.mmm.ucar.edu/wrf/src/wrf_files/. If you prefer to compute this file, set namelist write_thompson_mp38table = true. Note that it can take up to 18 min to compute this table using a 12-CPU job, 4 min on 128-CPU, and several hours if computed on a single CPU.
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