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

updates to P3, including a new 3-moment option #1356

Merged
merged 19 commits into from
Feb 25, 2021
Merged

updates to P3, including a new 3-moment option #1356

merged 19 commits into from
Feb 25, 2021

Conversation

hmorrison100
Copy link
Contributor

@hmorrison100 hmorrison100 commented Dec 31, 2020

TYPE: new feature

KEYWORDS: P3 microphysics

SOURCE: Hugh Morrison (NCAR)

DESCRIPTION OF CHANGES:

  1. Main update is to add 3-moment option for P3, which we have chosen as MP option 53. This uses the same P3 module so that all 4 versions (MP options 50, 51, 52, 53) use the same code base. Also added new lookup tables.

  2. Besides changes for the 3-moment option, a small bug fix was made to lookup table and the lookup tables were generalized to allow a larger range of mean ice particle sizes. This changes answers but has little impact compared to P3 in the previous WRF release.

  3. We also did general code cleanup and improved code comments.

LIST OF MODIFIED FILES:
module_mp_p3.F
module_microphysics_driver.F
module_physics_init.F
Registry_EM.COMMON

Also added new lookup tables in:
run/p3_lookupTable_2.dat-4.1
run/p3_lookupTable_1.dat-2momI_v5.1.6_oldDimax
run/p3_lookupTable_1.dat-3momI_v5.1.6.gz

Deleted the old lookup tables:
p3_lookup_table_1.dat-v4.1
p3_lookup_table_2.dat-v4.1

Modified files to handle moving the p3 lookup tables around:
Makefile
clean
test/em_b_wave/run_me_first.csh
test/em_convrad/run_me_first.csh
test/em_quarter_ss/run_me_first.csh
test/em_scm_xy/run_me_first.csh
test/em_seabreeze2d_x/run_me_first.csh
test/em_tropical_cyclone/run_me_first.csh

