Skip to content

Separating new_diagnostics from the rest in diag_misc module#1095

Merged
davegill merged 3 commits intowrf-model:developfrom
weiwangncar:diags
Feb 20, 2020
Merged

Separating new_diagnostics from the rest in diag_misc module#1095
davegill merged 3 commits intowrf-model:developfrom
weiwangncar:diags

Conversation

@weiwangncar
Copy link
Collaborator

@weiwangncar weiwangncar commented Feb 14, 2020

TYPE: enhancement

KEYWORDS: diagnostics, misc, nwp diagnostics

SOURCE: internal

DESCRIPTION OF CHANGES:
The module_diag_misc.F is getting long and complicated and it makes adding additional
diagnostics (such as accumulated tendencies) difficult. This PR pulls the code related to
new_diagnostics out to a new module: module_diag_nwp.F, and keeps the rest (currently only
three items: bucket calculations for long simulations, interval rainfall, and surface pressure
changes) in the original module: module_diag_misc.F.

LIST OF MODIFIED FILES: list of changed files

M main/depend.common
M phys/Makefile
M phys/module_diag_misc.F
A phys/module_diag_nwp.F
M phys/module_diagnostics_driver.F

TESTS CONDUCTED:

  • Passed Jenkins test
  • Tested the code before and after the change for a 3 hour run with nwp_diagnostics turned on, and prec_acc_dt set to 60.
  1. The output in wrfout files (which include PREC_ACC_C, PREC_ACC_NC, UP_HELI_MAX,
    WSPD10MAX, W_MEAN, REFD_MAX and others) are bit-for-bit identical.
  2. The option diag_print is also turned on which generates some prints (such as domain-averaged dpsdt, dmudt) in rsl.out.0000, and the output from both runs are also identical.

@weiwangncar weiwangncar requested review from a team as code owners February 14, 2020 02:32
@kkeene44
Copy link
Collaborator

@weiwangncar @davegill @smileMchen
Looks okay to me!

@davegill
Copy link
Contributor

@weiwangncar
For the initial output, do you want to put a call to this new routine in start_em.F? It stops the non-zero values.

