Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
742 changes: 742 additions & 0 deletions schemes/bretherton_park/bretherton_park_diff.F90

Large diffs are not rendered by default.

830 changes: 830 additions & 0 deletions schemes/bretherton_park/bretherton_park_diff.meta

Large diffs are not rendered by default.

88 changes: 88 additions & 0 deletions schemes/bretherton_park/bretherton_park_diff_namelist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl"?>

<entry_id_pg version="2.0">
<entry id="eddy_lbulk_max">
<type>real</type>
<kind>kind_phys</kind>
<category>pbl</category>
<group>eddy_diff_nl</group>
<standard_name>maximum_master_length_scale_for_eddy_diffusion</standard_name>
<units>m</units>
<desc>
Maximum master length scale designed to address issues in diag_TKE outside the boundary layer. In order not to disturb turbulence characteristics in the lower troposphere, this should be set at least larger than a few km. However, this does not significantly improve the values outside of the boundary layer. Smaller values make some improvement, but it is also noisy. Better results are seen using eddy_leng_max or kv_freetrop_scale.
Default: 40000 m
</desc>
<values>
<value>40.D3</value>
</values>
</entry>

<entry id="eddy_leng_max">
<type>real</type>
<kind>kind_phys</kind>
<category>pbl</category>
<group>eddy_diff_nl</group>
<standard_name>maximum_dissipation_length_scale_for_eddy_diffusion</standard_name>
<units>m</units>
<desc>
Maximum dissipation length scale designed to address issues with diag_TKE outside the boundary layer, where the default value generates large diffusivities. A value of 30 m is consistent with the length scales used in the HB scheme; however, this will also reduce value in the boundary layer.
Default: 40000 m
</desc>
<values>
<value>40.D3</value>
<!-- waccm: 100.D0 -->
</values>
</entry>

<entry id="eddy_max_bot_pressure">
<type>real</type>
<kind>kind_phys</kind>
<category>pbl</category>
<group>eddy_diff_nl</group>
<standard_name>air_pressure_threshold_for_maximum_turbulent_length_scale_application</standard_name>
<units>hPa</units>
<desc>
Bottom pressure level at which namelist values for eddy_leng_max and eddy_lbulk_max are applied. Default values are used at lower levels (i.e. the boundary layer).
Default: 100.D3 hPa
</desc>
<values>
<value>100.D3</value>
<!-- waccm: 100.D0 -->
</values>
</entry>

<entry id="eddy_moist_entrain_a2l">
<type>real</type>
<kind>kind_phys</kind>
<category>pbl</category>
<group>eddy_diff_nl</group>
<standard_name>tunable_parameter_for_moist_entrainment_enhancement_in_pbl</standard_name>
<units>1</units>
<desc>
Moist entrainment enhancement parameter. Default: 30.D0
</desc>
<values>
<value>30.D0</value>
</values>
</entry>

<entry id="eddy_wstarent">
<type>logical</type>
<category>pbl</category>
<group>eddy_diff_nl</group>
<standard_name>use_wstar_entrainment_closure_formulation_for_eddy_diffusion_scheme</standard_name>
<units>flag</units>
<desc>
Use wstar (.true.) or TKE (.false.) entrainment closure in UW eddy diffusion scheme.
Default: TRUE
</desc>
<values>
<value>.true.</value>
</values>
</entry>



</entry_id_pg>
3,404 changes: 3,404 additions & 0 deletions schemes/bretherton_park/eddy_diff.F90

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions schemes/bretherton_park/eddy_diffusivity_adjustment_above_pbl.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
! Adjusts eddy diffusivities above the planetary boundary layer
! to address potentially excessive values in the free troposphere and upper atmosphere
! in the UW PBL scheme.
module eddy_diffusivity_adjustment_above_pbl
use ccpp_kinds, only: kind_phys

implicit none
private

! public CCPP-compliant subroutines
public :: eddy_diffusivity_adjustment_above_pbl_run

contains

! Adjust eddy diffusivities above the PBL to prevent excessive values
! in the free troposphere and upper atmosphere.
!
! The diffusivities from diag_TKE (UW) can be much larger than from HB in the free
! troposphere and upper atmosphere. These seem to be larger than observations,
! and in WACCM the gw_drag code is already applying an eddy diffusivity in the
! upper atmosphere. Optionally, adjust the diffusivities in the free troposphere
! or the upper atmosphere.
!
! NOTE: Further investigation should be done as to why the diffusivities are
! larger in diag_TKE.
!> \section arg_table_eddy_diffusivity_adjustment_above_pbl_run Argument Table
!! \htmlinclude eddy_diffusivity_adjustment_above_pbl_run.html
subroutine eddy_diffusivity_adjustment_above_pbl_run( &
ncol, pverp, &
kv_top_pressure, &
kv_freetrop_scale, &
kv_top_scale, &
zi, pint, pblh, &
kvh, kvm, kvq, &
errmsg, errflg)

! Input arguments
integer, intent(in) :: ncol
integer, intent(in) :: pverp
real(kind_phys), intent(in) :: kv_top_pressure ! Upper atmosphere pressure threshold [Pa]
real(kind_phys), intent(in) :: kv_freetrop_scale ! Free troposphere scale factor
real(kind_phys), intent(in) :: kv_top_scale ! Upper atmosphere scale factor
real(kind_phys), intent(in) :: zi(:, :) ! Geopotential height at interfaces [m]
real(kind_phys), intent(in) :: pint(:, :) ! Pressure at interfaces [Pa]
real(kind_phys), intent(in) :: pblh(:) ! Planetary boundary layer height [m]

