Skip to content

After space removal top of dev repo#1087

Closed
smileMchen wants to merge 38 commits intowrf-model:developfrom
smileMchen:after_space_removal_top_of_dev_repo
Closed

After space removal top of dev repo#1087
smileMchen wants to merge 38 commits intowrf-model:developfrom
smileMchen:after_space_removal_top_of_dev_repo

Conversation

@smileMchen
Copy link
Collaborator

@smileMchen smileMchen commented Feb 10, 2020

TEST

ONLY FOR TESTING

HAS FSBM, top of dev, 4.1.4, RRTMG-KIAPS fix, Fire fix

No comments on this PR

JS-WRF and others added 30 commits April 4, 2019 14:46
…-model#952)

TYPE: bug fix

KEYWORDS: Linux, Darwin, nc-config, configure

SOURCE: Yago Riveiro (Air Quality and Odor Management - AQOM), internal

DESCRIPTION OF CHANGES: 
This pull fixes the incorrect use of `whereis` when we try to locate `nc-config` 
command. 
 - Only the `which` command is valid. 
 - The return code is used, not the value of the `which nc-config` command.
 - There is no need to determine the OS with this fix.

LIST OF MODIFIED FILES: 
M       configure

TESTS CONDUCTED: 
 - [x] Re-run configure script, the warning disappears
 - [x] Still works on Darwin (netcdf/3.6.3 and netcdf/4.5.0)
 - [x] Still works on Linux desktop Centos 7.6 (netcdf/4.7.0)
 - [x] Still works on Linux NCAR supercomputer SUSE 12 SP4 (netcdf/4.6.3)
…rf-model#1027)

TYPE: bug fix

KEYWORDS: effective radius, lamda calculation

SOURCE: Yali Wu (NCAR)

DESCRIPTION OF CHANGES: Subroutine `da_cld_eff_radius` uses exponential distribution for calculating the effective radius of different hydrometeor particles. 

Slope parameters should be calculated following:
```
sqrt(sqrt(piover6*rho_x*n0_x/(rho*qx)))
```
but this was incorrectly typed, so that rho is in the numerator:
```
sqrt(sqrt(piover6*rho_x*n0_x*rho/qx)))
```
where, x denotes rain, snow, and graupel.

LIST OF MODIFIED FILES: 
M       var/da/da_radiance/da_cld_eff_radius.inc

TESTS CONDUCTED: Conducted tests before and after bugfix on Cheyenne. The model simulated MW radiances were slightly improved for a typhoon case, while the simulated IR radiances seemed to have no difference.
TYPE: bug fix

KEYWORDS: sfclayrev scheme, divide by zero

SOURCE: internal (reported by CH Liu)

DESCRIPTION OF CHANGES:
During iterative solution for z/L there are rare cases where the same bit-for-bit value is returned for slightly different inputs to function zolri2 resulting in a divide by zero. This appears to be rare.
Fix is to return when these are found equal because solution is converged already.

LIST OF MODIFIED FILES:
phys/module_sf_sfclayrev.F

TESTS CONDUCTED:
Fix works for case that stopped.
Test on standard June case is bit-for-bit as expected
Jenkins passed

RELEASE NOTE:
Fix for occasional divide-by-zero error in sfclayrev option. Thanks Changhai Liu.
TYPE: text only

KEYWORDS: hybrid comments

SOURCE: Found by Kezhen Chong (Georgia Institute of Technology), fixed internally

DESCRIPTION OF CHANGES: 
Modify the comments in registry.hyb_coord to correctly define c4f and c4h. Originally, the value
of the pressure at the model lid (ptop) was included in the description of the computation of
the C4F and C4H 1d arrays as an added term. Following is the source code showing no such term.