Here is the location of the pressure level diag call in start_em:

   1955    IF (config_flags%p_lev_diags == PRESS_DIAGS ) THEN
   1956     CALL wrf_debug ( 200 , ' PLD: pressure level diags' )
   1957     CALL pld (                                  &

Here is the location of the height level diag call in start_em:

   2002    IF (config_flags%z_lev_diags == Z_DIAGS ) THEN
   2003      CALL wrf_debug ( 200 , ' ZLD: height level and AGL diags' )
   2004      CALL zld (                                  &

@weiwangncar
Copy link
Collaborator Author

@davegill Most variables computed in these two modules are diagnostics from model, and they don't have values at 0 h. For example, variables such as prec_acc_*, dpsdt, and so on in the remaining of module_diag_misc.F, and wspd10max, up_heli_max etc in the new module_diag_nwp.F.

@davegill
Copy link
Contributor

@weiwangncar

Most variables computed in these two modules are diagnostics from model, and they don't have values at 0 h.

Wei,
OK, I am fine with that issue.

Please complete the PR message (maybe show the same diagnostic is the same value before vs after) and I'll be OK with this PR.

@weiwangncar
Copy link
Collaborator Author

@davegill PR message is updated.

Copy link
Contributor

@davegill davegill left a comment

Choose a reason for hiding this comment

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

Approved

@davegill davegill removed the request for review from a team February 20, 2020 01:01
@davegill davegill merged commit 2de5cda into wrf-model:develop Feb 20, 2020
@weiwangncar weiwangncar deleted the diags branch February 20, 2020 01:09
davegill added a commit to davegill/WRF that referenced this pull request Feb 20, 2020
This is to fix the conflict that PR wrf-model#1095
"Separating new_diagnostics from the rest in diag_misc module"
caused. There were a couple of places where the old string
"FAST_KHAIN_LYNN" was changed to the new "FAST_KHAIN_LYNN_SHPUND".
Only a couple of lines of diffs, but git went crazy with the
the size of the conflict.
davegill added a commit that referenced this pull request Feb 27, 2020
…1097)

TYPE: enhancement / new features

KEYWORDS: cloud microphysics, polarimetric-forward-operator 

SOURCE: Jacob Shpund, Alexander Khain, and Barry Lynn (The Hebrew University of Jerusalem)

DESCRIPTION OF CHANGES: 
A new updated Fast Spectral Bin Microphysics (FSBM) cloud microphysical scheme.

There are updates across all the FSBM microphysical scheme including: 
1. switch to use either graupel or hail, condensation/evaporation, nucleation (cloud base 
nucleation, 3 log-normal user-defined aerosol distribution), 
2. adaptive cond./evap. time-step, 
3. updated collision-coalescence, 
4. spontaneous rain breakup, 
5. spontaneous snow breakup.

A forward polarimetric operator is coupled to the FSBM scheme. The user can see the total 
reflectivity field, as well as the per hydrometeor total reflectivity (rain, snow, graupel/hail). 
Please see mandatory input tables info in the RELEASE NOTE.    

Modified PR from the original #848 and then the additionally modified PR #1085 
A new version of the FAST (33 bins) Spectral-Bin Microphysics (FSBM). 
From #848 -> #1085 
1. Inadvertent white space removed
2. Build with NMM
3. Remove -r8 option

From #1085 to #1097 
1. Fix conflict introduced with #1095 "Separating new_diagnostics from the rest in 
diag_misc module"

LIST OF MODIFIED FILES: 
M       Makefile
M       Registry/registry.em_shared_collection
A       Registry/registry.polrad
M       Registry/registry.sbm
M       arch/postamble
M       configure
M       dyn_em/solve_em.F
M       phys/Makefile
M       phys/module_diag_nwp.F
M       phys/module_diagnostics_driver.F
M       phys/module_microphysics_driver.F
A       phys/module_mp_SBM_polar_radar.F
M       phys/module_mp_fast_sbm.F
M       phys/module_physics_init.F
M       share/module_check_a_mundo.F

TESTS CONDUCTED: 
1. Automated jenkins regression test is all PASS.
2. The code has been compiled and used successfully for 10h of deep convection of the 20th May 2011 MC3E campaign test case (a manuscript consist of scheme details has been submitted for publication).
    * Compiled using Intel compiler 2019 (ifort version 19.0.3.199)
    * Configured using options 15 INTEL (ifort/icc,  dmpar) and nest option 1.
    * BC/IC used the NCEP FNL (Final) Operational Global Analysis data are on 1x1 degree grids  

- Domain setup and time step (5s per 1.3 km):
```
&domains
 time_step                           = 15,
 time_step_fract_num         = 0,
 time_step_fract_den           = 1,
 max_dom                             = 2,
 dx                                   = 4000, 1333.33,
 dy                                   = 4000, 1333.33,
 grid_id                            = 1,     2,   
 parent_id                        = 0,     1,  
 parent_grid_ratio             = 1,     3, 
 parent_time_step_ratio   = 1,     3, 
```

- In order to use the bin-wise polarimetric forward operator, a new flag must exist in the  <namelist.input> file:
```
&physics
sbm_diagnostics                     = 1,     1, 
```

- The FAST SBM code is not currently configure to work with default 8-byte reals. 

RELEASE NOTE:
Fast (33 bins) Spectral-bin Microphysics (FSBM):  in order to run the new FSBM scheme, users needs to download an external directory named "SBM_input_33" consist of mandatory input tables and place it in the 'run' directory. In case the coupled polarimetric forward operator is to be used (e.g., 'sbm_diagnostics = 1'), a second directory consist of scattering amplitudes named "SBM_scatter_amplit.tgz" needs to be placed in the 'run' directory. Both directories are compressed and can be downloaded at the following link: 
https://drive.google.com/drive/folders/1qxYyQwKI1wKQYasDUkQvVgHs11prLiqA?usp=sharing
(on a Linux machine, you may need to escape the `?` character with `\?`).
The FAST SBM code is not currently configure to work with default 8-byte reals.
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