[Editor's note: We likely are removing all of these run_me_first.csh scripts in a later PR.]

TESTS CONDUCTED:

  1. Extensive testing was done for all MP options for P3 (50, 51, 52, 53)
  2. Jenkins test is all pass.

RELEASE NOTE: An updated version of P3 now includes a 3-moment option. Milbrandt et al. (2021) [Milbrandt, J. A., H. Morrison, D. T. Dawson II, and M. Paukert, 2021: A triple-moment representation of ice in the Predicted Particle Properties (P3) microphysics scheme, J. Atmos. Sci., 78(2), 439-458, https://doi.org/10.1175/JAS-D-20-0084.1]

@hmorrison100 hmorrison100 requested review from a team as code owners December 31, 2020 22:31
@davegill davegill changed the base branch from master to develop January 1, 2021 05:15
@davegill davegill changed the title updates to P3 updates to P3, , including a new 3-moment option Jan 1, 2021
@davegill
Copy link
Contributor

davegill commented Jan 1, 2021

@hmorrison100
The only failed job uses mp_physics=52.

 &physics
 mp_physics                          = 52,    52,    52,

Is this related to the new look-up table? Such as - it is not uncompressed in the regression test?

@davegill davegill changed the title updates to P3, , including a new 3-moment option updates to P3, including a new 3-moment option Jan 1, 2021
@hmorrison100 hmorrison100 requested a review from a team as a code owner January 4, 2021 15:38
@hmorrison100
Copy link
Contributor Author

I fixed the problem w/ option 52. The module_mp_p3.F code was pointing to the wrong lookup table (mix up with the lookup table complications w/ zipping, etc.). It works now in my tests.

davegill and others added 8 commits January 4, 2021 10:53
 Changes to be committed:
	modified:   Makefile
	modified:   clean
	modified:   test/em_b_wave/run_me_first.csh
	modified:   test/em_convrad/run_me_first.csh
	modified:   test/em_quarter_ss/run_me_first.csh
	modified:   test/em_scm_xy/run_me_first.csh
	modified:   test/em_seabreeze2d_x/run_me_first.csh
	modified:   test/em_tropical_cyclone/run_me_first.csh
Changes to be committed:
	modified:   Makefile
1. Remove the `;n' of files that have been removed from the repo.
2. Weird "fop" "Top" typo.
3. No longer have p3_*_table* files, zap from clean script.

 Changes to be committed:
	modified:   Makefile
	modified:   clean
 Test 1 | Jan 8th 2021 was also by scala
@davegill
Copy link
Contributor

davegill commented Jan 8, 2021

@hmorrison100
Hugh,
The mechanics of the regression test are now OK with your code.

Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: 2337703f45d882ec53d71eda3fec914a0f6fcaef, requested by: hmorrison100 for PR: https://github.com/wrf-model/WRF/pull/1356. For any query please send e-mail to David Gill.

    Test Type              | Expected  | Received |  Failed
    = = = = = = = = = = = = = = = = = = = = = = = =  = = = =
    Number of Tests        : 19           18
    Number of Builds       : 48           46
    Number of Simulations  : 166           164        0
    Number of Comparisons  : 105           104        0

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

@davegill
Copy link
Contributor

davegill commented Jan 8, 2021

@weiwangncar @dudhia
Folks,
Hugh's 3-moment PR is ready for review. The jenkins tests are working fine.

Makefile Outdated Show resolved Hide resolved
@davegill
Copy link
Contributor

davegill commented Feb 9, 2021

@hmorrison100 @dudhia @weiwangncar
This seems ready for review.

@davegill
Copy link
Contributor

davegill commented Feb 9, 2021

@hmorrison100 @weiwangncar @dudhia
Hugh,
Please take a look a the conflicts that need to be resolved. We are not sure which is what you want. Also, a "stop" statement is not a good idea to use in a physics routine. Use a "call wrf_error_fatal('some error mesage')" construct.

@davegill
Copy link
Contributor

davegill commented Feb 9, 2021

@hmorrison100
Hugh,
Is there a DOI for the paper yet?

@davegill
Copy link
Contributor

@dudhia @weiwangncar @hmorrison100
Folks,
I have a commit that removes the "stop" statements from this PR.
Do we want them? The code would be non-portable.

@hmorrison100
Copy link
Contributor Author

@hmorrison100
Hugh,
Is there a DOI for the paper yet?

Dave, yes the paper is now published. Here it is:
https://doi.org/10.1175/JAS-D-20-0084.1

@davegill
Copy link
Contributor

@hmorrison100
Hugh,

  1. There are conflicts in the code that need to be addressed.
  2. Would you update the PR message to include the publication citation. I've added the DOI, but it is says "in press".

@hmorrison100
Copy link
Contributor Author

Dave, I'm assuming by "code conflicts" you mean the 2 places that show up in module_mp_p3.F between the master and develop when I click on the button that says "resolve conflicts". In this case, the master version is the correct one.

For the stop statements, did you remove these or replace with something else? The lack of portability is a problem if we replace these with call wrf_error_fatal. We can around this by putting those in a separate if-block to tag as WRF with a "stop" statement otherwise. This is a little clunky but workable. I'm hesitant to just remove the stops without replacing them since the code will crash somewhere else.

@hmorrison100
Copy link
Contributor Author

Also, I just added the full reference of the paper to the PR message.

@davegill
Copy link
Contributor

@hmorrison100

I'm assuming by "code conflicts" you mean the 2 places that show up in module_mp_p3.F between the master and develop when I click on the button that says "resolve conflicts". In this case, the master version is the correct one.

Thanks, I'll fix it.

I'm hesitant to just remove the stops

I do have a replacement for them, but it is not portable. I am inclined to leave this alone right now.

I just added the full reference of the paper to the PR message.

Thanks for this.

@hmorrison100
Copy link
Contributor Author

Dave, thanks. If you're ok with it I agree it's better to just leave the stops in for now. We can design something more portable for a later update.

@davegill
Copy link
Contributor

@hmorrison100 @dudhia @weiwangncar
Folks,
This PR is ready to review.

@davegill
Copy link
Contributor

@kkeene44
Kelly,
There are a number of updated run_me_first scripts in the P3 PR.

@davegill
Copy link
Contributor

@weiwangncar @dudhia

Unlike real data case directory, there is only limited physics files that linked to the idealized case directories, and they often depend on the default options used. If we are not linking all of the physics files, we should not add any particular ones, such as those for p3.

Opinions on this?

@weiwangncar
Copy link
Collaborator

@davegill I did not realize Hugh requested to add these files to those idealized case directories. But my question is still if we link p3* files, should link other physics files?

@davegill
Copy link
Contributor

@weiwangncar @dudhia

my question is still if we link p3* files, should link other physics files?

We would probably need the scheme data for MP (Thompson, any others?), the radiation schemes (RRTM and RRTMG are used), and the LSM options.

@weiwangncar
Copy link
Collaborator

@davegill But they are not typically used by the idealized cases... And for those who dare to work on idealized cases, I'd like to assume they know where to get the physics files if needed.

@hmorrison100
Copy link
Contributor Author

@davegill @weiwangncar @dudhia What about the idea of linking files to run the MP schemes for the idealized cases, but not radiation or land surface? This would hopefully keep it manageable, while very few people would run these cases with radiation or land surface turned on.

@dudhia
Copy link
Collaborator

dudhia commented Feb 18, 2021

@hmorrison100 we are still figuring what we want to do in general with ideal cases and linking physics files which is a separate PR.

Copy link
Collaborator

@dudhia dudhia left a comment

Choose a reason for hiding this comment

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

I will approve from the physics coupling perspective. Details of file handling not considered for this.

@davegill davegill merged commit 4c07069 into wrf-model:develop Feb 25, 2021
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: new feature

KEYWORDS: P3 microphysics

SOURCE: Hugh Morrison (NCAR)

DESCRIPTION OF CHANGES:

1. Main update is to add 3-moment option for P3, which we have chosen as MP option 53. This uses the 
same P3 module so that all 4 versions (MP options 50, 51, 52, 53) use the same code base. Also added new 
lookup tables.

2. Besides changes for the 3-moment option, a small bug fix was made to lookup table and the lookup tables 
were generalized to allow a larger range of mean ice particle sizes. This changes answers but has little impact 
compared to P3 in the previous WRF release. 

3. We also did general code cleanup and improved code comments.

LIST OF MODIFIED FILES: 
module_mp_p3.F
module_microphysics_driver.F
module_physics_init.F
Registry_EM.COMMON

Also added new lookup tables in: 
run/p3_lookupTable_2.dat-4.1
run/p3_lookupTable_1.dat-2momI_v5.1.6_oldDimax
run/p3_lookupTable_1.dat-3momI_v5.1.6.gz

Deleted the old lookup tables:
p3_lookup_table_1.dat-v4.1
p3_lookup_table_2.dat-v4.1

Modified files to handle moving the p3 lookup tables around:
Makefile
clean
test/em_b_wave/run_me_first.csh
test/em_convrad/run_me_first.csh
test/em_quarter_ss/run_me_first.csh
test/em_scm_xy/run_me_first.csh
test/em_seabreeze2d_x/run_me_first.csh
test/em_tropical_cyclone/run_me_first.csh

[Editor's note: We likely are removing all of these `run_me_first.csh` scripts in a later PR.]

TESTS CONDUCTED: 
1. Extensive testing was done for all MP options for P3 (50, 51, 52, 53)
2. Jenkins test is all pass.

RELEASE NOTE: An updated version of P3 now includes a 3-moment option. Milbrandt et al. (2021) [Milbrandt, J. A., H. Morrison, D. T. Dawson II, and M. Paukert, 2021: A triple-moment representation of ice in the Predicted Particle Properties (P3) microphysics scheme, J. Atmos. Sci., 78(2), 439-458, https://doi.org/10.1175/JAS-D-20-0084.1]
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.

6 participants