```
   !  c4 is a function of c3 and eta.

   DO k=1, kde
      c4f(k) = ( znw(k) - c3f(k) ) * ( p1000mb - p_top )
   ENDDO

   !  Now on half levels, just add up and divide by 2 (for c3h).  Use (eta-c3)*(p00-pt) for c4 on half levels.

   DO k=1, kde-1
      c4h(k) = ( znu(k) - c3h(k) ) * ( p1000mb - p_top )
   ENDDO
```

ISSUE: 
Fixes wrf-model#1050

LIST OF MODIFIED FILES: 
modified:   Registry/registry.hyb_coord

TESTS CONDUCTED: 
 - [x] Text only in comment in a registry file, no tests required.
…rf-model#1049)

TYPE: bug fix

KEYWORDS: HWRF, build, run

SOURCE: internal

DESCRIPTION OF CHANGES: 
To get the HWRF code to build and run the regression test cases, two changes are required:

### Build
There is a replicated symbol in subroutine feedback_domain_nmm_part2: SMOOTHER. This
named symbol cannot be both a LABEL and the name of a called SUBROUTINE within 
a single subprogram unit (subroutine or function). Just a quick misspelling of SMOOTHR works
wonders.

### Run
Link in (ln -sf) all of the look-up tables to the test/nmm_real directory in the last step of the build
process. Most of the run-time-required links to physics data files were not originally in place.

LIST OF MODIFIED FILES:
modified:   Makefile
modified:   external/RSL_LITE/module_dm.F

TESTS CONDUCTED: 
 - [x] Without build mod (replicated symbol), code does not build with GNU
 - [x] Without run mod (linked-in look-up tables), the code does not run regression tests
 - [x] With both mods, the code builds and runs.
 - [x] Regression test is now in place for HWRF.
TYPE:bug fix

KEYWORDS: fire, pop, push, communicator

SOURCE: internal

DESCRIPTION OF CHANGES: 
Problem:
WRF gets into a state where the code tries to pop or push a stack of communicators. This should 
not happen when doing a Serial or OpenMP build.

Here is the example error message we get with a push on OpenMP:
```
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    5489
pop_communicators_for_domain on empty stack
-------------------------------------------
```

And here is the example error message with a pop with OpenMP:
```
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:    5464
push_communicators_for_domain would excede stacksize
-------------------------------------------
```

Solution:
This problem only occurs with Serial or OpenMP builds. The communicators are only required for 
distributed memory MPI jobs. Therefore, put an ifdef around the routine that handles pops 
and pushes of the the communicator stack.

LIST OF MODIFIED FILES: 
modified:   external/RSL_LITE/module_dm.F

TESTS CONDUCTED: 
 - [x] Auto regression is HAPPY!
TYPE: bug fix

KEYWORDS: eta, levels

SOURCE: internal

DESCRIPTION OF CHANGES: 
Problem:
The real program fails when the number of vertical levels is more than a thousand.

Solution:
There is a single PARAMETER in the frame directory that is used to allocate space for the namelist
read and the eta computation in the real program. We absolutely need a parameter for 
allocating space for the namelist variables. The original value for the maximum number of eta 
levels was 1001. The 10x increase in size (from 1001 to 10001) impacts only a couple of 1d
arrays, so the WRF memory footprint is not dramatically increased.

The mods to the real program are for a stand-alone program buried in the source, and therefore
do not impact the traditional processing of either the real program or the WRF model.

LIST OF MODIFIED FILES: 
modified:   dyn_em/module_initialize_real.F
modified:   frame/module_driver_constants.F

TESTS CONDUCTED: 
 - [x] Original version with 1100 eta levels fails with bound check on Mac.
 - [x] New mods, real on Mac with 1100 eta levels works OK.
