Skip to content

Conversation

@tlspero
Copy link
Contributor

@tlspero tlspero commented Jun 13, 2024

Corrections for precipitation tipping bucket and nudging in very long simulations

TYPE: bug fix

KEYWORDS: precipitation, tipping bucket, nudging, spectral nudging, analysis nudging, grid nudging, regional climate, dynamical downscaling, downscaling

SOURCE: Tanya Spero (U.S. EPA)

DESCRIPTION OF CHANGES:
Problem:
Several processes in WRF are currently triggered at periodic intervals (such as reading/writing files and managing certain bookkeeping processes). Some of those processes had been coded to identify those time triggers by referencing a variable that contains the time elapsed since the model simulation was initialized. That variable, XTIME, is a Fortran single-precision real variable that counts the number of elapsed minutes since initialization. However, single-precision real numbers become imprecise (i.e., cannot accurately resolve "whole" numbers) after they exceed 2^24, which is 16,777,216. In long simulations, that occurs just before 32 years of simulation period.

After that point, XTIME is never an odd number. If an odd value of XTIME is expected, it can be off by +1 or -1. In some places that use XTIME to trigger functions (like tipping the precipitation bucket every 6 hours when BUCKET_MM > 0.0, or reading and computing temporal weights for nudging), those functions occur on the wrong time step.

