-
Notifications
You must be signed in to change notification settings - Fork 727
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
Implicit Explicit Vertical Advection (IEVA) #1373
Conversation
…k-scalar-tend subroutine (u_old, v_old) to pass through and use in ww_split. Also fixed loop bounds in the *_implicit routines.
…e IEVA works correctly.
…ed so that the IEVA parameter info prints out only when ieva == TRUE, so never if its off, and only on the 3rd RK step if its on.
Dave,
can we talk about these - some are not mine (I did not change these) and some are needed for the code.
Lou
… On Jan 21, 2021, at 12:00 PM, Dave Gill ***@***.***> wrote:
@davegill commented on this pull request.
In dyn_em/module_advect_em.F <#1373 (comment)>:
> @@ -10821,7 +10827,7 @@ PROGRAM feeder
print *,'set title "Mono Advection" font ",20"'
ELSE IF (config_flags%scalar_adv_opt .EQ. 3 ) THEN
print *,'set title "WENO Advection" font ",20"'
- ELSE IF (config_flags%scalar_adv_opt .EQ. 4 ) THEN
+ ELSE IF (config_flags%scalar_adv_opt .EQ. 3 ) THEN
revert this change
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1373 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADUKPVB35T6WYIHCTPTXJDS3BTT7ANCNFSM4WLMF3CA>.
----------------------------------------------------------------------------
| Dr. Louis J. Wicker
| NSSL/FRDD Rm 3336
| National Weather Center
| 120 David L. Boren Boulevard, Norman, OK 73072
|
| E-mail: [email protected] <mailto:[email protected]>
| HTTP: www.nssl.noaa.gov/~lwicker <http://www.nssl.noaa.gov/~lwicker>
| Phone: (405) 325-6340
| Fax: (405) 325-2316
|
I "Yet all is not lost," Francis said. "Human beings, while
| capable of the worst, are also capable of rising above
| themselves, choosing again what is good, and making
| a new start, despite their mental and social conditioning."
|
| Pope Francis
----------------------------------------------------------------------------
|
| "The contents of this message are mine personally and
| do not reflect any position of the Government or NOAA."
|
----------------------------------------------------------------------------
|
this is really weird.
I have a stock 4.2.1 code, and the terminal x11 is set.
I have the IEVA code base, which is 4.2.1 base,
and its set term x11.
L
… On Jan 21, 2021, at 12:00 PM, Dave Gill ***@***.***> wrote:
@davegill commented on this pull request.
In dyn_em/module_advect_em.F <#1373 (comment)>:
> @@ -10812,7 +10818,7 @@ PROGRAM feeder
print *,' '
print *,'Lines to input to gnuplot'
print *,' '
- print *,"set terminal x11"
+ print *,"set term x11"
revert this change
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1373 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADUKPRDIFF7DNRGLSJDSQDS3BTS7ANCNFSM4WLMF3CA>.
----------------------------------------------------------------------------
| Dr. Louis J. Wicker
| NSSL/FRDD Rm 3336
| National Weather Center
| 120 David L. Boren Boulevard, Norman, OK 73072
|
| E-mail: [email protected] <mailto:[email protected]>
| HTTP: www.nssl.noaa.gov/~lwicker <http://www.nssl.noaa.gov/~lwicker>
| Phone: (405) 325-6340
| Fax: (405) 325-2316
|
I "Yet all is not lost," Francis said. "Human beings, while
| capable of the worst, are also capable of rising above
| themselves, choosing again what is good, and making
| a new start, despite their mental and social conditioning."
|
| Pope Francis
----------------------------------------------------------------------------
|
| "The contents of this message are mine personally and
| do not reflect any position of the Government or NOAA."
|
----------------------------------------------------------------------------
|
Dave,
okay, I know what I did here - copying older routines. I will fix what I can and issue a new pull request.
Lou
… On Jan 21, 2021, at 11:59 AM, Dave Gill ***@***.***> wrote:
@davegill commented on this pull request.
In dyn_em/module_advect_em.F <#1373 (comment)>:
> @@ -10753,7 +10759,7 @@ PROGRAM feeder
CALL advect_scalar_weno ( field(ims,kms,jms,im), &
field_old(ims,kms,jms,im), &
tendency(ims,kms,jms), &
- ru, rv, rom, c1, c2, &
+ ru, rv, rom, &
revert this change
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1373 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADUKPWO7YTJYPPZESS6T5LS3BTRVANCNFSM4WLMF3CA>.
----------------------------------------------------------------------------
| Dr. Louis J. Wicker
| NSSL/FRDD Rm 3336
| National Weather Center
| 120 David L. Boren Boulevard, Norman, OK 73072
|
| E-mail: [email protected] <mailto:[email protected]>
| HTTP: www.nssl.noaa.gov/~lwicker <http://www.nssl.noaa.gov/~lwicker>
| Phone: (405) 325-6340
| Fax: (405) 325-2316
|
I "Yet all is not lost," Francis said. "Human beings, while
| capable of the worst, are also capable of rising above
| themselves, choosing again what is good, and making
| a new start, despite their mental and social conditioning."
|
| Pope Francis
----------------------------------------------------------------------------
|
| "The contents of this message are mine personally and
| do not reflect any position of the Government or NOAA."
|
----------------------------------------------------------------------------
|
…and superfluous argument in advect_scalar_weno
@louiswicker @davegill The code base is master. We should change that to develop first. |
Dave, I have fixed the feeder programs to work with the new calling interfaces for the PD and MONO routines - do you NOT want me to fix the feeder call to run with the current interfaces that used in the model?
Lou
… On Jan 21, 2021, at 12:35 PM, Dave Gill ***@***.***> wrote:
@davegill commented on this pull request.
In dyn_em/module_advect_em.F <#1373 (comment)>:
> @@ -10558,8 +10573,7 @@ PROGRAM feeder
msfty
REAL , DIMENSION( : ), ALLOCATABLE :: fzm, &
fzp, &
- rdzw, znw,dnw, rdnw, dn, rdn, &
- c1, c2
+ rdzw, znw,dnw, rdnw, dn, rdn
Lou,
My issue was that a number of these calls in this "program feeder" section have the arguments "c1, c2" are removed. You do not need to fix the program feeder program. However, do not remove required existing args.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1373 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADUKPWM7THAUU5PWIA2WHLS3BXWPANCNFSM4WLMF3CA>.
------------------------------------------------------------------------------
| Dr. Louis J. Wicker
| NSSL/FRDD Rm 3336
| National Weather Center
| 120 David L. Boren Boulevard, Norman, OK 73072
|
| E-mail: [email protected]
| HTTP: www.nssl.noaa.gov/~lwicker
| Phone: (405) 325-6340
| Fax: (405) 325-2316
|
|
| Tell me and I forget. Teach me and I remember.
| Involve me and I learn.
| - Benjamin Franklin
----------------------------------------------------------------------------
|
| "The contents of this message are mine personally and
| do not reflect any position of the Government or NOAA."
|
----------------------------------------------------------------------------
|
…and removed the superfluous c1/c2 arrays from several routines.
Lou, |
@Plantain Do you have gfortran on your system? If you do, compile the code with 'configure -D' and run it on your earliest failed case can be helpful. |
@louiswicker I am looking at your advect_*_implicit routines, and you have these variables declared with memory sizes (ims,ime, etc.): at, bt, ct, rt, bb, btmp. You pass these arrays to tridiag2d with memory sizes, but these arrays are only defined in loops with tile sized dimensions, i.e. its, ite or so. I wonder what would happen to the return array (bb) in the 'ghost' zone? In fact the loop inside tridiag2d is also tiled. So it seems some part of the memory-sized arrays are never defined. I could be wrong. But I just want to bring it up so that others can comment too. |
will look into this tonight or tomorrow. got the machine back last evening.
… On Mar 12, 2021, at 5:56 PM, weiwangncar ***@***.***> wrote:
happen to the return array (bb) in the 'ghost' zone? In fact the loop inside tridiag2d is also tiled
----------------------------------------------------------------------------
| Dr. Louis J. Wicker
| NSSL/FRDD Rm 3336
| National Weather Center
| 120 David L. Boren Boulevard, Norman, OK 73072
|
| E-mail: ***@***.***
| HTTP: www.nssl.noaa.gov/~lwicker
| Phone: (405) 325-6340
| Fax: (405) 325-2316
|
|
| Just as the constant increase of entropy is the
| basic law of the universe,
| so it is the basic law of life to be ever more highly
| structured and to struggle against entropy.
|
| Vaclav Havel
----------------------------------------------------------------------------
|
| "The contents of this message are mine personally and
| do not reflect any position of the Government or NOAA."
|
----------------------------------------------------------------------------
|
Are you testing with numtiles=1? Perhaps try a higher value to find bugs
with tile handling?
…On Sat, 13 Mar 2021, 1:11 pm louiswicker, ***@***.***> wrote:
will look into this tonight or tomorrow. got the machine back last evening.
> On Mar 12, 2021, at 5:56 PM, weiwangncar ***@***.***> wrote:
>
> happen to the return array (bb) in the 'ghost' zone? In fact the loop
inside tridiag2d is also tiled
----------------------------------------------------------------------------
| Dr. Louis J. Wicker
| NSSL/FRDD Rm 3336
| National Weather Center
| 120 David L. Boren Boulevard, Norman, OK 73072
|
| E-mail: ***@***.***
| HTTP: www.nssl.noaa.gov/~lwicker
| Phone: (405) 325-6340
| Fax: (405) 325-2316
|
|
| Just as the constant increase of entropy is the
| basic law of the universe,
| so it is the basic law of life to be ever more highly
| structured and to struggle against entropy.
|
| Vaclav Havel
----------------------------------------------------------------------------
|
| "The contents of this message are mine personally and
| do not reflect any position of the Government or NOAA."
|
----------------------------------------------------------------------------
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1373 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACODF7EWLDUGC5AGGMDML3TDLJXHANCNFSM4WLMF3CA>
.
|
The variables wwE and wwI were initialized twice when ieva = FALSE. Move the initialization into the ieva = TRUE loop (with appropriate vertical loop bounds). Changes to be committed: modified: dyn_em/module_ieva_em.F
The memory-sized local variable wwE and wwI were allocated on the stack for rk_tendency, and for each of the multiple calls to rk_scalar_tend. These are each called for every RK time step. The mods allocate the space in the solver once per model time step, and since the variables are "i1", they are not kept during a nested domain. Changes to be committed: modified: Registry/Registry.EM_COMMON modified: dyn_em/module_em.F modified: dyn_em/solve_em.F
@louiswicker @weiwangncar @dudhia This is a 6-h simulation, 3-km, near Houston / New Orleans. What is plotted is the non-radiation time step percent difference change compared to the has just before Lou's changes. Top left: Lou's code before my mods With a combination of these two mods (wwE and wwI init, promote to "i1"), the IEVA code is about 1.5% slower than the original - when IEVA = FALSE. I find this acceptable. |
@louiswicker @weiwangncar @dudhia
I am OK with this PR, as-is. |
I think we're still waiting for Louis to finish his tests from the 13th?
…On Mon, 22 Mar 2021, 3:12 pm Dave Gill, ***@***.***> wrote:
@louiswicker <https://github.com/louiswicker> @weiwangncar
<https://github.com/weiwangncar> @dudhia <https://github.com/dudhia>
Folks,
1. This passes the reg tests
Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: cc3c08d, requested by: louiswicker for PR: #1373. 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 : 163 161 0
Number of Comparisons : 103 102 0
Failed Simulations are:
None
Which comparisons are not bit-for-bit:
None
1. When the option is turned off, there is < 2% timing impact (from
figs above in comments). If there is an interest in removing the ENTIRETY
of big_step_utilities, the time to do that is now.
I am OK with this PR, as-is.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1373 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACODF6VKNMVAMDC2PMMKG3TE3GUXANCNFSM4WLMF3CA>
.
|
@Plantain @louiswicker @weiwangncar I removed the u/v part of the CFL print (uncommented, so it is still easily available). Here's what it looks like:
Note that the lower case string "cfl" is now part of the output, for backward compatibility searching. |
@weiwangncar @dudhia @louiswicker |
@louiswicker You probably noticed that Dave has merged your code onto develop branch. This is mostly based on improved performance when IEVA code is not used. When IEVA is used, we know there is at least a problem with OMP-compiled code. When compiled without optimization (configure -d), an OMP run should produce identical results with MPI and serial runs. Currently MPI and serial code do produce same results. I added some prints into several routines (WW_SPLIT, CALC_NEW_MUT, ADVECT_[u,v,ph,w]_IMPLICIT), and these are what I find out (I used Ming's 2017050100 case, reduced the domain size to 161x161x60 (but with increased vertical levels in order to get some CFLs), and a restart run at hour 1):
|
@louiswicker @weiwangncar
For serial and for MPI, the |
@davegill When I print, I do get two sets of prints, from both tiles: one set is wrong, the other is correct, relative to the serial run. So I'm not sure which one went to the next step. |
@davegill I changed that indices in two subroutines in module_ieva_em.F: ww_split and calc_mut_new. The results are still wrong. It is always the indices... |
Wei & Dave, thanks for still working on this a bit. I am not sure what else to say. I think the best way to deal with this is for me to move the splitting of ww out of the module_em.F, and up to the solver level and then do a halo communication. What do you think about that strategy? I won't be able to get back to this for a while, but when I get a chance, I will download the develop branch and work from there. I am sorry we cannot get this to work! Lou |
The code runs perfectly for the warm bubble idealized test for n=1 vs n=4 processors. recompiling for full domain tests tonight with opt to check stability. I think we are (dare I say it) there! Thanks to all of you! |
TYPE: bug fix KEYWORDS: IEVA, OpenMP SOURCE: internal DESCRIPTION OF CHANGES: Problem: With IEVA activated, differences appear between OpenMP results with OMP_NUM_THREADS > 1 and any of the following: 1. serial results 2. MPI results 3. OpenMP results with a single thread Solution: Working backwards, the computation in WRF (pre-IEVA code) computed the full MU field only on the mass-point tile size: ``` DO j = jts, jte-1 DO i = its, ite-1 ``` We extend the computation one grid cell to the left and right: ``` DO j = jts-1, jte-1 DO i = its-1, ite-1 ``` Since WRF previously did not use those values, that is not a problem to have additional rows and columns of valid data inside of the halo region. This is a follow-on PR to 4412521 #1373 "Implicit Explicit Vertical Advection (IEVA)". LIST OF MODIFIED FILES: M dyn_em/module_big_step_utilities_em.F TESTS CONDUCTED: 1. I used a simple Jan 2000 case, with 60 levels, 30-km resolution, and a 20*dx time step. This caused calls to `advect_u_implicit` and `advect_v_implicit` in the first time step. Without the mods, the code generated different results depending on the number of OpenMP threads. With the mods, the results are bit-for-bit for OpenMP with the standard y-only decomposition and with a manual x-only decomposition. Below is a figure of the differences of the V field after the first time step (before the modification). This plot is the difference of the same executable using two different OMP_NUM_THREADS values. After the mod, the results are bit-for-bit. <img width="1152" alt="Screen Shot 2021-03-25 at 4 05 09 PM" src="https://user-images.githubusercontent.com/12666234/112549911-291e8e80-8d84-11eb-8b03-1e1ea50ef731.png"> Before the mods, during the first time step, the following diffs were apparent along the OpenMP boundaries: ``` Diffing np=1/wrfout_d01_2000-01-24_12:10:00 np=6/wrfout_d01_2000-01-24_12:10:00 Next Time 2000-01-24_12:10:00 Field Ndifs Dims RMS (1) RMS (2) DIGITS RMSE pntwise max U 49384 3 0.2158843112E+02 0.2158843113E+02 9 0.5344E-05 0.3589E-05 V 61738 3 0.1834835473E+02 0.1834835712E+02 6 0.1045E-03 0.2183E-03 W 139132 3 0.4977466348E-01 0.4977466098E-01 7 0.3382E-05 0.4809E-03 PH 66955 3 0.2327166773E+04 0.2327166753E+04 8 0.1078E-02 0.7572E-05 T 4838 3 0.7925254902E+02 0.7925254902E+02 12 0.9349E-05 0.2484E-05 THM 4812 3 0.7921679023E+02 0.7921679023E+02 12 0.9289E-05 0.2484E-05 MU 1286 2 0.1460135950E+04 0.1460135956E+04 8 0.1203E-02 0.5148E-05 P 6737 3 0.6512715435E+03 0.6512716390E+03 6 0.2086E-01 0.8162E-03 QVAPOR 26582 3 0.2913825518E-02 0.2913825518E-02 9 0.4536E-09 0.5671E-05 QCLOUD 429 3 0.6474288021E-05 0.6474289263E-05 6 0.3257E-09 0.3024E-03 QICE 715 3 0.4136477606E-05 0.4136463263E-05 5 0.1303E-09 0.1757E-03 QNICE 676 3 0.4164261806E+06 0.4164261805E+06 9 0.1341E+00 0.1125E-05 RAINNC 94 2 0.3158246772E-02 0.3158239178E-02 5 0.9447E-07 0.1558E-03 SNOWNC 94 2 0.3158246772E-02 0.3158239178E-02 5 0.9447E-07 0.1558E-03 SR 1 2 0.3353836226E+00 0.3353836226E+00 9 0.9006E-09 0.5960E-07 ``` 2. Wei successfully tested a separate case with 1x16 and 16x1 OpenMP decompositions, where there were bit-for-bit diffs without the mods. 3. Jenkins tests are all PASS.
TYPE: bug fix KEYWORDS: IEVA, TLADJ, solve SOURCE: internal DESCRIPTION OF CHANGES: Problem: After the IEVA mods (commit 4412521, #1373 "Implicit Explicit Vertical Advection (IEVA)"), which changed the calls to rk_tendency and rk_scalar_tend, the WRFPlus code no longer compiled. Solution: The new arguments added to the calls to rk_tendency and rk_scalar_tend have been added inside the solve routine for WRFPlus. LIST OF MODIFIED FILES: wrftladj/solve_em_ad.F TESTS CONDUCTED: 1. Without mods, there are compiler errors from missing args. After the mods: ``` > ls -ls main/*.exe 94944 -rwxr-xr-x 1 gill p66770001 97217616 Mar 29 10:11 main/wrfplus.exe ``` 2. The WRFDA regtest is OK. 3. Jenkins is all PASS.
TYPE: bug fix KEYWORDS: IEVA, cfl SOURCE: internal DESCRIPTION OF CHANGES: This is a clean-up PR to 4412521 #1373 "Implicit Explicit Vertical Advection (IEVA)". We are resetting the default critical value to activate the w_damping option to the previous setting. Problem: The new namelist option `w_crit_cfl` replaces `w_beta`, where `w_beta` used to be set in module_model_constants.F and had a value of 1.0. Before this PR, the default value of `w_crit_cfl` was set to 1.2 in the Registry. If one didn't use the new namelist option to manually reset the value of `w_crit_cfl` to 1., that meant that w_damping would behave differently from previous releases. Solution: 1. With consultation with the developer, the value for `w_crit_cfl` is now set to 1.0 in the Registry file. This gives similar and expected behavior for when w_damping kicks in. 2. Also, a bit of column aligning in the neighborhood of this change was done to make the Registry a bit more tidy. "Try and leave this world a little better than you found it.", Robert Stephenson Smyth Baden-Powell. LIST OF MODIFIED FILES: modified: Registry/Registry.EM_COMMON TESTS CONDUCTED: 1. There are no problems to test, just resetting the critical value for activating w_damping (from 1.2 to 1.0). 2. Let us all hope that Jenkins tests are all PASS.
TYPE: new feature KEYWORDS: IEVA, vertical advection SOURCE: Louis Wicker (NOAA/NSSL) DESCRIPTION OF CHANGES: For grids with large aspect ratios (dx/dz >> 1) that permit explicit convection, the large time step is limited by the strongest updraft that occurs during integration. This results in time step often 20-30% smaller, or requires the use of w-filtering, such as latent-heat tendency limiting. Regions of large vertical velocities are also often very small relative to the domain. The Implicit-Explicit Vertical Advection (IEVA) scheme has been implemented (see Wicker, L. J., and W. C. Skamarock, 2020: An Implicit–Explicit Vertical Transport Scheme for Convection-Allowing Models. Mon. Wea. Rev., 148, 3893–3910) and that permits a larger time step by partitioning the vertical transport into an explicit piece, which uses the normal vertical schemes present in WRF, and a implicit piece which uses implicit transport (which is unconditionally stable). The combined scheme permits a larger time step than has been previously been used and reduced w-filtering. The scheme will be useful for CONUS scale CAM (convection allowing model) simulations (dx ~ 2-3 km) when the number of vertical levels > 50. Time steps can increase to as large as 25 s, depending on the problem. The Wicker and Skamarock paper demonstrates IEVA's advantages on the 27 April 2011 Alabama tornado outbreak by comparing it to the operational CAM (the High Resolution Rapid Refresh) configuration. Results are shown that the HRRR simulation is stable up to a dt=20 s and only with latent-heat limiting on. Using the IEVA scheme the dt can be increased to 24 s and no latent-heat limiting is needed. Overall integration efficiency increases ~ 15%, and the IEVA solutions are closer to a benchmark run using smaller dt (12 s) than the HRRR simulation. LIST OF MODIFIED FILES: M Registry/Registry.EM_COMMON M dyn_em/Makefile M dyn_em/module_advect_em.F M dyn_em/module_big_step_utilities_em.F M dyn_em/module_em.F A dyn_em/module_ieva_em.F M dyn_em/solve_em.F M run/README.namelist A test/em_real/namelist.input.IEVA.4km TESTS CONDUCTED: 1. This pull requested code has been tested repeatedly on 27 April for a 24 hour simulation with the parameters set as in the Wicker and Skamarock (2020) as well as a 10 step difference test with the em_quarter_ss case using a single node and 4 nodes. The differences in the results ~ 10^-5. 2. Jenkins tests are all pass. RELEASE NOTES: The Implicit-Explicit Vertical Advection (IEVA) scheme has been implemented (see Wicker, L. J., and W. C. Skamarock, 2020: An Implicit–Explicit Vertical Transport Scheme for Convection-Allowing Models. Mon. Wea. Rev., 148, 3893–3910) and that permits a larger time step by partitioning the vertical transport into an explicit piece, which uses the normal vertical schemes present in WRF, and a implicit piece which uses implicit transport (which is unconditionally stable). The combined scheme permits a larger time step than has been previously been used and reduced w-filtering. The scheme will be useful for CONUS-scale CAM (convection allowing model) simulations (dx ~ 2-3 km) when the number of vertical levels > 50. In these cases, time steps can increase to as large as 25 s, depending on the problem. Overall integration efficiency increases ~ 15%, and the IEVA solutions are closer to a benchmark run using smaller time step.
TYPE: bug fix KEYWORDS: IEVA, OpenMP SOURCE: internal DESCRIPTION OF CHANGES: Problem: With IEVA activated, differences appear between OpenMP results with OMP_NUM_THREADS > 1 and any of the following: 1. serial results 2. MPI results 3. OpenMP results with a single thread Solution: Working backwards, the computation in WRF (pre-IEVA code) computed the full MU field only on the mass-point tile size: ``` DO j = jts, jte-1 DO i = its, ite-1 ``` We extend the computation one grid cell to the left and right: ``` DO j = jts-1, jte-1 DO i = its-1, ite-1 ``` Since WRF previously did not use those values, that is not a problem to have additional rows and columns of valid data inside of the halo region. This is a follow-on PR to 4412521 wrf-model#1373 "Implicit Explicit Vertical Advection (IEVA)". LIST OF MODIFIED FILES: M dyn_em/module_big_step_utilities_em.F TESTS CONDUCTED: 1. I used a simple Jan 2000 case, with 60 levels, 30-km resolution, and a 20*dx time step. This caused calls to `advect_u_implicit` and `advect_v_implicit` in the first time step. Without the mods, the code generated different results depending on the number of OpenMP threads. With the mods, the results are bit-for-bit for OpenMP with the standard y-only decomposition and with a manual x-only decomposition. Below is a figure of the differences of the V field after the first time step (before the modification). This plot is the difference of the same executable using two different OMP_NUM_THREADS values. After the mod, the results are bit-for-bit. <img width="1152" alt="Screen Shot 2021-03-25 at 4 05 09 PM" src="https://user-images.githubusercontent.com/12666234/112549911-291e8e80-8d84-11eb-8b03-1e1ea50ef731.png"> Before the mods, during the first time step, the following diffs were apparent along the OpenMP boundaries: ``` Diffing np=1/wrfout_d01_2000-01-24_12:10:00 np=6/wrfout_d01_2000-01-24_12:10:00 Next Time 2000-01-24_12:10:00 Field Ndifs Dims RMS (1) RMS (2) DIGITS RMSE pntwise max U 49384 3 0.2158843112E+02 0.2158843113E+02 9 0.5344E-05 0.3589E-05 V 61738 3 0.1834835473E+02 0.1834835712E+02 6 0.1045E-03 0.2183E-03 W 139132 3 0.4977466348E-01 0.4977466098E-01 7 0.3382E-05 0.4809E-03 PH 66955 3 0.2327166773E+04 0.2327166753E+04 8 0.1078E-02 0.7572E-05 T 4838 3 0.7925254902E+02 0.7925254902E+02 12 0.9349E-05 0.2484E-05 THM 4812 3 0.7921679023E+02 0.7921679023E+02 12 0.9289E-05 0.2484E-05 MU 1286 2 0.1460135950E+04 0.1460135956E+04 8 0.1203E-02 0.5148E-05 P 6737 3 0.6512715435E+03 0.6512716390E+03 6 0.2086E-01 0.8162E-03 QVAPOR 26582 3 0.2913825518E-02 0.2913825518E-02 9 0.4536E-09 0.5671E-05 QCLOUD 429 3 0.6474288021E-05 0.6474289263E-05 6 0.3257E-09 0.3024E-03 QICE 715 3 0.4136477606E-05 0.4136463263E-05 5 0.1303E-09 0.1757E-03 QNICE 676 3 0.4164261806E+06 0.4164261805E+06 9 0.1341E+00 0.1125E-05 RAINNC 94 2 0.3158246772E-02 0.3158239178E-02 5 0.9447E-07 0.1558E-03 SNOWNC 94 2 0.3158246772E-02 0.3158239178E-02 5 0.9447E-07 0.1558E-03 SR 1 2 0.3353836226E+00 0.3353836226E+00 9 0.9006E-09 0.5960E-07 ``` 2. Wei successfully tested a separate case with 1x16 and 16x1 OpenMP decompositions, where there were bit-for-bit diffs without the mods. 3. Jenkins tests are all PASS.
TYPE: bug fix KEYWORDS: IEVA, TLADJ, solve SOURCE: internal DESCRIPTION OF CHANGES: Problem: After the IEVA mods (commit 4412521, wrf-model#1373 "Implicit Explicit Vertical Advection (IEVA)"), which changed the calls to rk_tendency and rk_scalar_tend, the WRFPlus code no longer compiled. Solution: The new arguments added to the calls to rk_tendency and rk_scalar_tend have been added inside the solve routine for WRFPlus. LIST OF MODIFIED FILES: wrftladj/solve_em_ad.F TESTS CONDUCTED: 1. Without mods, there are compiler errors from missing args. After the mods: ``` > ls -ls main/*.exe 94944 -rwxr-xr-x 1 gill p66770001 97217616 Mar 29 10:11 main/wrfplus.exe ``` 2. The WRFDA regtest is OK. 3. Jenkins is all PASS.
TYPE: bug fix KEYWORDS: IEVA, cfl SOURCE: internal DESCRIPTION OF CHANGES: This is a clean-up PR to 4412521 wrf-model#1373 "Implicit Explicit Vertical Advection (IEVA)". We are resetting the default critical value to activate the w_damping option to the previous setting. Problem: The new namelist option `w_crit_cfl` replaces `w_beta`, where `w_beta` used to be set in module_model_constants.F and had a value of 1.0. Before this PR, the default value of `w_crit_cfl` was set to 1.2 in the Registry. If one didn't use the new namelist option to manually reset the value of `w_crit_cfl` to 1., that meant that w_damping would behave differently from previous releases. Solution: 1. With consultation with the developer, the value for `w_crit_cfl` is now set to 1.0 in the Registry file. This gives similar and expected behavior for when w_damping kicks in. 2. Also, a bit of column aligning in the neighborhood of this change was done to make the Registry a bit more tidy. "Try and leave this world a little better than you found it.", Robert Stephenson Smyth Baden-Powell. LIST OF MODIFIED FILES: modified: Registry/Registry.EM_COMMON TESTS CONDUCTED: 1. There are no problems to test, just resetting the critical value for activating w_damping (from 1.2 to 1.0). 2. Let us all hope that Jenkins tests are all PASS.
TYPE: new feature
KEYWORDS: IEVA, vertical advection
SOURCE: Louis Wicker (NOAA/NSSL)
DESCRIPTION OF CHANGES:
For grids with large aspect ratios (dx/dz >> 1) that permit explicit convection, the large time step is limited by the
strongest updraft that occurs during integration. This results in time step often 20-30% smaller, or requires the use
of w-filtering, such as latent-heat tendency limiting. Regions of large vertical velocities are also often very small
relative to the domain. The Implicit-Explicit Vertical Advection (IEVA) scheme has been implemented (see Wicker, L. J.,
and W. C. Skamarock, 2020: An Implicit–Explicit Vertical Transport Scheme for Convection-Allowing Models. Mon. Wea.
Rev., 148, 3893–3910) and that permits a larger time step by partitioning the vertical transport into an explicit piece,
which uses the normal vertical schemes present in WRF, and a implicit piece which uses implicit transport (which is
unconditionally stable). The combined scheme permits a larger time step than has been previously been used and
reduced w-filtering.
The scheme will be useful for CONUS scale CAM (convection allowing model) simulations (dx ~ 2-3 km) when the
number of vertical levels > 50. Time steps can increase to as large as 25 s, depending on the problem. The Wicker
and Skamarock paper demonstrates IEVA's advantages on the 27 April 2011 Alabama tornado outbreak by comparing
it to the operational CAM (the High Resolution Rapid Refresh) configuration. Results are shown that the HRRR
simulation is stable up to a dt=20 s and only with latent-heat limiting on. Using the IEVA scheme the dt can be increased
to 24 s and no latent-heat limiting is needed. Overall integration efficiency increases ~ 15%, and the IEVA solutions
are closer to a benchmark run using smaller dt (12 s) than the HRRR simulation.
LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M dyn_em/Makefile
M dyn_em/module_advect_em.F
M dyn_em/module_big_step_utilities_em.F
M dyn_em/module_em.F
A dyn_em/module_ieva_em.F
M dyn_em/solve_em.F
M run/README.namelist
A test/em_real/namelist.input.IEVA.4km
TESTS CONDUCTED:
This pull requested code has been tested repeatedly on 27 April for a 24 hour simulation with the parameters set as in the Wicker and Skamarock (2020) as well as a 10 step difference test with the em_quarter_ss case using a single node and 4 nodes. The differences in the results ~ 10^-5.
Jenkins tests are all pass.
RELEASE NOTES: The Implicit-Explicit Vertical Advection (IEVA) scheme has been implemented (see Wicker, L. J., and W. C. Skamarock, 2020: An Implicit–Explicit Vertical Transport Scheme for Convection-Allowing Models. Mon. Wea. Rev., 148, 3893–3910) and that permits a larger time step by partitioning the vertical transport into an explicit piece, which uses the normal vertical schemes present in WRF, and a implicit piece which uses implicit transport (which is unconditionally stable). The combined scheme permits a larger time step than has been previously been used and reduced w-filtering. The scheme will be useful for CONUS-scale CAM (convection allowing model) simulations (dx ~ 2-3 km) when the number of vertical levels > 50. In these cases, time steps can increase to as large as 25 s, depending on the problem. Overall integration efficiency increases ~ 15%, and the IEVA solutions are closer to a benchmark run using smaller time step.