```
Full level index =    1     Height =     0.0 m
Full level index =    2     Height =    50.0 m      Thickness =   50.0 m
Full level index =    3     Height =    73.0 m      Thickness =   23.1 m
Full level index =    4     Height =    96.1 m      Thickness =   23.1 m
Full level index =    5     Height =   119.2 m      Thickness =   23.1 m
Full level index =    6     Height =   142.2 m      Thickness =   23.0 m
Full level index =    7     Height =   165.2 m      Thickness =   23.0 m
Full level index =    8     Height =   188.3 m      Thickness =   23.0 m
Full level index =    9     Height =   211.3 m      Thickness =   23.0 m
Full level index =   10     Height =   234.3 m      Thickness =   23.0 m

Full level index = 1090     Height = 19738.8 m      Thickness =   15.9 m
Full level index = 1091     Height = 19754.7 m      Thickness =   15.9 m
Full level index = 1092     Height = 19770.7 m      Thickness =   15.9 m
Full level index = 1093     Height = 19786.6 m      Thickness =   15.9 m
Full level index = 1094     Height = 19802.5 m      Thickness =   15.9 m
Full level index = 1095     Height = 19818.4 m      Thickness =   15.9 m
Full level index = 1096     Height = 19834.4 m      Thickness =   15.9 m
Full level index = 1097     Height = 19850.3 m      Thickness =   15.9 m
Full level index = 1098     Height = 19866.2 m      Thickness =   15.9 m
Full level index = 1099     Height = 19882.2 m      Thickness =   15.9 m
Full level index = 1100     Height = 19898.3 m      Thickness =   16.1 m

d01 2000-01-25_12:00:00 real_em: SUCCESS COMPLETE REAL_EM INIT
```

RELEASE NOTE: The number of vertical levels for the WRF model was increased from 1001 to 10001. Certainly 10000 vertical levels is very large. However, 3 domains with increasing numbers of eta levels (from vertical refinement) of 250, 350, 450 eta levels would previously have exceed the 1001 maximum value.
…odel#1043)

TYPE: bug fix

KEYWORDS: Deng shallow, radiation-driver clouds

SOURCE: internal and Pedro Jimenez

DESCRIPTION OF CHANGES:
Line qc_save = qc must be removed from Deng shallow section of radiation driver because it may save qc that is already updated by other physics that have radiation feedback, e.g. icloud, cu or bl. Leads to error when combining Deng shallow with such options (already not recommended with cumulus scheme). qc_save was already set for all options earlier.

LIST OF MODIFIED FILES:
phys/module_radiation_driver.F

TESTS CONDUCTED:
This fix has been tested by Pedro in WRF-Solar.
No regtests yet.
Test shows impact when Deng shcu is run with sub-grid clouds from MYNN icloud_bl=1. Left fixed, right old. Higher cloud fraction which leads to reduced surface shortwave compared to corrected code.
[Note that a later bug fix will not allow this combination, but fix applies to Deng shcu with sub-grid clouds from cumulus schemes and icloud=3 too].
Screen Shot 2019-12-18 at 1 39 55 PM

RELEASE NOTE:
Deng shallow scheme fix for when combined with other sub-grid cloud schemes (e.g. non-microphysics options that have radiation feedback). This would have added these clouds to microphysics at each step instead of removing them after radiation. (provided by Pedro Jimenez).
TYPE: bug fix

KEYWORDS: WDM5, WDM6, WDM7

SOURCE: Kyo-Sun Lim (Kyungpook National University) and Sooya Bae (KIAPS).

DESCRIPTION OF CHANGES:
Error correction based on Lei et al. (JGR, 2020)

Melting of snow/graupel :
-Problem: melting processes of snow/graupel mass and number concentration do not occur
at the same time.
-Correction: melting of snow/graupel changes the snow/graupel/rain mass and rain number
concentration at the same time.
-Effect: Generation of rain number concentrations would decrease.
Regeneration of CCN number concentration due to the cloud water evaporation:
-Problem: Cloud water number concentration does not add into the CCN number concentration.
-Correction: Adding the cloud water number concentration into the CCN number concentration.
Effect: CCN number concentration would increase.
ISSUE: none

LIST OF MODIFIED FILES:
module_mp_wdm5.F
module_mp_wdm6.F
module_mp_wdm7.F

