Skip to content

Commit 6b6c272

Browse files
skamarocmgduda
authored andcommitted
Remove scaling of gravity-wave absorbing layer coefficient by local mesh size
This commit removes the scaling of the gravity-wave absorbing layer coefficient by the local mesh size. Previously, the absorbing layer coefficient was scaled by dx/dx_fine. For large values of dx/dx_fine instabilities have been encountered associated with this scaling of the absorbing layer coefficient. Units have been added to the configuration variable config_xnutr (1/s) in the Registry - it is used in calculating the absorbing layer coefficient. Units have also been added to config_visc4_2dsmag (m/s) in the Registry - it is used in the calculation of the hyperviscosity.
1 parent b9090a1 commit 6b6c272

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/core_atmosphere/Registry.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@
152152
possible_values="Positive real values. A zero value implies that the length scale is prescribed by the nominalMinDc value in the input file."/>
153153

154154
<nml_option name="config_visc4_2dsmag" type="real" default_value="0.05"
155-
units="-"
156-
description="Scaling coefficient of $\delta x^3$ to obtain $\nabla^4$ diffusion coefficient"
155+
units="m s^{-1}"
156+
description="Coefficient multiplied by $\delta x^3$ to obtain $\nabla^4$ physical hyperviscosity"
157157
possible_values="Non-negative real values"/>
158158

159159
<nml_option name="config_del4u_div_factor" type="real" default_value="10.0" in_defaults="false"
@@ -264,7 +264,7 @@
264264
possible_values="Positive real values"/>
265265

266266
<nml_option name="config_xnutr" type="real" default_value="0.2"
267-
units="-"
267+
units="s^{-1}"
268268
description="Maximum w-damping coefficient at model top"
269269
possible_values="0 $\leq$ config_xnutr $\leq$ 1"/>
270270

src/core_atmosphere/mpas_atm_core.F

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,31 +1250,26 @@ subroutine atm_compute_damping_coefs(mesh, configs)
12501250
real (kind=RKIND), pointer :: config_xnutr, config_zd
12511251
real (kind=RKIND) :: z, zt, m1, pii
12521252
real (kind=RKIND), dimension(:,:), pointer :: dss, zgrid
1253-
real (kind=RKIND), dimension(:), pointer :: meshDensity
1254-
real (kind=RKIND) :: dx_scale_power
12551253

12561254
m1 = -1.0
12571255
pii = acos(m1)
12581256

12591257
call mpas_pool_get_dimension(mesh, 'nCells', nCells)
12601258
call mpas_pool_get_dimension(mesh, 'nVertLevels', nVertLevels)
12611259

1262-
call mpas_pool_get_array(mesh, 'meshDensity', meshDensity)
12631260
call mpas_pool_get_array(mesh, 'dss', dss)
12641261
call mpas_pool_get_array(mesh, 'zgrid', zgrid)
12651262

12661263
call mpas_pool_get_config(configs, 'config_zd', config_zd)
12671264
call mpas_pool_get_config(configs, 'config_xnutr', config_xnutr)
12681265

1269-
dx_scale_power = 1.0
12701266
dss(:,:) = 0.0
12711267
do iCell=1,nCells
12721268
zt = zgrid(nVertLevels+1,iCell)
12731269
do k=1,nVertLevels
12741270
z = 0.5*(zgrid(k,iCell) + zgrid(k+1,iCell))
12751271
if (z > config_zd) then
12761272
dss(k,iCell) = config_xnutr*sin(0.5*pii*(z-config_zd)/(zt-config_zd))**2.0
1277-
dss(k,iCell) = dss(k,iCell) / meshDensity(iCell)**(0.25*dx_scale_power)
12781273
end if
12791274
end do
12801275
end do

0 commit comments

Comments
 (0)