-
Notifications
You must be signed in to change notification settings - Fork 180
Support for NSSL 2-Moment Microphysics #144
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
Changes from 12 commits
29de48e
a115ff2
ecccdb1
026c942
9be11f6
e7b3f42
f1fa53b
ae68032
efd9294
3acdba1
d9c2124
e488ebf
74b041a
9214b41
c7f1ca0
799b3d7
180b994
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,4 @@ | |
| *.mod | ||
| *.a | ||
| *.pyc | ||
| *.i90 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This suite looks like it is derived from GFS_v15p2. Is that right? If not, could you edit the PR description to describe the purpose of the suite (e.g. operational GFS suite with NSSL MP substituted for GFDL MP)?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR comment has been edited. |
||
|
|
||
| <suite name="HMTW_2020_mp2" lib="ccppphys" ver="3"> | ||
| <!-- <init></init> --> | ||
| <group name="time_vary"> | ||
| <subcycle loop="1"> | ||
| <scheme>GFS_time_vary_pre</scheme> | ||
| <scheme>GFS_rrtmg_setup</scheme> | ||
| <scheme>GFS_rad_time_vary</scheme> | ||
| <scheme>GFS_phys_time_vary</scheme> | ||
| <!--scheme>stochastic_physics</scheme> | ||
| <scheme>stochastic_physics_sfc</scheme--> | ||
| </subcycle> | ||
| </group> | ||
| <group name="radiation"> | ||
| <subcycle loop="1"> | ||
| <scheme>GFS_suite_interstitial_rad_reset</scheme> | ||
| <scheme>GFS_rrtmg_pre</scheme> | ||
| <scheme>rrtmg_sw_pre</scheme> | ||
| <scheme>rrtmg_sw</scheme> | ||
| <scheme>rrtmg_sw_post</scheme> | ||
| <scheme>rrtmg_lw_pre</scheme> | ||
| <scheme>rrtmg_lw</scheme> | ||
| <scheme>rrtmg_lw_post</scheme> | ||
| <scheme>GFS_rrtmg_post</scheme> | ||
| </subcycle> | ||
| </group> | ||
| <group name="physics"> | ||
| <subcycle loop="1"> | ||
| <scheme>GFS_suite_interstitial_phys_reset</scheme> | ||
| <scheme>GFS_suite_stateout_reset</scheme> | ||
| <scheme>get_prs_fv3</scheme> | ||
| <scheme>GFS_suite_interstitial_1</scheme> | ||
| <scheme>GFS_surface_generic_pre</scheme> | ||
| <scheme>GFS_surface_composites_pre</scheme> | ||
| <scheme>dcyc2t3</scheme> | ||
| <scheme>GFS_surface_composites_inter</scheme> | ||
| <scheme>GFS_suite_interstitial_2</scheme> | ||
| </subcycle> | ||
| <!-- Surface iteration loop --> | ||
| <subcycle loop="2"> | ||
| <scheme>sfc_diff</scheme> | ||
| <scheme>GFS_surface_loop_control_part1</scheme> | ||
| <scheme>sfc_nst_pre</scheme> | ||
| <scheme>sfc_nst</scheme> | ||
| <scheme>sfc_nst_post</scheme> | ||
| <scheme>lsm_noah</scheme> | ||
| <scheme>sfc_sice</scheme> | ||
| <scheme>GFS_surface_loop_control_part2</scheme> | ||
| </subcycle> | ||
| <!-- End of surface iteration loop --> | ||
| <subcycle loop="1"> | ||
| <scheme>GFS_surface_composites_post</scheme> | ||
| <scheme>sfc_diag</scheme> | ||
| <scheme>sfc_diag_post</scheme> | ||
| <scheme>GFS_surface_generic_post</scheme> | ||
| <scheme>GFS_PBL_generic_pre</scheme> | ||
| <scheme>hedmf</scheme> | ||
| <scheme>GFS_PBL_generic_post</scheme> | ||
| <scheme>GFS_GWD_generic_pre</scheme> | ||
| <scheme>cires_ugwp</scheme> | ||
| <scheme>cires_ugwp_post</scheme> | ||
| <scheme>GFS_GWD_generic_post</scheme> | ||
| <scheme>rayleigh_damp</scheme> | ||
| <scheme>GFS_suite_stateout_update</scheme> | ||
| <scheme>ozphys</scheme> | ||
| <scheme>GFS_DCNV_generic_pre</scheme> | ||
| <scheme>get_phi_fv3</scheme> | ||
| <scheme>GFS_suite_interstitial_3</scheme> | ||
| <scheme>GFS_DCNV_generic_post</scheme> | ||
| <scheme>GFS_SCNV_generic_pre</scheme> | ||
| <scheme>GFS_SCNV_generic_post</scheme> | ||
| <scheme>GFS_suite_interstitial_4</scheme> | ||
| <scheme>cnvc90</scheme> | ||
| <scheme>GFS_MP_generic_pre</scheme> | ||
| <scheme>mp_nssl_2mom</scheme> | ||
| <scheme>GFS_MP_generic_post</scheme> | ||
| <scheme>maximum_hourly_diagnostics</scheme> | ||
| </subcycle> | ||
| </group> | ||
| <group name="stochastics"> | ||
| <subcycle loop="1"> | ||
| <scheme>GFS_stochastics</scheme> | ||
| </subcycle> | ||
| </group> | ||
| <!-- <finalize></finalize> --> | ||
| </suite> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -140,6 +140,7 @@ module GFS_typedefs | |
| #ifdef CCPP | ||
| !--- restart information | ||
| logical :: restart !< flag whether this is a coldstart (.false.) or a warmstart/restart (.true.) | ||
| logical :: cycling !< flag whether this is a coldstart (.false.) or a cycled run (.true.) | ||
| !--- hydrostatic/non-hydrostatic flag | ||
| logical :: hydrostatic !< flag whether this is a hydrostatic or non-hydrostatic run | ||
| #endif | ||
|
|
@@ -707,6 +708,7 @@ module GFS_typedefs | |
| integer :: imp_physics !< choice of microphysics scheme | ||
| integer :: imp_physics_gfdl = 11 !< choice of GFDL microphysics scheme | ||
| integer :: imp_physics_thompson = 8 !< choice of Thompson microphysics scheme | ||
| integer :: imp_physics_nssl = 17 !< choice of NSSL microphysics scheme | ||
| integer :: imp_physics_wsm6 = 6 !< choice of WSMG microphysics scheme | ||
| integer :: imp_physics_zhao_carr = 99 !< choice of Zhao-Carr microphysics scheme | ||
| integer :: imp_physics_zhao_carr_pdf = 98 !< choice of Zhao-Carr microphysics scheme with PDF clouds | ||
|
|
@@ -1065,12 +1067,16 @@ module GFS_typedefs | |
| integer :: ntrw !< tracer index for rain water | ||
| integer :: ntsw !< tracer index for snow water | ||
| integer :: ntgl !< tracer index for graupel | ||
| integer :: nthl !< tracer index for hail | ||
| integer :: ntclamt !< tracer index for cloud amount | ||
| integer :: ntlnc !< tracer index for liquid number concentration | ||
| integer :: ntinc !< tracer index for ice number concentration | ||
| integer :: ntrnc !< tracer index for rain number concentration | ||
| integer :: ntsnc !< tracer index for snow number concentration | ||
| integer :: ntgnc !< tracer index for graupel number concentration | ||
| integer :: nthnc !< tracer index for hail number concentration | ||
| integer :: nqvolg !< tracer index for graupel particle volume m3 kg-1 | ||
| integer :: nqvolh !< tracer index for hail particle volume m3 kg-1 | ||
| integer :: ntke !< tracer index for kinetic energy | ||
| integer :: nto !< tracer index for oxygen ion | ||
| integer :: nto2 !< tracer index for oxygen | ||
|
|
@@ -1128,6 +1134,7 @@ module GFS_typedefs | |
| #ifdef CCPP | ||
| logical :: first_time_step !< flag signaling first time step for time integration routine | ||
| logical :: restart !< flag whether this is a coldstart (.false.) or a warmstart/restart (.true.) | ||
| logical :: cycling !< flag whether this is a coldstart (.false.) or a cycled run (.true.) | ||
| logical :: hydrostatic !< flag whether this is a hydrostatic or non-hydrostatic run | ||
| #endif | ||
| integer :: jdat(1:8) !< current forecast date and time | ||
|
|
@@ -2894,6 +2901,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & | |
| logical :: aux2d_time_avg(1:naux2dmax) = .false. !< flags for time averaging of auxiliary 2d arrays | ||
| logical :: aux3d_time_avg(1:naux3dmax) = .false. !< flags for time averaging of auxiliary 3d arrays | ||
|
|
||
| logical :: cycling = .false. !< flag to activate extra cycling procedures | ||
| real(kind=kind_phys) :: fhcyc = 0. !< frequency for surface data cycling (hours) | ||
| integer :: thermodyn_id = 1 !< valid for GFS only for get_prs/phi | ||
| integer :: sfcpress_id = 1 !< valid for GFS only for get_prs/phi | ||
|
|
@@ -4060,12 +4068,16 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & | |
| Model%ntrw = get_tracer_index(Model%tracer_names, 'rainwat', Model%me, Model%master, Model%debug) | ||
| Model%ntsw = get_tracer_index(Model%tracer_names, 'snowwat', Model%me, Model%master, Model%debug) | ||
| Model%ntgl = get_tracer_index(Model%tracer_names, 'graupel', Model%me, Model%master, Model%debug) | ||
| Model%nthl = get_tracer_index(Model%tracer_names, 'hailwat', Model%me, Model%master, Model%debug) | ||
| Model%ntclamt = get_tracer_index(Model%tracer_names, 'cld_amt', Model%me, Model%master, Model%debug) | ||
| Model%ntlnc = get_tracer_index(Model%tracer_names, 'water_nc', Model%me, Model%master, Model%debug) | ||
| Model%ntinc = get_tracer_index(Model%tracer_names, 'ice_nc', Model%me, Model%master, Model%debug) | ||
| Model%ntrnc = get_tracer_index(Model%tracer_names, 'rain_nc', Model%me, Model%master, Model%debug) | ||
| Model%ntsnc = get_tracer_index(Model%tracer_names, 'snow_nc', Model%me, Model%master, Model%debug) | ||
| Model%ntgnc = get_tracer_index(Model%tracer_names, 'graupel_nc', Model%me, Model%master, Model%debug) | ||
| Model%nthnc = get_tracer_index(Model%tracer_names, 'hail_nc', Model%me, Model%master, Model%debug) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As mentioned elsewhere in the comments, I'm assuming there are changes to a field_table file to use these new tracers?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, there is a new field_table. Where in the tree would I commit that file?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that the field_tables are in this or the parent (ufs-weather-model) repository anywhere. I think that they are considered as part of the input data and are typically staged on the platforms where regression tests are performed. You could just attach the field_table that you used as part of a comment in this PR so that the file can be staged when regression tests are done. @climbfuji, do you have a better idea?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, attaching it to the PR is a good idea, thanks. |
||
| Model%nqvolg = get_tracer_index(Model%tracer_names, 'graupel_pv', Model%me, Model%master, Model%debug) | ||
| Model%nqvolh = get_tracer_index(Model%tracer_names, 'hail_pv', Model%me, Model%master, Model%debug) | ||
| Model%ntke = get_tracer_index(Model%tracer_names, 'sgs_tke', Model%me, Model%master, Model%debug) | ||
| #ifdef CCPP | ||
| Model%nqrimef = get_tracer_index(Model%tracer_names, 'q_rimef', Model%me, Model%master, Model%debug) | ||
|
|
@@ -4177,6 +4189,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & | |
| #ifdef CCPP | ||
| Model%first_time_step = .true. | ||
| Model%restart = restart | ||
| Model%cycling = cycling | ||
| Model%hydrostatic = hydrostatic | ||
| #endif | ||
| Model%jdat(1:8) = jdat(1:8) | ||
|
|
@@ -4572,6 +4585,20 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & | |
| ' num_p3d =',Model%num_p3d, & | ||
| ' num_p2d =',Model%num_p2d | ||
|
|
||
| elseif (Model%imp_physics == Model%imp_physics_nssl) then ! NSSL microphysics | ||
| Model%npdf3d = 0 | ||
| Model%num_p3d = 3 | ||
| Model%num_p2d = 1 | ||
| Model%pdfcld = .false. | ||
| Model%shcnvcw = .false. | ||
| Model%ncnd = 5 | ||
| Model%nleffr = 1 | ||
| Model%nieffr = 2 | ||
| Model%nseffr = 3 | ||
| if (Model%me == Model%master) print *,' Using NSSL double moment', & | ||
| ' microphysics', ' num_p3d =',Model%num_p3d, & | ||
| ' num_p2d =',Model%num_p2d | ||
|
|
||
| else if (Model%imp_physics == Model%imp_physics_mg) then ! Morrison-Gettelman Microphysics | ||
| Model%npdf3d = 0 | ||
| Model%num_p3d = 5 | ||
|
|
@@ -4880,6 +4907,9 @@ subroutine control_print(Model) | |
| print *, ' ttendlim : ', Model%ttendlim | ||
| print *, ' ' | ||
| endif | ||
| if (Model%imp_physics == Model%imp_physics_nssl) then | ||
| print *, ' NSSL microphysical parameters' | ||
| endif | ||
| if (Model%imp_physics == Model%imp_physics_mg) then | ||
| print *, ' M-G microphysical parameters' | ||
| print *, ' fprcp : ', Model%fprcp | ||
|
|
@@ -5091,12 +5121,16 @@ subroutine control_print(Model) | |
| print *, ' ntrw : ', Model%ntrw | ||
| print *, ' ntsw : ', Model%ntsw | ||
| print *, ' ntgl : ', Model%ntgl | ||
| print *, ' nthl : ', Model%nthl | ||
| print *, ' ntclamt : ', Model%ntclamt | ||
| print *, ' ntlnc : ', Model%ntlnc | ||
| print *, ' ntinc : ', Model%ntinc | ||
| print *, ' ntrnc : ', Model%ntrnc | ||
| print *, ' ntsnc : ', Model%ntsnc | ||
| print *, ' ntgnc : ', Model%ntgnc | ||
| print *, ' nthnc : ', Model%nthnc | ||
| print *, ' nqvolg : ', Model%nqvolg | ||
| print *, ' nqvolh : ', Model%nqvolh | ||
| print *, ' ntke : ', Model%ntke | ||
| print *, ' nto : ', Model%nto | ||
| print *, ' nto2 : ', Model%nto2 | ||
|
|
@@ -5147,6 +5181,7 @@ subroutine control_print(Model) | |
| print *, ' sec : ', Model%sec | ||
| print *, ' first_time_step : ', Model%first_time_step | ||
| print *, ' restart : ', Model%restart | ||
| print *, ' cycling : ', Model%cycling | ||
| print *, ' hydrostatic : ', Model%hydrostatic | ||
| #endif | ||
| endif | ||
|
|
@@ -5801,6 +5836,7 @@ end subroutine diag_create | |
| subroutine diag_rad_zero(Diag, Model) | ||
| class(GFS_diag_type) :: Diag | ||
| type(GFS_control_type), intent(in) :: Model | ||
| integer :: i | ||
|
|
||
| Diag%fluxr = zero | ||
| Diag%topfsw%upfxc = zero | ||
|
|
@@ -5823,6 +5859,7 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) | |
| logical,optional, intent(in) :: linit, iauwindow_center | ||
|
|
||
| logical set_totprcp | ||
| integer :: i | ||
|
|
||
| !--- In/Out | ||
| Diag%srunoff = zero | ||
|
|
@@ -6445,7 +6482,7 @@ subroutine interstitial_create (Interstitial, IM, Model) | |
| end if | ||
| ! | ||
| ! Allocate arrays that are conditional on physics choices | ||
| if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then | ||
| if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_nssl) then | ||
| allocate (Interstitial%graupelmp (IM)) | ||
| allocate (Interstitial%icemp (IM)) | ||
| allocate (Interstitial%rainmp (IM)) | ||
|
|
@@ -6577,6 +6614,11 @@ subroutine interstitial_setup_tracers(Interstitial, Model) | |
| Interstitial%nncl = 5 | ||
| endif | ||
|
|
||
| if (Model%imp_physics == Model%imp_physics_nssl) then | ||
| Interstitial%nvdiff = Model%ntrac | ||
| Interstitial%nncl = 5 | ||
| end if | ||
|
|
||
| if (Model%imp_physics == Model%imp_physics_mg) then | ||
| if (abs(Model%fprcp) == 1) then | ||
| Interstitial%nncl = 4 ! MG2 with rain and snow | ||
|
|
@@ -6660,13 +6702,17 @@ subroutine interstitial_setup_tracers(Interstitial, Model) | |
| do n=2,Model%ntrac | ||
| if ( n /= Model%ntcw .and. n /= Model%ntiw .and. n /= Model%ntclamt .and. & | ||
| n /= Model%ntrw .and. n /= Model%ntsw .and. n /= Model%ntrnc .and. & | ||
| n /= Model%ntsnc .and. n /= Model%ntgl .and. n /= Model%ntgnc) then | ||
| ! n /= Model%ntlnc .and. n /= Model%ntinc .and. & | ||
| n /= Model%ntsnc .and. n /= Model%ntgl .and. n /= Model%ntgnc .and. & | ||
| n /= Model%nthl .and. n /= Model%nthnc .and. & | ||
| n /= Model%nqvolg .and. n /= Model%nqvolh ) then | ||
| tracers = tracers + 1 | ||
| if (Model%ntke == n ) then | ||
| Interstitial%otspt(tracers+1,1) = .false. | ||
| Interstitial%ntk = tracers | ||
| endif | ||
| if (Model%ntlnc == n .or. Model%ntinc == n .or. Model%ntrnc == n .or. Model%ntsnc == n .or. Model%ntgnc == n) & | ||
| if (Model%ntlnc == n .or. Model%ntinc == n .or. Model%ntrnc == n .or. Model%ntsnc == n .or. & | ||
| Model%ntgnc == n .or. Model%nthnc == n .or. Model%nqvolg == n .or. Model%nqvolh == n) & | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @grantfirl @tsupinie
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I think that's correct. It looks like that controls which tracers are advected in updrafts and downdrafts in the Chikira-Sugiyama convective scheme, which I've never used. At some point, we'll probably want to run tests to see what settings are best. For now, it's a bit over-complicated, I guess.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be honest I haven't really figured out the subgrid (shallow/deep) convective transport yet. The GFS_suite_interstitial_3_run and GFS_suite_interstitial_4_run routines have a duplicate logic that presumably could be replaced by the otspt array? I'm just looking at 3km dx, so I have those modules removed from the working suite, anyway.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MicroTed, do you have a branch where you have the SCM changes for this scheme? If so, could you point me to it? I'm generally more comfortable testing new schemes out there before FV3, so that would help me out for reviewing this again. Hopefully, we can get this regression tested with the FV3 and get this merged in to master this time around. :) |
||
| ! if (ntlnc == n .or. ntinc == n .or. ntrnc == n .or. ntsnc == n .or.& | ||
| ! ntrw == n .or. ntsw == n .or. ntgl == n) & | ||
| Interstitial%otspt(tracers+1,1) = .false. | ||
|
|
@@ -7023,7 +7069,7 @@ subroutine interstitial_phys_reset (Interstitial, Model) | |
| end if | ||
| ! | ||
| ! Reset fields that are conditional on physics choices | ||
| if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then | ||
| if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_nssl) then | ||
| Interstitial%graupelmp = clear_val | ||
| Interstitial%icemp = clear_val | ||
| Interstitial%rainmp = clear_val | ||
|
|
@@ -7376,8 +7422,8 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) | |
| end if | ||
| ! | ||
| ! Print arrays that are conditional on physics choices | ||
| if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then | ||
| write (0,*) 'Interstitial_print: values specific to GFDL/Thompson microphysics' | ||
| if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_nssl) then | ||
| write (0,*) 'Interstitial_print: values specific to GFDL/Thompson/NSSL microphysics' | ||
| write (0,*) 'sum(Interstitial%graupelmp ) = ', sum(Interstitial%graupelmp ) | ||
| write (0,*) 'sum(Interstitial%icemp ) = ', sum(Interstitial%icemp ) | ||
| write (0,*) 'sum(Interstitial%rainmp ) = ', sum(Interstitial%rainmp ) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this file (mp_nssl_2mom.F90) is the CCPP entry point scheme, it should not need to appear in the dependencies list (only the schemes list below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I think I have this correct now.