Skip to content

Hybrid vertical coordinate for ARW#5

Closed
davegill wants to merge 9 commits intowrf-model:masterfrom
davegill:HYBRID_merge_test
Closed

Hybrid vertical coordinate for ARW#5
davegill wants to merge 9 commits intowrf-model:masterfrom
davegill:HYBRID_merge_test

Conversation

@davegill
Copy link
Contributor

TYPE: new feature

KEYWORDS: hybrid eta isobaric coordinate

SOURCE: internal

DESCRIPTION OF CHANGES:

  1. The build of WRF now requires a modification to the CPP since the variable argument lists macros is utilized. We can no longer use "-traditional-cpp", which does not permit the variable argument macro. Getting rid of -traditional-cpp means that the apostrophe is assumed to be part of a string. The build now gets rid of apostrophe situations within a Fortran comment. The "%" character (the separator between a derived data object and a field (such as grid%u_2) cannot easily be checked-on or parsed within CPP. Part of the build turns the grid%mu strings into a parseable single string, the CPP is run, then the build turns the parseable single string back into grid%mu. We now must include -C so that the Fortran concatenation operator "//" is interpreted correctly.
  2. There are two types of major changes to the source code to accommodate the hybrid coordinate. The first involves mu (still defined as δpd/δη) and the second involves pressure. The 3d dry pressure is now defined as:
    pd = B(η) ( pds – pt ) + ( η – B(η) ) ( p0 – pt ) + pt
    Note that when B(η) = η then the vertical coordinate simplifies to the previous terrain following coordinate. When B(η) = 0, then the vertical coordinate is isobaric. The B(η) array is computed internally based on a couple of nameless options.
    C3 = B(η)
    C4 = ( η – B(η) ) ( p0 – pt )

The mu field, is no longer defined as the column pressure:
μ = δpd/δη = (δB(η)/δη) pc + ( 1 – δB(η)/δη ) ( p0 – pt )

We set
C1 = δB(η)/δη
and
C2 = ( 1 – δB(η)/δη ) ( p0 – pt )

This the functional form of total (or reference) mu as:
μ = C1( η ) pc + C2 ( η )
and the perturbation mu as:
μ = C1( η ) pc

All of the C1, C2, C3, C4 arrays are defined on both half and full levels.

  1. Following is a before and after of the CPP styled modifications introduced into some of the files:

BEFORE:

define mu(...) (c1(k)*XXPCTXX(VA_ARGS)+c2(k))

define XXPCTXX(...) mu(VA_ARGS)

define muavg(...) (c1(k)*XXPCAVGXX(VA_ARGS)+c2(k))

define XXPCAVGXX(...) muavg(VA_ARGS)

define mub(...) (c1(k)*XXPCBXX(VA_ARGS)+c2(k))

define XXPCBXX(...) mub(VA_ARGS)

REAL, dimension(ims:ime,jms:jme) , intent(in) :: mu, mub

CALL abcd ( ru_tendf, mu, mu_1, mub, muavg, config_flags

DO j = jts, jte
DO i = its,ite

phb(i,k,j) = (r_d/p1000)_(t_init(i,k,j)+t0)_mub(i,j)

tendency(i,k,j)=tendency(i,k,j)- &
(mrdx_0.5_((mu(i+1,j)+mu(i,j))_H1(i+1,k,j)- &
(mu(i-1,j)+mu(i,j))H1(i ,k,j))+ &
mrdy_0.5
((mu(i,j+1)+mu(i,j))_H2(i,k,j+1)- &
(mu(i,j-1)+mu(i,j))_H2(i,k,j ))- &
msfty(i,j)mu(i,j)(H1avg(i,k+1,j)-H1avg(i,k,j)+ &
H2avg(i,k+1,j)-H2avg(i,k,j) &
)*rdzw(i,k,j) &

DO j = j_start, j_end
DO i = i_start, i_end
  MUAVG(i,j) = 0.25 * ( MU(i-1,j  ) + MU(i,j  ) +  &
                        MU(i-1,j-1) + MU(i,j-1) )

END DO
END DO

DO j = j_start, j_end
DO k = kts, ktf
DO i = i_start, i_end

titau(i,k,j) = muavg(i,j) * mtau(i,k,j)

END DO
END DO
END DO

AFTER:
REAL, dimension(ims:ime,jms:jme) , intent(in) :: mu, mub

CALL abcd ( ru_tendf, mu, mu_1, mub, muavg, config_flags

DO j = jts, jte
DO i = its,ite

phb(i,k,j) = (r_d/p1000)(t_init(i,k,j)+t0)(c1(k)*mub(i,j)+c2(k))

tendency(i,k,j)=tendency(i,k,j)- &
(mrdx_0.5_(((c1(k)_mu(i+1,j)+c2(k))+(c1(k)_mu(i,j)+c2(k)))_H1(i+1,k,j)- &
((c1(k)_mu(i-1,j)+c2(k))+(c1(k)_mu(i,j)+c2(k)))H1(i ,k,j))+ &
mrdy_0.5
(((c1(k)_mu(i,j+1)+c2(k))+(c1(k)_mu(i,j)+c2(k)))_H2(i,k,j+1)- &
((c1(k)_mu(i,j-1)+c2(k))+(c1(k)_mu(i,j)+c2(k)))H2(i,k,j ))- &
msfty(i,j)
(c1(k)mu(i,j)+c2(k))(H1avg(i,k+1,j)-H1avg(i,k,j)+ &
H2avg(i,k+1,j)-H2avg(i,k,j) &
)_rdzw(i,k,j) &

DO j = j_start, j_end
DO i = i_start, i_end
  MUAVG(i,j) = 0.25 * ( MU(i-1,j ) + MU(i,j ) + &
                        MU(i-1,j-1) + MU(i,j-1) )

END DO
END DO

DO j = j_start, j_end
DO k = kts, ktf
DO i = i_start, i_end

titau(i,k,j) = (c1(k)*muavg(i,j)+c2(k)) * mtau(i,k,j)

END DO
END DO
END DO

Note that the variable argument macro ONLY modified variables that have a set of following parentheses, and that the arguments within the parens are maintained.

  1. For testing purposes with the hill2d_x case, additional namelists and input soundings are provided.
  2. The hybrid option is activated via the namelist.input file:
    &dynamics
    hybrid_opt = 2
    etac = 0.3
    /
    Users may turn off the hybrid coordinate completely so that the coordinate is terrain following only. When hybrid_opt=0, the model is in terrain following mode. When the hybrid option is activated, the etac value (the critical eta value) indicates at which level the model becomes isobaric.

LIST OF MODIFIED FILES (annotated if not obvious, not required to be on a single line):
M Registry/Registry.EM
D Registry/registry.hyb_coord
M arch/configure_new.defaults
M arch/noopt_exceptions
M arch/noopt_exceptions_f
M arch/postamble_new
M dyn_em/couple_or_uncouple_em.F
M dyn_em/module_advect_em.F
M dyn_em/module_bc_em.F
M dyn_em/module_big_step_utilities_em.F
M dyn_em/module_diffusion_em.F
M dyn_em/module_em.F
M dyn_em/module_first_rk_step_part1.F
M dyn_em/module_first_rk_step_part2.F
M dyn_em/module_initialize_hill2d_x.F
M dyn_em/module_initialize_real.F
M dyn_em/module_polarfft.F
M dyn_em/module_small_step_em.F
M dyn_em/nest_init_utils.F
M dyn_em/solve_em.F
M dyn_em/start_em.F
M external/RSL_LITE/module_dm.F
M external/io_esmf/makefile
M main/Makefile
M main/ndown_em.F
M main/real_em.F
M phys/module_microphysics_driver.F
M phys/module_mp_morr_two_moment.F
M share/dfi.F
M share/mediation_integrate.F
M share/module_bc.F
D test/em_hill2d_x/input_sounding-U=10,N=0.01
D test/em_hill2d_x/input_sounding-U=15,N=0.01
D test/em_hill2d_x/input_sounding-layers-20mps
M test/em_hill2d_x/namelist.input
D test/em_hill2d_x/namelist.input-100m_hill-10mps-N^2=0.0001-30km_deep-20km_damping-dampcoef=0.1-etac=0.2
D test/em_hill2d_x/namelist.input-700m_hill-15mps-n^2=0.0001-25km_deep-15km_damping-dampcoef=0.08-etac=0.2
D test/em_hill2d_x/namelist.input-HILL
D test/em_hill2d_x/namelist.input-HILL-51
D test/em_hill2d_x/namelist.input-HILL-schar
D test/em_hill2d_x/test.csh
M test/em_real/namelist.input

TESTS CONDUCTED (explicitly state mandatory, voluntary, and assigned tests, not required to be on a single line):

  1. Several hill2d cases indicate reasonable functioning of the hybrid coordinate
  2. Several real data cases point to reasonable behavior (larger cases from 13 km RAP)
  3. With a couple of 1-line mods to flip multiplications and divides for mu, when the option is disabled, bit-for-bit results are available for before vs after for regression test
  4. Bit for bit results for DFI options 0, 1, 2, 3 (small test case, single processor)

Known limitations

  1. Still working on parallel bit for bit with GSD domain
  2. Nesting (standard, moving, vertical), FDDA are not enabled
  3. Little to no safety net is in place for users. For example, setting etac=0.3 over the US with a 10 mb stop would be OK, while the same settings over the Himalayas would likely be troublesome.
  4. All idealized cases need weighting terms c1, c2, c3, c4 introduced in module_initialize_<some_ideal_case>.F
  5. Chem and DA need hybrid registry included

davegill added 9 commits July 5, 2016 21:59
This commit:
1) allows ideal hill2d_x or real 
2) bit for bit (hybrid_opt=0) vs terrain following
3) bit for bit serial and MPI
4) Has info for several hill2d cases (nml and inputs)



git-svn-id: https://svn-wrf-model.cgd.ucar.edu/branches/HYBRID_COORDINATE_root=4929_start=20160705@9435 b0b5d27b-6f0f-0410-a2a3-cb1e977edc3d
was tested with dfi_opt=3.  For the expected bit-for-bit
results (hybrid_opt=0), everything is as it should be.

M    share/dfi.F
M    test/em_real/namelist.input




git-svn-id: https://svn-wrf-model.cgd.ucar.edu/branches/HYBRID_COORDINATE_root=4929_start=20160705@9455 b0b5d27b-6f0f-0410-a2a3-cb1e977edc3d
pressure computation, where the moisture is added in (in the
dfi_rebalance routine).  I changed all of the "(i,k" to "(i,kk",
but there was a rdnw(k) that was missed.

M    dfi.F



git-svn-id: https://svn-wrf-model.cgd.ucar.edu/branches/HYBRID_COORDINATE_root=4929_start=20160705@9456 b0b5d27b-6f0f-0410-a2a3-cb1e977edc3d
missed the k -> kk index swap for rdn(k+1).
M    dfi.F



git-svn-id: https://svn-wrf-model.cgd.ucar.edu/branches/HYBRID_COORDINATE_root=4929_start=20160705@9457 b0b5d27b-6f0f-0410-a2a3-cb1e977edc3d
Merge branch 'master' into HYBRID_merge_test
@llpcarson
Copy link
Contributor

Dave - Have you done a full reg-test yet? I thought that parts of HWRF needed the -traditional flag for CPP, but that was some years ago, so perhaps it works OK without it now.

@davegill
Copy link
Contributor Author

Laurie,
The NMM code came out unscathed in the regression test - honestly, about
the only thing that did! It is likely that the sed commands to remove the
apostrophes are what is allowing us to no longer use -traditional-cpp.
Dave

On Fri, Sep 16, 2016 at 12:05 PM, Laurie Carson notifications@github.com
wrote:

Dave - Have you done a full reg-test yet? I thought that parts of HWRF
needed the -traditional flag for CPP, but that was some years ago, so
perhaps it works OK without it now.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AMFFegJH71C16qcKm9leGUe-uVMxrF8Jks5qqtp1gaJpZM4J_MYm
.

@jamiebresch
Copy link
Contributor

We need hybrid_opt in global attributes of the wrfinput and wrfout to know what coordinate is used.

@davegill
Copy link
Contributor Author

Jamie,
Yes, the global attributes are required.
I just started a list of things to do, this is #2.
Dave

On Fri, Sep 16, 2016 at 12:27 PM, Jamie Bresch notifications@github.com
wrote:

We need hybrid_opt in global attributes of the wrfinput and wrfout to know
what coordinate is used.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AMFFeovrRAQ3QF1oFwpOfFlPEeGk1iemks5qqt95gaJpZM4J_MYm
.

Copy link
Contributor

@mkavulich mkavulich left a comment

Choose a reason for hiding this comment

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

@davegill At the beginning of dyn_em/module_bc_em.F you've added a whole bunch of empty lines; can you remove these?

@davegill
Copy link
Contributor Author

Mike,
I initially went through and added quite a few blank lines in the new code,
and then did some "grep"ing on the various MU strings, with the associated
new line number (including black lines). Then I went back and started
adding in the required CPP directives for each of the necessary MU
variables. This purposefully left quite a few blank lines at the top of
every Fortran file so that my grep line numbers would not change. I'll go
back and review all of the modified files for these blank lines near the
top.
Dave

On Mon, Sep 19, 2016 at 6:05 PM, Michael Kavulich notifications@github.com
wrote:

@mkavulich requested changes on this pull request.

@davegill https://github.com/davegill At the beginning of
dyn_em/module_bc_em.F you've added a whole bunch of empty lines; can you
remove these?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (review), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AMFFesID_G_6DR_dMMILabqoqFX0cXD0ks5qryNkgaJpZM4J_MYm
.

@jamiebresch
Copy link
Contributor

@davegill The CPP stuff is basically reverting what was done in the 41f94bb (Nov 1, 2013) commit.

@davegill
Copy link
Contributor Author

Jamie,

Good catch for those Linux users who were originally hit with this problem.

For the hybrid coordinate cpp-automatic substitution of mu(i,j) into
(c1(k)*mu(i,j)+c2(k), we need to use the variable argument option. That
means that we cannot use -traditional-cpp (because the variable argument
option is not available with -traditional-cpp). When we get rid of
-traditional-cpp, then we starting interpreting C++ styled comments (the
"//" string) as C++ styled comments, and by default cpp throws comments
away. Unfortunately, those "//" strings are the Fortran concatenation
operator, which we do not want thrown away inside of the cpp text
processing. To remove the problem of the misinterpreted Fortran
concatenation operator, we need to stick the "-C" flag back onto the cpp
command (which basically says DO NOT GET RID OF COMMENTS).

Let me see if I can turn the "//" string inside of Fortran files into
something unprocessed bycpp, and then swap it back in after cpp has done
its processing. Here's what I have in mind, swapping in the string
"fort_concat" for the "//" string (and then back again).

/Users/gill>cat foo1

abd // abd

/Users/gill>sed -e "s////fort_concat/g" foo1

abd fort_concat abd

/Users/gill>sed -e "s////fort_concat/g" foo1 > foo2

/Users/gill>cat foo2

abd fort_concat abd

/Users/gill>sed -e "s/fort_concat////g" foo2

abd // abd

If I can get a full build to work this way, I can remove the -C option from
the cpp.

Dave

On Tue, Sep 20, 2016 at 1:55 PM, Jamie Bresch notifications@github.com
wrote:

@davegill https://github.com/davegill The CPP stuff is basically
reverting what was done in the 41f94bb
41f94bb
(Nov 1, 2013) commit.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#5 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AMFFeotOdE_OxqAmNBoC-86XJihBF3zSks5qsDpLgaJpZM4J_MYm
.

@mkavulich
Copy link
Contributor

Closed in favor of #104

@mkavulich mkavulich closed this Jan 6, 2017
twjuliano pushed a commit to twjuliano/WRF that referenced this pull request Jun 15, 2021
Feature/ideal meso forcing

Additions of missing tsout-related files from previous 'Feature/ideal meso forcing' PR. Also additions of sgs fluxes in output, and an update to Makefile for more flexibility in incorporating recent netcdf libraries.
twjuliano pushed a commit to twjuliano/WRF that referenced this pull request Jun 13, 2022
Modified forcing conditions for this CBL case
weiwangncar added a commit that referenced this pull request Jan 29, 2025
TYPE: new feature

KEYWORDS: data assimilation, incremental analysis update

SOURCE: Min Chen of IUM/CMA and internal

DESCRIPTION OF CHANGES:
Add 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. For example:

```
 auxinput15_inname                   = "wrfiauinp_d01"
 io_form_auxinput15                  = 2
 auxinput15_interval                 = 360,
 iau                                 = 1
 iau_time_window_sec                 = 3600.
```
LIST OF MODIFIED FILES: 
M       Registry/Registry.EM_COMMON.var
M       Registry/Registry.wrfvar
M       Registry/registry.em_shared_collection
A       Registry/registry.iau
M       dyn_em/module_em.F
M       dyn_em/module_first_rk_step_part2.F
M       phys/module_physics_addtendc.F
M       var/build/da.make
M       var/build/depend.txt
M       var/da/da_main/da_solve.inc
M       var/da/da_main/da_wrfvar_io.f90
M       var/da/da_main/da_wrfvar_top.f90
A       var/da/da_main/da_write_anaincrements.inc
M       var/da/da_transfer_model/da_transfer_xatowrf.inc

TESTS CONDUCTED: 
The Jenkins tests have passed.

RELEASE NOTE: 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).
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); robert.conrick@gmail.com
*  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); robert.conrick@gmail.com
*  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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants