Skip to content

Commit 4e3780b

Browse files
committed
Merge branch 'atmosphere/relax_zone_divdamp_coef' into develop (PR #1082)
This merge enables namelist control of the coefficient used in the Laplacian filter for momentum in the relaxation zone. The Laplacian filter for momentum in the relaxation zone previously scaled the divergent component of the Laplacian with a hard-wired coefficient. With this merge, a new namelist option, config_relax_zone_divdamp_coef, has been introduced to allow for namelist control over this coefficient. The default value of config_relax_zone_divdamp_coef is 6.0, which is different from the previously hard-wired coefficient of 4.0 in the atm_bdy_adjust_dynamics_relaxzone_tend routine, reflecting the outcome of more recent testing.
2 parents e60a791 + aa966ed commit 4e3780b

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

src/core_atmosphere/Registry.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,11 @@
246246
units="-"
247247
description="Number of halo layers for fields"
248248
possible_values="Integer values, typically 2 or 3; DO NOT CHANGE"/>
249+
250+
<nml_option name="config_relax_zone_divdamp_coef" type="real" default_value="6.0" in_defaults="false"
251+
units="-"
252+
description="Coefficient for the divergent component of the Laplacian filter of momentum in the relaxation zone"
253+
possible_values="Positive real values"/>
249254
</nml_record>
250255

251256
<nml_record name="damping" in_defaults="true">

src/core_atmosphere/dynamics/mpas_atm_time_integration.F

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ subroutine atm_srk3(domain, dt, itimestep, exchange_halo_group)
682682

683683
!$OMP PARALLEL DO
684684
do thread=1,nThreads
685-
call atm_bdy_adjust_dynamics_relaxzone_tend( tend, state, diag, mesh, nVertLevels, dt, &
685+
call atm_bdy_adjust_dynamics_relaxzone_tend( block % configs, tend, state, diag, mesh, nVertLevels, dt, &
686686
ru_driving_values, rt_driving_values, rho_driving_values, &
687687
cellThreadStart(thread), cellThreadEnd(thread), &
688688
edgeThreadStart(thread), edgeThreadEnd(thread), &
@@ -5761,7 +5761,7 @@ end subroutine atm_bdy_adjust_dynamics_speczone_tend
57615761

57625762
!-------------------------------------------------------------------------
57635763

5764-
subroutine atm_bdy_adjust_dynamics_relaxzone_tend( tend, state, diag, mesh, nVertLevels, dt, &
5764+
subroutine atm_bdy_adjust_dynamics_relaxzone_tend( config, tend, state, diag, mesh, nVertLevels, dt, &
57655765
ru_driving_values, rt_driving_values, rho_driving_values, &
57665766
cellStart, cellEnd, edgeStart, edgeEnd, &
57675767
cellSolveStart, cellSolveEnd, edgeSolveStart, edgeSolveEnd )
@@ -5774,6 +5774,7 @@ subroutine atm_bdy_adjust_dynamics_relaxzone_tend( tend, state, diag, mesh, nVer
57745774
!
57755775
! WCS Fall 2016
57765776

5777+
type (mpas_pool_type), intent(in) :: config
57775778
type (mpas_pool_type), intent(in) :: state
57785779
type (mpas_pool_type), intent(inout) :: tend
57795780
type (mpas_pool_type), intent(in) :: diag
@@ -5795,6 +5796,7 @@ subroutine atm_bdy_adjust_dynamics_relaxzone_tend( tend, state, diag, mesh, nVer
57955796

57965797

57975798
real (kind=RKIND) :: edge_sign, laplacian_filter_coef, rayleigh_damping_coef, r_dc, r_dv, invArea
5799+
real (kind=RKIND), pointer :: divdamp_coef
57985800
real (kind=RKIND), dimension(nVertLevels) :: divergence1, divergence2, vorticity1, vorticity2
57995801
integer :: iCell, iEdge, i, k, cell1, cell2, iEdge_vort, iEdge_div
58005802
integer :: vertex1, vertex2, iVertex
@@ -5829,6 +5831,8 @@ subroutine atm_bdy_adjust_dynamics_relaxzone_tend( tend, state, diag, mesh, nVer
58295831
call mpas_pool_get_array(mesh, 'edgesOnVertex', edgesOnVertex)
58305832
call mpas_pool_get_array(mesh, 'nEdgesOnCell',nEdgesOnCell)
58315833
call mpas_pool_get_array(mesh, 'verticesOnEdge', verticesOnEdge)
5834+
5835+
call mpas_pool_get_config(config, 'config_relax_zone_divdamp_coef', divdamp_coef)
58325836

58335837
! First, Rayleigh damping terms for ru, rtheta_m and rho_zz
58345838

@@ -5940,8 +5944,9 @@ subroutine atm_bdy_adjust_dynamics_relaxzone_tend( tend, state, diag, mesh, nVer
59405944
! Compute diffusion, computed as \nabla divergence - k \times \nabla vorticity
59415945
!
59425946
do k=1,nVertLevels
5943-
tend_ru(k,iEdge) = tend_ru(k,iEdge) + laplacian_filter_coef * ( 4.0*( divergence2(k) - divergence1(k) ) * r_dc &
5944-
-( vorticity2(k) - vorticity1(k) ) * r_dv )
5947+
tend_ru(k,iEdge) = tend_ru(k,iEdge) + laplacian_filter_coef &
5948+
* (divdamp_coef * (divergence2(k) - divergence1(k)) * r_dc &
5949+
-(vorticity2(k) - vorticity1(k)) * r_dv)
59455950
end do
59465951

59475952
end if ! end test for relaxation-zone edge

0 commit comments

Comments
 (0)