For a domain with a 60-second (1-minute) time step, the precipitation bucket tips one time step too early, which makes it impossible to back out the correct precipitation totals over the increment that includes the bucket time (and those totals become negative because of the mismatch in temporal accounting). For a run that was initialized at 1978-10-01_00:00:00, the error first occurred at 2010-08-24_20:17:00, and it was realized in the precipitation at all 6-hour increments afterward (starting with 2010-08-25_00:00:00. The issue can be seen in the log file (rsl.out.XXXX) by examining the values in "Max Accum {Resolved,Convective} Precip". At each 00, 06, 12, and 18 UTC time step, the maximum values should be below the value specified in BUCKET_MM in the physics namelist. At the prior time step, the values for the precipitation can exceed the bucket value. When the error occurs, the bucket is tipped too soon, so the maximum values across the domain will be below the bucket value before 00, 06, 12, and 18 UTC. [This is for long runs.]

For the same domain with a 60-second (1-minute) time step, the nudging fields are read one time step too soon, and the weights are recalculated, so the bracketing analyses are incorrect for that time step. The nudging fields are again read on the correct time step, and sometimes read (yet a third time) on the following time step. This error begins predictably at 23 years plus 3.5 months into a simulation, but I do not know the numeric trigger associated with this time point. For a run that was initialized at 1978-10-01_00:00:00, the problem with the nudging first occurred at 2002-01-22_05:59:00. For another run with a different forcing dataset (and one that included leap years) with an initialization at 2023-10-01_00:00:00, the error in nudging first occurred at 2047-01-22_05:59:00, which is the same elapsed time as in the other run. The issue can be seen in the log file (rsl.out.XXXX) by examining the occurrence of "Spectral nudging read in new data". In a continuous run of more than 23 years (which can include restarts, just not reinitializations; compare value of global attribute SIMULATION_START_DATE to global attribute START_DATE), this read can occur too early and more frequently than supported by data.

Solution:
The variable, XTIME, was inherited in WRF from MMx models, and it is pervasive in the model. It is impractical to simply convert XTIME to a double-precision variable, and it would be beyond the scope for me to do that to address this problem. There is also limited support for double-precision variables in the ESMF time-keeping functions that were borrowed by WRF. Instead, I arrived at a pragmatic compromise to move my project forward--and hopefully help others who have long, continuous simulations.

To address the issue related to the tipping bucket precipitation, a change was introduced in phys/module_diag_misc.F to use existing variable, CURR_SECS2, instead of XTIME. The variable CURR_SECS2 is used elsewhere in that routine, and it represents the number of seconds that have elapsed since the restart, not since the initialization. Unfortunately, CURR_SECS2 also goes imprecise after about 6.5 months after a restart. I think we "get away with this" because increments of 60 seconds will round appropriately to the 6-hour tipping point, but this imprecision could be an issue for very small time steps using odd numbers (such as 15 seconds or 5 seconds). A better and more robust (longer-term) solution may be to use CURR_SECS2_R8, which is a double-precision version of CURR_SECS2 that I introduced as part of the solution to the nudging. Alternatively, CURR_MINS2 (which is based on CURR_SECS2_R8) could be used here. However, changing all of the instances of CURR_SECS2 to CURR_SECS2_R8 or CURR_MINS2 would require much broader testing than I can do here.

For the spectral nudging, the upstream codes were modified to make CURR_MINS2 available from dyn_em/solve_em.F through to the nudging routines. I introduced CURR_MINS2, which I calculated from a new double-precision variant of CURR_SECS2, and CURR_MINS2 serves as a proxy for XTIME to determine the appropriate times to read the nudging files and recompute the weights between bracketing analyses. I made the analogous changes in the analysis/grid nudging routine for both 3D and surface nudging.

ISSUE: n/a

LIST OF MODIFIED FILES:
For tipping bucket: phys/module_diag_misc.F
For nudging: dyn_em/module_first_rk_step_part1.F, dyn_em/solve_em.F, phys/module_fdda_psufddagd.F, phys/module_fdda_spnudging.F, phys/module_fddagd_driver.F
for completeness: wrftladj/wrftladj/solve_em_ad.F

TESTS CONDUCTED:

  1. Do mods fix problem? How can that be demonstrated, and was that test conducted?

The mods correct the problem. The modifications were tested extensively using a long simulation (using a restart at more than 31 years into the simulation) with WRFv4.5.1 and with shorter (3-day) simulations using WRFv4.6. The modifications were further tested in an ongoing simulation that used WRFv4.5.1 and was picked up at year 26. Testing was performed incrementally, first addressing the tipping bucket, then addressing the spectral nudging. Internal test versions of the two versions of WRF (v4.5.1 and v4.6) were laced with print statements to ensure that the values of XTIME, CURR_SECS2, and CURR_MINS2 were reflected and used as expected by the modifications. In the nudging codes, print statements were inserted during testing to ensure that the calculation of the nudging weights was consistent with the expected values and that the reads became restricted to only occur at the intended times. The log files (rsl.out.XXXX) were visually inspected and compared among incremental simulations. The values of "Max Accum {Resolved,Convective} Precip" were examined at time steps immediately preceding the bucket tipping times and afterward. The values for the "Domain average" were compared in the log file. The times that listed "Spectral nudging read" were noted. The wrfout files were visually inspected in ncview to compare fields between simulations. The precipitation (recorded at 5-minute intervals in a non-standard additional output file) was calculated and confirmed to not contain negative values (via a separate QC program) after the modifications were introduced.

The nudging codes did not change in WRF between WRFv4.5.1 and WRFv4.6, so the codes were directly copied from the base internal testing code in WRFv4.5.1 to WRFv4.6 for final testing. Some changes were introduced in the other codes, so changes were manually transferred between those codes.

The nudging changes were not explicitly tested in the analysis/grid nudging and surface nudging codes, but the algorithms in those codes formed the basis for the original implementation of spectral nudging, so the outcome is likely to be the same. It should be confirmed by any user who wants to make this sort of continuous long run.

This may need to be tested in long runs with small, odd-numbered time steps (like 5 seconds or 15 seconds).

There may be other places in WRF that rely on XTIME for incremental time-related triggers, so a comprehensive search of the code is recommended.

  1. The Jenkins tests are all passing.

RELEASE NOTE: Corrected algorithms in the tipping bucket for precipitation and in the nudging routines to adjust for imprecision in single-precision real numbers exceeding the resolvable values in long (>23-year) continuous simulations.

@tlspero tlspero requested a review from a team as a code owner June 13, 2024 22:11
@weiwangncar
Copy link
Collaborator

@tlspero Thanks for the PR! One of the compile tests failed, and it is for DA/4DVAR. The output is here:
output_0.gz

If you need instructions to build WRFDA, see here. My guess is something added to module_first_rt_step_part*.F needs to be added to the counterpart in wrftladj/, the adjoint code.

@tlspero tlspero requested a review from a team as a code owner September 13, 2024 12:45
@tlspero
Copy link
Contributor Author

tlspero commented Sep 13, 2024

As suggested by @weiwangncar, I made the analogous changes to the input argument lists for codes in the adjoint model: wrftladj/module_first_rk_step_part1_ad.F and wrftladj/module_first_rk_step_part1_tl.F. In each of those codes, I added "curr_mins2" to the argument list and the declarations, but I did not use "curr_mins2" locally. I compiled the model (WRFv4.6.0), but I did not test the adjoint. I also updated my comprehensive release note information (above) to add those two routines to the list of codes that were modified for this PR; they are "for completeness".

@tlspero
Copy link
Contributor Author

tlspero commented Sep 13, 2024

After seeing that one of the automated checks failed, I realized that there were two more routines in the adjoint code that I overlooked: solve_em_ad.F and solve_em_tl.F. I updated those codes, as well. I am also updating the description of the mods in this thread.

@tlspero
Copy link
Contributor Author

tlspero commented Sep 16, 2024

@weiwangncar -- Sorry about that. I updated wrftladj/solve_em_ad.F and wrttladj/solve_em_tl.F. This is one of the unfortunate fallacies of inadvertently affecting codes in variants of WRF that are not compiled. Hopefully the mods are complete this time. Thank you for your patience and assistance!

@tlspero
Copy link
Contributor Author

tlspero commented Sep 18, 2024

@weiwangncar -- One more time. Ugh. The routine wrftladj/solve_em_ad.F did not have the variable tmpTimeInterval2 defined, unlike wrftladj/solve_em_tl.F and dyn_em/solve_em.F. I added the declaration and the definition. Hopefully this is the last tinkering. (Again, unfortunately, I am not set up to compile the adjoint model; otherwise I would have caught these issues before pushing the commits.) Thank you for your patience.

@tlspero
Copy link
Contributor Author

tlspero commented Sep 18, 2024

Well...that was not enough, either. I cannot access the results of the Jenkins testing, other than to see that it failed. I am open to suggestions to cleaning this up. I am assuming the fail is still in the adjoint code, which I am not set up to compile.

@weiwangncar
Copy link
Collaborator

@tlspero Thanks for trying. I will take another look and let you know.

@weiwangncar
Copy link
Collaborator

@tlspero I added a few comments regarding the solve_em_ad and solve_em_tj code. The one that affects compilation may be the one for the call to g_first_rk_step_part1.

@weiwangncar
Copy link
Collaborator

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

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

@weiwangncar
Copy link
Collaborator

@tlspero Finally I got a chance to look at this more closely and found the problem that causing the DA tests to fail. It turns out the only file that needs to be changed in the wrftladj/ directory is solve_em_ad.F. I think we are ready to move forward from here.

@weiwangncar
Copy link
Collaborator

@dudhia Can you take a look at this PR? It has now passed regression tests.

@weiwangncar
Copy link
Collaborator

@liujake @mos3r3n Can you take a quick look at the couple of lines added to solve_em_ad.F in wrftladj/? Thanks.

@mos3r3n
Copy link
Contributor

mos3r3n commented Feb 7, 2025

@liujake @mos3r3n Can you take a quick look at the couple of lines added to solve_em_ad.F in wrftladj/? Thanks.

I successfully compiled the WRFPLUS and WRF-4DVar on Derecho. @weiwangncar

@weiwangncar weiwangncar merged commit a321883 into wrf-model:develop Feb 7, 2025
2 checks passed
islas added a commit that referenced this pull request Apr 25, 2025
# WRF Version v4.7.0
The WRF model has been update to Version v4.7.0 on April 25, 2025

__Acknowledgements__: We would like to thank
*  Adam Dury (WeatherQuest)
*  Andrea Zonato, Royal Netherlands Meteorological Institute (KNMI)
*  Benjamin Kirk & Negin Sobhani (NSF NCAR / CISL)
*  Cenlin He @cenlinhe and Tzu-Shun Lin (NCAR)
*  Charlie Li, software developer from lakes environmental, Canada
*  Jakub Lewandowski (University of Leeds)
*  James Ruppert (University of Oklahoma)
*  Joseph Olson (NOAA/GSL)
*  Alexander Ukhov (KAUST)
*  L. Fita (UBA/CIMA/IFAECI)
*  Lukas Pilz (Heidelberg University)
*  Martilli, Alberto (CIEMAT)
*  Mathieu Landreau (Centrale Nantes)
*  Robert Conrick (U. of Washington); [email protected]
*  Robert Gilliam & Jon Pleim, US EPA
*  Sergey Osipov (KAUST)
*  Tanya Spero (U.S. EPA)
*  Ted Mansell (NOAA/NSSL) (@MicroTed )

for their contributions to this release.

## Physics

* Fix an error associated with using LCZ categories in NoahMP. Prior to this fix, the LCZs were not correctly referenced, hence ignored in the NoahMP code.  (#2202) [Details](a176a5965)
* NSSL-mp bug fix for (obsolete) droplet nucleation (#2195)  [Details](30c03dc40)
* NSSL microphysics scheme updates include 1. An explicit rain breakup for 3-moment rain (addresses issue of cold pools being too warm and drops being too large in rain cores), 2. Improved reflectivity conservation for graupel->hail conversion and drop freezing, 3. More accurate saturation mixing ratio calculation, 4. New default droplet nucleation that controls excess supersaturation much better than previously (and default is to always predict the number of activated CCN). The update has been submitted to CCPP repository as well.  (#2170) [Details](9d763af90)
* An new microphysics, UFS Double Moment (UDM), 7-class microphysics from Songyou Hong is added (mp_physics=27). UDM mp largely adopts microphysical processes in WDM7, but with bug fixes or revisions based on literature and accumulated realism. UDM mp utilizes the in-cloud microphysics concept (Kim and Hong 2018), with the addition of water-friendly aerosols for CCN initialization. Semi-lagrangian sedimentation of Juang and Hong (2010) is also re-configured for computational efficiency and numerical accuracy. All production terms are optimized by introducing a cloud-top definition for hydrometeors.  (#2147) [Details](5fc76c540)
* Release of the RCON Microphysics package into WRF, which improves upon the warm rain representation of the Thompson-Eidhammer scheme.  RCON is based heavily on the Thompson-Eidhammer scheme with a couple significant changes that improve upon the code in module_mp_rcon.F to generate more realistic rainfall during warm rain events with additional benefits for cold rain, especially warm processes during cold rain events.  Among the most significant changes for rain productions are 1) the use of a wider cloud water DSD of lognormal shape instead of the gamma DSD used by the Thompson-Eidhammer parameterization and 2) enhancement of the cloud-to-rain autoconversion parameterization to accommodate the new shape. The changes here also allow for sedimentation of cloud water within the lowest model layer, which effectively creates a drizzle mode in the scheme.  Accompanying published reference: Conrick, R., C. F. Mass, and L. McMurdie, 2023: Improving Simulations of Warm Rain in a Bulk Microphysics Scheme. Mon. Wea. Rev., 152, 169-185, https://doi.org/10.1175/MWR-D-23-0035.1.  (#2144) [Details](de213c920)
* Fix an erroneous print for using ghg_input when no radiation option is selected, mostly from idealized cases.  (#2199) [Details](bd4ecbe01)
* Fix a loop index error in bep_bem urban code.  (#2196) [Details](0171299d3)
* Noah-MP bug fixes for (1) allowing BATS snow albedo scheme for nighttime snow aging, (2) the potential leakage caused by calculate_soil variable during parallelized run, (3) the missing of HCPCT output for glacier points.  (#2160) [Details](fd079bf48)
* The similarity stability functions phim and phieps, necessary for calculating the surface values of tke and dissipation rate in the tke-epsilon-tpe PBL scheme [Zonato et al., 2022](https://doi.org/10.1175/MWR-D-21-0299.1) have been updated considering the correction term accounting for the roughness length z0. No relevant differences are found in temperature, wind speed, and humidity. Regarding turbulence variables, the stable case has just negligible differences, while the unstable case shows higher values of TKE and dissipation rate and lower values of temperature variance.  (#2120) [Details](70855a73e)
* Pleim-Xiu LSM is now compatible with 61 category MODIS LCZ landuse dataset. A mode of latent heat effects on Tg from vegetated parts and from wet leaves is added to Pleim-Xiu LSM.  (#2023) [Details](b7f31dcde)


## Software

* Determine MPI Data Types in col_on_comm() & dst_on_comm() to prevent displacements overflow.  (#2157) [Details](af8101493)
* CMake README documentation on <PackageName>_ROOT variables (#2190)  [Details](33036d613)
* CMake README documentation typo fixes (#2189)  [Details](3fd1aefda)
* Fix aarch64 GCC build when DM configuration selected (#2192)  [Details](8e1d6742c)
* Fixed failed compilation with Intel oneAPI by reworking the dependency linking of hydro CMake compilation  (#2178) [Details](2e0694f14)
* Fix compilation of grib2 IO in make build (#2191)  [Details](2639dcd3f)
* Fix uncontrollable building of external/io_netcdfpar folder for all stanzas  (#2181) [Details](127a8f40a)
* Suppress MYNN-EDMF verify checkout command (#2188)  [Details](3f2465b41)
* Fix typo in confcheck CMakeLists.txt for FSEEKO (#2179) [Details](2572bc5f5)
* Add quotes to optimization flags exceptions in CMake (#2180) [Details](b15e341e4)
* CMake Chem and Chem+KPP Build  (#2018) [Details](b26e64595)
* Consistent double precision definitions (#2099)  [Details](704259871)
* CMake Fix split command flags to be correctly populated (#2108)  [Details](5b09725f5)
* CMake WRFPLUS (#2089)  [Details](695f455e8)
* Override CMake-injected optimization flags in favor of the flags set by the build system and provided stanza information.  (#2138) [Details](b6542b0f7)
* Fixed CMake dev warning `project() should be called prior to this enable_language() call` appearing when using `configure_new` script with some newer versions of Cmake.  (#2125) [Details](0ccba14eb)
* Add documentation to custom properties in CMake to fix compatibility with older versions.  (#2131) [Details](f204246a0)
* Remove leading -D on defines during stanza reading to allow older versions of CMake to configure properly.  (#2130) [Details](c2e121f56)
* Bug fix in CMake FindnetCDF.cmake for empty --has-* nc-config fields  (#2135) [Details](f096921b2)
* CMake confcheck switch to try_* functions (#2090)  [Details](5dd2c192d)
* Bug fix in landread.c to address undefined behavior by adding an explicit return statement in `GET_LANDUSE()` function  (#2197) [Details](5ef63ba34)
* Fix memory leaks related to arrays being allocated without being deallocated in start_em and time series calculation subroutines.  (#2139) [Details](94aa27a7e)
* Fix an access violation error when a PGI compiler is used with urban variables in module_bl_ysu.F when urban option is turned off and the memories of those arrays are not available.  (#2137) [Details](33ce70c0f)
* Updated grav_settling code to better recognize the land use type so it doesn't crash. Also update the error message if it does crash to go into the rsl.error files rather than rsl.out files.  (#2110) [Details](b3eebb3fe)
* Bug fix for wrfinput where LCZ urban cells in LU_INDEX were overwritten with default USGS urban category.  (#2153) [Details](d96478d4f)
* Add manage_externals tool to access physics modules in MMM-physics git repository.  (#2126) [Details](7195dc250)
* Submodule implementation of the MYNN-EDMF (https://github.com/NCAR/MYNN-EDMF). The module names changed from *_mynn_* to *_mynnedmf_* to resolve a version conflict in MPAS. This version was originally developed within FV3/CCPP for RRFSv1, but has been refactored (to a k-only scheme) resulting in a speed-up of about 10-15% and it has since been tuned to better perform in MPAS and WRF compared to previous versions which were primarily developed for use in FV3.  (#2148) [Details](383476531)
* When the namelist option write_hist_at_0h_rst is set to .true. under &time_control, history write-out will now be conducted for the first time step for both the 0th stream (wrfout* files) and any special user-defined streams being implemented.  (#2133) [Details](61d1c84cb)

## Dynamics

* Corrected algorithms in the tipping bucket for precipitation and in the nudging routines to adjust for imprecision in single-precision real numbers exceeding the resolvable values in long (>23-year) continuous simulations.  (#2063) [Details](a32188308)
## Data Assimilation

* This PR adds an incremental analysis update capability. In the DA code, code is added to write out analysis increments for all variables in WRF netCDF format using auxiliary history output stream #5. In the model, analysis increments are divided by the number of time steps in a specified time window and added to the model similar to physics tendencies. The input stream for the model is 15. The capability is turned on by adding iau = 1 and iau_time_window_sec in &time_control. The way the increments are added to the model is similar to what described by the paper by Chen et al. (https://doi-org.cuucar.idm.oclc.org/10.1175/WAF-D-22-0127.1).  (#2151) [Details](6741f010e)
## Chemistry

* Bug fix in the calculation of optical properties. Mass redistribution between GOCART dust/sea salt and MOZAIC bins was corrected. It slightly increased (by 3-5%) the aerosol optical depth (AOD).  (#2112) [Details](bb791e73d)
* Fix a bug where TUV and FTUV fail to initialize the distance to the Sun properly if the simulation starts on 1 Jan.  (#2171) [Details](9aa3979f0)

## Hydro

* In `hydro.namelist` adding lake_opt to namelist, reservoirs to own namelist. Support for lakes (reservoirs) in non-UDMP reach-based routing added and some style guide cleanup completed.  (#2146) [Details](6d1db68f6)
* Hydro reservoir drainage area (DA) lake option bugfix  (#2182) [Details](313834d41)

## Miscellaneous

* Update README.namelist file (#2193)  [Details](7053a6ae9)
* A namelist option, default_soiltype, is added to define filled-in land category along water/land boundaries where soil data may be missing in program real.  (#2166) [Details](2f68d7b70)
* Add dzstretch_u and dzbot in namelist.input. Users are advised to check UG for other parameters to use.  (#2165) [Details](89ba5181b)
* Noah-MP code tag is updated to corresponding to WRFV4.7 release.  (#2207) [Details](f11e38164)
* Fixed defs for adap time step namelist vars in README.namelist (#2158)  [Details](30a16a1ce)
islas added a commit that referenced this pull request Apr 25, 2025
# WRF Version v4.7.0
The WRF model has been update to Version v4.7.0 on April 25, 2025

__Acknowledgements__: We would like to thank
*  Adam Dury (WeatherQuest)
*  Andrea Zonato, Royal Netherlands Meteorological Institute (KNMI)
*  Benjamin Kirk & Negin Sobhani (NSF NCAR / CISL)
*  Cenlin He @cenlinhe and Tzu-Shun Lin (NCAR)
*  Charlie Li, software developer from lakes environmental, Canada
*  Jakub Lewandowski (University of Leeds)
*  James Ruppert (University of Oklahoma)
*  Joseph Olson (NOAA/GSL)
*  Alexander Ukhov (KAUST)
*  L. Fita (UBA/CIMA/IFAECI)
*  Lukas Pilz (Heidelberg University)
*  Martilli, Alberto (CIEMAT)
*  Mathieu Landreau (Centrale Nantes)
*  Robert Conrick (U. of Washington); [email protected]
*  Robert Gilliam & Jon Pleim, US EPA
*  Sergey Osipov (KAUST)
*  Tanya Spero (U.S. EPA)
*  Ted Mansell (NOAA/NSSL) (@MicroTed )

for their contributions to this release.

## Physics

* Fix an error associated with using LCZ categories in NoahMP. Prior to this fix, the LCZs were not correctly referenced, hence ignored in the NoahMP code.  (#2202) [Details](a176a5965)
* NSSL-mp bug fix for (obsolete) droplet nucleation (#2195)  [Details](30c03dc40)
* NSSL microphysics scheme updates include 1. An explicit rain breakup for 3-moment rain (addresses issue of cold pools being too warm and drops being too large in rain cores), 2. Improved reflectivity conservation for graupel->hail conversion and drop freezing, 3. More accurate saturation mixing ratio calculation, 4. New default droplet nucleation that controls excess supersaturation much better than previously (and default is to always predict the number of activated CCN). The update has been submitted to CCPP repository as well.  (#2170) [Details](9d763af90)
* An new microphysics, UFS Double Moment (UDM), 7-class microphysics from Songyou Hong is added (mp_physics=27). UDM mp largely adopts microphysical processes in WDM7, but with bug fixes or revisions based on literature and accumulated realism. UDM mp utilizes the in-cloud microphysics concept (Kim and Hong 2018), with the addition of water-friendly aerosols for CCN initialization. Semi-lagrangian sedimentation of Juang and Hong (2010) is also re-configured for computational efficiency and numerical accuracy. All production terms are optimized by introducing a cloud-top definition for hydrometeors.  (#2147) [Details](5fc76c540)
* Release of the RCON Microphysics package into WRF, which improves upon the warm rain representation of the Thompson-Eidhammer scheme.  RCON is based heavily on the Thompson-Eidhammer scheme with a couple significant changes that improve upon the code in module_mp_rcon.F to generate more realistic rainfall during warm rain events with additional benefits for cold rain, especially warm processes during cold rain events.  Among the most significant changes for rain productions are 1) the use of a wider cloud water DSD of lognormal shape instead of the gamma DSD used by the Thompson-Eidhammer parameterization and 2) enhancement of the cloud-to-rain autoconversion parameterization to accommodate the new shape. The changes here also allow for sedimentation of cloud water within the lowest model layer, which effectively creates a drizzle mode in the scheme.  Accompanying published reference: Conrick, R., C. F. Mass, and L. McMurdie, 2023: Improving Simulations of Warm Rain in a Bulk Microphysics Scheme. Mon. Wea. Rev., 152, 169-185, https://doi.org/10.1175/MWR-D-23-0035.1.  (#2144) [Details](de213c920)
* Fix an erroneous print for using ghg_input when no radiation option is selected, mostly from idealized cases.  (#2199) [Details](bd4ecbe01)
* Fix a loop index error in bep_bem urban code.  (#2196) [Details](0171299d3)
* Noah-MP bug fixes for (1) allowing BATS snow albedo scheme for nighttime snow aging, (2) the potential leakage caused by calculate_soil variable during parallelized run, (3) the missing of HCPCT output for glacier points.  (#2160) [Details](fd079bf48)
* The similarity stability functions phim and phieps, necessary for calculating the surface values of tke and dissipation rate in the tke-epsilon-tpe PBL scheme [Zonato et al., 2022](https://doi.org/10.1175/MWR-D-21-0299.1) have been updated considering the correction term accounting for the roughness length z0. No relevant differences are found in temperature, wind speed, and humidity. Regarding turbulence variables, the stable case has just negligible differences, while the unstable case shows higher values of TKE and dissipation rate and lower values of temperature variance.  (#2120) [Details](70855a73e)
* Pleim-Xiu LSM is now compatible with 61 category MODIS LCZ landuse dataset. A mode of latent heat effects on Tg from vegetated parts and from wet leaves is added to Pleim-Xiu LSM.  (#2023) [Details](b7f31dcde)


## Software

* Determine MPI Data Types in col_on_comm() & dst_on_comm() to prevent displacements overflow.  (#2157) [Details](af8101493)
* CMake README documentation on <PackageName>_ROOT variables (#2190)  [Details](33036d613)
* CMake README documentation typo fixes (#2189)  [Details](3fd1aefda)
* Fix aarch64 GCC build when DM configuration selected (#2192)  [Details](8e1d6742c)
* Fixed failed compilation with Intel oneAPI by reworking the dependency linking of hydro CMake compilation  (#2178) [Details](2e0694f14)
* Fix compilation of grib2 IO in make build (#2191)  [Details](2639dcd3f)
* Fix uncontrollable building of external/io_netcdfpar folder for all stanzas  (#2181) [Details](127a8f40a)
* Suppress MYNN-EDMF verify checkout command (#2188)  [Details](3f2465b41)
* Fix typo in confcheck CMakeLists.txt for FSEEKO (#2179) [Details](2572bc5f5)
* Add quotes to optimization flags exceptions in CMake (#2180) [Details](b15e341e4)
* CMake Chem and Chem+KPP Build  (#2018) [Details](b26e64595)
* Consistent double precision definitions (#2099)  [Details](704259871)
* CMake Fix split command flags to be correctly populated (#2108)  [Details](5b09725f5)
* CMake WRFPLUS (#2089)  [Details](695f455e8)
* Override CMake-injected optimization flags in favor of the flags set by the build system and provided stanza information.  (#2138) [Details](b6542b0f7)
* Fixed CMake dev warning `project() should be called prior to this enable_language() call` appearing when using `configure_new` script with some newer versions of Cmake.  (#2125) [Details](0ccba14eb)
* Add documentation to custom properties in CMake to fix compatibility with older versions.  (#2131) [Details](f204246a0)
* Remove leading -D on defines during stanza reading to allow older versions of CMake to configure properly.  (#2130) [Details](c2e121f56)
* Bug fix in CMake FindnetCDF.cmake for empty --has-* nc-config fields  (#2135) [Details](f096921b2)
* CMake confcheck switch to try_* functions (#2090)  [Details](5dd2c192d)
* Bug fix in landread.c to address undefined behavior by adding an explicit return statement in `GET_LANDUSE()` function  (#2197) [Details](5ef63ba34)
* Fix memory leaks related to arrays being allocated without being deallocated in start_em and time series calculation subroutines.  (#2139) [Details](94aa27a7e)
* Fix an access violation error when a PGI compiler is used with urban variables in module_bl_ysu.F when urban option is turned off and the memories of those arrays are not available.  (#2137) [Details](33ce70c0f)
* Updated grav_settling code to better recognize the land use type so it doesn't crash. Also update the error message if it does crash to go into the rsl.error files rather than rsl.out files.  (#2110) [Details](b3eebb3fe)
* Bug fix for wrfinput where LCZ urban cells in LU_INDEX were overwritten with default USGS urban category.  (#2153) [Details](d96478d4f)
* Add manage_externals tool to access physics modules in MMM-physics git repository.  (#2126) [Details](7195dc250)
* Submodule implementation of the MYNN-EDMF (https://github.com/NCAR/MYNN-EDMF). The module names changed from *_mynn_* to *_mynnedmf_* to resolve a version conflict in MPAS. This version was originally developed within FV3/CCPP for RRFSv1, but has been refactored (to a k-only scheme) resulting in a speed-up of about 10-15% and it has since been tuned to better perform in MPAS and WRF compared to previous versions which were primarily developed for use in FV3.  (#2148) [Details](383476531)
* When the namelist option write_hist_at_0h_rst is set to .true. under &time_control, history write-out will now be conducted for the first time step for both the 0th stream (wrfout* files) and any special user-defined streams being implemented.  (#2133) [Details](61d1c84cb)

## Dynamics

* Corrected algorithms in the tipping bucket for precipitation and in the nudging routines to adjust for imprecision in single-precision real numbers exceeding the resolvable values in long (>23-year) continuous simulations.  (#2063) [Details](a32188308)
## Data Assimilation

* This PR adds an incremental analysis update capability. In the DA code, code is added to write out analysis increments for all variables in WRF netCDF format using auxiliary history output stream #5. In the model, analysis increments are divided by the number of time steps in a specified time window and added to the model similar to physics tendencies. The input stream for the model is 15. The capability is turned on by adding iau = 1 and iau_time_window_sec in &time_control. The way the increments are added to the model is similar to what described by the paper by Chen et al. (https://doi-org.cuucar.idm.oclc.org/10.1175/WAF-D-22-0127.1).  (#2151) [Details](6741f010e)
## Chemistry

* Bug fix in the calculation of optical properties. Mass redistribution between GOCART dust/sea salt and MOZAIC bins was corrected. It slightly increased (by 3-5%) the aerosol optical depth (AOD).  (#2112) [Details](bb791e73d)
* Fix a bug where TUV and FTUV fail to initialize the distance to the Sun properly if the simulation starts on 1 Jan.  (#2171) [Details](9aa3979f0)

## Hydro

* In `hydro.namelist` adding lake_opt to namelist, reservoirs to own namelist. Support for lakes (reservoirs) in non-UDMP reach-based routing added and some style guide cleanup completed.  (#2146) [Details](6d1db68f6)
* Hydro reservoir drainage area (DA) lake option bugfix  (#2182) [Details](313834d41)

## Miscellaneous

* Update README.namelist file (#2193)  [Details](7053a6ae9)
* A namelist option, default_soiltype, is added to define filled-in land category along water/land boundaries where soil data may be missing in program real.  (#2166) [Details](2f68d7b70)
* Add dzstretch_u and dzbot in namelist.input. Users are advised to check UG for other parameters to use.  (#2165) [Details](89ba5181b)
* Noah-MP code tag is updated to corresponding to WRFV4.7 release.  (#2207) [Details](f11e38164)
* Fixed defs for adap time step namelist vars in README.namelist (#2158)  [Details](30a16a1ce)
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.

4 participants