! Input/Output arguments
real(kind_phys), intent(inout) :: kvh(:, :) ! Eddy diffusivity for heat at interfaces [m2 s-1]
real(kind_phys), intent(inout) :: kvm(:, :) ! Eddy diffusivity for momentum at interfaces [m2 s-1]
real(kind_phys), intent(inout) :: kvq(:, :) ! Eddy diffusivity for constituents at interfaces [m2 s-1]

! Output arguments
character(len=512), intent(out) :: errmsg
integer, intent(out) :: errflg

! Local variables
integer :: i, k

errmsg = ''
errflg = 0

! Only apply adjustment if scaling factors differ from unity
if ((kv_freetrop_scale /= 1.0_kind_phys) .or. &
((kv_top_scale /= 1.0_kind_phys) .and. (kv_top_pressure > 0.0_kind_phys))) then
do i = 1, ncol
do k = 1, pverp
! Outside of the boundary layer?
if (zi(i, k) > pblh(i)) then
! In the upper atmosphere?
if (pint(i, k) <= kv_top_pressure) then
kvh(i, k) = kvh(i, k) * kv_top_scale
kvm(i, k) = kvm(i, k) * kv_top_scale
kvq(i, k) = kvq(i, k) * kv_top_scale
else
! In the free troposphere
kvh(i, k) = kvh(i, k) * kv_freetrop_scale
kvm(i, k) = kvm(i, k) * kv_freetrop_scale
kvq(i, k) = kvq(i, k) * kv_freetrop_scale
end if
else ! within PBL.
exit
end if
end do
end do
end if

end subroutine eddy_diffusivity_adjustment_above_pbl_run

end module eddy_diffusivity_adjustment_above_pbl
86 changes: 86 additions & 0 deletions schemes/bretherton_park/eddy_diffusivity_adjustment_above_pbl.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[ccpp-table-properties]
name = eddy_diffusivity_adjustment_above_pbl
type = scheme

[ccpp-arg-table]
name = eddy_diffusivity_adjustment_above_pbl_run
type = scheme
[ ncol ]
standard_name = horizontal_loop_extent
units = count
type = integer
dimensions = ()
intent = in
[ pverp ]
standard_name = vertical_interface_dimension
units = count
type = integer
dimensions = ()
intent = in
[ kv_top_pressure ]
standard_name = air_pressure_threshold_for_eddy_diffusivity_adjustment
units = Pa
type = real | kind = kind_phys
dimensions = ()
intent = in
[ kv_freetrop_scale ]
standard_name = free_troposphere_eddy_diffusivity_scaling_factor_for_eddy_diffusivity_adjustment
units = 1
type = real | kind = kind_phys
dimensions = ()
intent = in
[ kv_top_scale ]
standard_name = upper_atmosphere_eddy_diffusivity_scaling_factor_for_eddy_diffusivity_adjustment
units = 1
type = real | kind = kind_phys
dimensions = ()
intent = in
[ zi ]
standard_name = geopotential_height_wrt_surface_at_interface
units = m
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_interface_dimension)
intent = in
[ pint ]
standard_name = air_pressure_at_interface
units = Pa
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_interface_dimension)
intent = in
[ pblh ]
standard_name = atmosphere_boundary_layer_thickness
units = m
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ kvh ]
standard_name = eddy_heat_diffusivity_at_interfaces
units = m2 s-1
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_interface_dimension)
intent = inout
[ kvm ]
standard_name = eddy_momentum_diffusivity_at_interfaces
units = m2 s-1
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_interface_dimension)
intent = inout
[ kvq ]
standard_name = eddy_constituent_diffusivity_at_interfaces
units = m2 s-1
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_interface_dimension)
intent = inout
[ errmsg ]
standard_name = ccpp_error_message
units = none
type = character | kind = len=512
dimensions = ()
intent = out
[ errflg ]
standard_name = ccpp_error_code
units = 1
type = integer
dimensions = ()
intent = out

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl"?>

<entry_id_pg version="2.0">
<entry id="kv_top_pressure">
<type>real</type>
<kind>kind_phys</kind>
<category>pbl</category>
<group>eddy_diff_adj_nl</group>
<standard_name>air_pressure_threshold_for_eddy_diffusivity_adjustment</standard_name>
<units>Pa</units>
<desc>
Pressure (Pa) that defined the upper atmosphere for adjustment of eddy diffusivities from diag_TKE using kv_top_scale.
Default: 0
</desc>
<values>
<value>0.0</value>
</values>
</entry>
<entry id="kv_top_scale">
<type>real</type>
<kind>kind_phys</kind>
<category>pbl</category>
<group>eddy_diff_adj_nl</group>
<standard_name>upper_atmosphere_eddy_diffusivity_scaling_factor_for_eddy_diffusivity_adjustment</standard_name>
<units>1</units>
<desc>
Scaling factor that is applied (multiplied) to the eddy diffusivities in the upper atmosphere (see kv_top_pressure).
Default: 1.0
</desc>
<values>
<value>1.0</value>
<!-- waccm: 0.0 -->
</values>
</entry>
<entry id="kv_freetrop_scale">
<type>real</type>
<kind>kind_phys</kind>
<category>pbl</category>
<group>eddy_diff_adj_nl</group>
<standard_name>free_troposphere_eddy_diffusivity_scaling_factor_for_eddy_diffusivity_adjustment</standard_name>
<units>1</units>
<desc>
Scaling factor that is applied (multiplied) to the eddy diffusivities in the free troposphere (boundary layer to kv_top_pressure)
Default: 1.0
</desc>
<values>
<value>1.0</value>
</values>
</entry>
</entry_id_pg>
Loading
Loading