TESTS CONDUCTED:
Passed Jenkins
WDM6 tested versus master. Diffs small for surface fields including rainfall after 12 hrs of June 2001 test case (shown).
Screen Shot 2020-02-04 at 12 39 13 PM

RELEASE NOTE: Melting of snow/graupel now changes the snow/graupel/rain mass and rain number concentration at the same time in all WDM schemes provided by Kyo-Sun Lim (Kyungpook National University, South Korea).
TYPE: bug fix

KEYWORDS: Fire, fuel model, GNU

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
1. Cannot build with GNU
2. Seg-faults with standard non-fire runs.

Solution:
2. The use of LOGICALs in the option choices for some of the fire variables
is inapropriate for eventual usage when those namelist options are part of
a Registry package statement. The WRF code assumes that the packages are
INTEGER values - not LOGICAL.
2. The number of elements in a few DATA statements needed to be increased by 1.
The "no fuel" entry is set to 14.

LIST OF MODIFIED FILES:
modified:   Registry/registry.fire
modified:   phys/module_fr_fire_phys.F
modified:   share/module_check_a_mundo.F

TESTS CONDUCTED:
 - [x] Without mods, code does not build; with mods, code builds.
 - [x] Without mods, code seg faults; with mods, non-fire code runs.
TYPE: bug fix

KEYWORDS: FARMS, NMM

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
The NMM code would not build. A few variables passed into the radiation
driver are ARW specific, so the call from the NMM core did not have:
MUT or DNW (both input from ARW), or six additional computed radiation
output fields.

Solution:
1. Make the ARW-specific and additional radiation fields OPTIONAL.
2. Use an IF(PRESENT(xxx)) before using any of the fields.

LIST OF MODIFIED FILES:
modified:   phys/module_radiation_driver.F
modified:   dyn_em/module_first_rk_step_part1.F

TESTS CONDUCTED:
1. Without mods, NMM HWRF cannot build.
2. With mods, NMM HWRF builds and runs successfully.
3. With mods, ARW still works.
TYPE: enhancement

KEYWORDS: GNU, RRTMK

SOURCE: internal

DESCRIPTION OF CHANGES:

Problem:
The GNU compiler versions from 6.* through 8.* issue an internal compiler error on
various RRTMG-based schemes.

Solution:
A modification was introduced in the WRF build to allow the RRTMG-fast version
to skip being built (commit 17b5ac4 with PR wrf-model#517 "KLUGE: RRTMG FAST +
GNU > 6.3.0 is an internal compiler error"). This same strategy is now used for
the RRTMK scheme.

On a good note ... it looks like GNU verion 9.1.* and later fixes this trouble.

LIST OF MODIFIED FILES:
modified:   arch/postamble
modified:   phys/module_physics_init.F
modified:   phys/module_ra_rrtmg_lwk.F
modified:   phys/module_ra_rrtmg_swk.F
modified:   phys/module_radiation_driver.F
modified:   share/module_check_a_mundo.F

TESTS CONDUCTED:
 - [ ] Waiting to see if this fixes Ming's problem
@dudhia
Copy link
Collaborator

dudhia commented Feb 10, 2020 via email

@davegill
Copy link
Contributor

@dudhia @smileMchen

Careful not to remove valid changes. I think the WSM and WDM changes at least were related to recent mods, and I saw some others.

Look only at PR #1085 "AFTER space removal - FSBM candidate alternate"

Because of the messed up develop branch, the GNU compiler issues, the zillions of whitespace induced conflicts, etc we needed to generate a temporary branch to test.

@davegill
Copy link
Contributor

testing purposes only

@davegill davegill closed this Feb 11, 2020
@davegill davegill reopened this Feb 11, 2020
@davegill
Copy link
Contributor

testing

@davegill davegill closed this Feb 11, 2020
@smileMchen smileMchen deleted the after_space_removal_top_of_dev_repo branch January 15, 2021 02:44
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.

7 participants