Skip to content
Merged
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
13 changes: 8 additions & 5 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@
<ncdata hgrid="ne16np4" nlev="126" waccmx="1" aquaplanet="1" >atm/waccm/ic/waccmx_aqua_ne16np4_126L_c191108.nc</ncdata>
<ncdata hgrid="ne16np4" nlev="126" waccmx="1" aquaplanet="1" ionosphere="none">atm/waccm/ic/waccmx4_neutral_aquap_ne16np4_126lev_c200827.nc</ncdata>
<ncdata hgrid="ne16np4" nlev="130" waccmx="1" >atm/waccm/ic/FX2000_ne16pg3_spinup01.cam.i.0002-01-01_c251215.nc</ncdata>
<ncdata hgrid="ne16np4" nlev="58" >atm/cam/inic/se/FHISTC_LTso_ne16pg3_ne16pg3_mg17.i.c260220.nc</ncdata>
<ncdata hgrid="ne16np4" nlev="93" >atm/cam/inic/se/FHISTC_MTso_ne16pg3_ne16pg3_mg17.i.c260220.nc</ncdata>

<ncdata hgrid="ne30np4" nlev="26" >atm/cam/inic/se/ape_topo_cam4_ne30np4_L26_c171020.nc</ncdata>
<ncdata hgrid="ne30np4" nlev="26" aquaplanet="1" >atm/cam/inic/se/ape_cam4_ne30np4_L26_c170417.nc</ncdata>
Expand Down Expand Up @@ -3207,7 +3209,8 @@
<se_hypervis_subcycle > 3 </se_hypervis_subcycle>
<se_hypervis_subcycle waccm_phys="1" model_top="mt" > 3 </se_hypervis_subcycle>
<se_hypervis_subcycle waccm_phys="1" > 2 </se_hypervis_subcycle>
<se_hypervis_subcycle hgrid="ne16np4" > 4 </se_hypervis_subcycle>
<se_hypervis_subcycle hgrid="ne16np4" > 3 </se_hypervis_subcycle>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@PeterHjortLauritzen - Are you intentionally changing this value for all ne16np4 runs (other than the LT)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes

<se_hypervis_subcycle hgrid="ne16np4" model_top="lt" > 1 </se_hypervis_subcycle>
<se_hypervis_subcycle hgrid="ne16np4" waccm_phys="1" model_top="none"> 10 </se_hypervis_subcycle>
<se_hypervis_subcycle hgrid="ne16np4" waccm_phys="1" waccmx="0" model_top="none"> 9 </se_hypervis_subcycle>
<se_hypervis_subcycle hgrid="ne30np4" waccm_phys="1" waccmx="0" model_top="none"> 8 </se_hypervis_subcycle>
Expand Down Expand Up @@ -3249,16 +3252,16 @@
<se_max_hypervis_courant se_refined_mesh="1" hypervis_type="scalar" > 1.9 </se_max_hypervis_courant>

<se_nu>-1</se_nu>
<se_nu hgrid="ne16np4" waccm_phys="1" waccmx="0">6.e15</se_nu>
<se_nu hgrid="ne16np4" model_top="ht" >6.e15</se_nu>
<se_nu hgrid="ne16np4">6.e15</se_nu>
<se_nu waccmx="1">5.e15</se_nu>

<se_nu_div> -1 </se_nu_div>
<se_nu_div hgrid="ne16np4" waccm_phys="1" waccmx="0">6.e15</se_nu_div>
<se_nu_div hgrid="ne16np4" model_top="ht" >6.e15</se_nu_div>
<se_nu_div hgrid="ne16np4">6.e15</se_nu_div>
<se_nu_div waccmx="1"> 10.e15 </se_nu_div>

<se_nu_p>-1 </se_nu_p>
<se_nu_p hgrid="ne16np4">6.e15</se_nu_p>
<se_nu_p waccmx="1">5.e15</se_nu_p>

<se_nu_top > 1.25e5 </se_nu_top>
<se_nu_top waccmx="1" > 1.0e6 </se_nu_top>
Expand Down
62 changes: 62 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
Tag name: cam6_4_154
Originator(s): pel, cacraig
Date: Feb 24, 2026
One-line Summary: Bring in a couple of misc changes: MT & LT ne16pg3 namelist defaults for dycore and inic; remove unused routines

Github PR URL: https://github.com/ESCOMP/CAM/pull/1489

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
- Closes PR: remove unused routines: https://github.com/ESCOMP/CAM/pull/1485
Part of issue #986 - Update some older math routines

- Closes PR: ne16pg3 configuration LT and MT out-of-the-box: https://github.com/ESCOMP/CAM/pull/1488
Issue #1487 - 2 degree (ne16pg3) out-of-the-box LT and MT functionality

Describe any changes made to build system: N/A

Describe any changes made to the namelist:
Change ncdata and dycore parameters
Fix se_nu_p bug for ne16pg3 in namelist

List any changes to the defaults for the boundary datasets: N/A

Describe any substantial timing or memory changes: N/A

Code reviewed by: cacraigucar, nusbaume

List all files eliminated: N/A

List all files added and what they do: N/A

List all existing files that have been modified, and describe the changes:
M bld/namelist_files/namelist_defaults_cam.xml
- namelist changes as descibed above

M src/dynamics/se/dycore/quadrature_mod.F90
- three routines which are not used are being deleted

If there were any failures reported from running test_driver.sh on any test
platform, and checkin with these failures has been OK'd by the gatekeeper,
then copy the lines from the td.*.status files for the failed tests to the
appropriate machine below. All failed tests must be justified.

derecho/intel/aux_cam:
FAIL ERI_D_Ln18.ne16pg3_ne16pg3_mt232.FHIST_C4.derecho_intel.cam-outfrq3s_eri
- pre-existing failure
ERI bug in CICE -- See: https://github.com/ESCOMP/CESM_CICE/issues/34

ERP_Ld3.ne16pg3_ne16pg3_mg17.FHISTC_WAt1ma.derecho_intel.cam-reduced_hist1d (Overall: DIFF) details:
ERR_Ln9.ne16pg3_ne16pg3_mt232.FHISTC_LTso.derecho_intel.cam-outfrq9s_bwic (Overall: DIFF) details:
ERS_Ln9.ne30pg3_ne30pg3_mg17.FHISTC_WXma.derecho_intel.cam-outfrq9s_ctem (Overall: DIFF) details:
SMS_C2_D_Ln9.ne16pg3_ne16pg3_mg17.FHISTC_WXma.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
SMS_D_Ln9.ne16_ne16_mg17.QPX2000.derecho_intel.cam-outfrq9s_amie (Overall: DIFF) details:
- Answer changes expected for all ne16 regression tests and WACCM-X

derecho/nvhpc/aux_cam: all BFB

izumi/nag/aux_cam:
SMS_D_Ln3.ne5pg3_ne5pg3_mg37.QPX2000.izumi_nag.cam-outfrq3s (Overall: DIFF) details:
- Answer changes expected for all ne16 regression tests and WACCM-X

izumi/gnu/aux_cam: all BFB
===============================================================
===============================================================

Tag name: cam6_4_153
Expand Down
142 changes: 0 additions & 142 deletions src/dynamics/se/dycore/quadrature_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ module quadrature_mod
public :: jacobi
public :: quad_norm

public :: trapezoid
private :: trapN
public :: simpsons
public :: gaussian_int

private :: gausslobatto_pts
Expand Down Expand Up @@ -782,145 +779,6 @@ function quad_norm(gquad,N) result(gamma)

end function quad_norm

! =======================
! TrapN:
! Numerical recipes
! =======================

subroutine trapN(f,a,b,N,it,s)
INTERFACE
FUNCTION f(x) RESULT(f_x) ! Function to be integrated
use shr_kind_mod, only: r8=>shr_kind_r8
real(kind=r8), INTENT(IN) :: x
real(kind=r8) :: f_x
END FUNCTION f
END INTERFACE

real(kind=r8),intent(in) :: a,b
integer, intent(in) :: N
integer, intent(inout) :: it
real(kind=r8), intent(inout) :: s

real(kind=r8) :: ssum
real(kind=r8) :: del
real(kind=r8) :: rtnm
real(kind=r8) :: x

integer :: j

if (N==1) then
s = 0.5_r8*(b-a)*(f(a) + f(b))
it =1
else
ssum = 0.0_r8
rtnm =1.0_r8/it
del = (b-a)*rtnm
x=a+0.5_r8*del
do j=1,it
ssum = ssum + f(x)
x=x+del
end do
s=0.5_r8*(s + del*ssum)
it=2*it
end if

end subroutine trapN

! ==========================================
! Trapezoid Rule for integrating functions
! from a to b with residual error eps
! ==========================================

function trapezoid(f,a,b,eps) result(Integral)

integer, parameter :: Nmax = 25 ! At most 2^Nmax + 1 points in integral

INTERFACE
FUNCTION f(x) RESULT(f_x) ! Function to be integrated
use shr_kind_mod, only: r8=>shr_kind_r8
real(kind=r8), INTENT(IN) :: x
real(kind=r8) :: f_x
END FUNCTION f
END INTERFACE

real(kind=r8), intent(in) :: a,b ! The integral bounds
real(kind=r8), intent(in) :: eps ! relative error bound for integral
real(kind=r8) :: Integral ! the integral result (within eps)
real(kind=r8) :: s ! Integral approximation
real(kind=r8) :: sold ! previous integral approx

integer :: N
integer :: it

! ==============================================================
! Calculate I here using trapezoid rule using f and a DO loop...
! ==============================================================

s = 1.0e30_r8
sold = 0.0_r8
N=1
it=0
do while(N<=Nmax .and. ABS(s-sold)>eps*ABS(sold))
sold=s
call trapN(f,a,b,N,it,s)
N=N+1
end do

Integral = s

end function trapezoid

! ==========================================
! Simpsons Rule for integrating functions
! from a to b with residual error eps
! ==========================================

function simpsons(f,a,b,eps) result(Integral)

integer, parameter :: Nmax = 25 ! At most 2^Nmax + 1 points in integral

INTERFACE
FUNCTION f(x) RESULT(f_x) ! Function to be integrated
use shr_kind_mod, only: r8=>shr_kind_r8
real(kind=r8), INTENT(IN) :: x
real(kind=r8) :: f_x
END FUNCTION f
END INTERFACE

real(kind=r8), intent(in) :: a,b ! The integral bounds
real(kind=r8), intent(in) :: eps ! relative error bound for integral
real(kind=r8) :: Integral ! the integral result (within eps)
real(kind=r8) :: s ! Integral approximation
real(kind=r8) :: os ! previous integral approx
real(kind=r8) :: st ! Integral approximation
real(kind=r8) :: ost ! previous integral approx

integer :: N
integer :: it

! ==============================================================
! Calculate I here using trapezoid rule using f and a DO loop...
! ==============================================================

ost= 0.0_r8
s = 1.0e30_r8
os = 0.0_r8

N=1
it=0
do while ((N<=Nmax .and. ABS(s-os)>eps*ABS(os) ) .or. N<=2)
os = s
call trapN(f,a,b,N,it,st)
s=(4.0_r8*st-ost)/3.0_r8
ost=st
N=N+1
end do

Integral = s

end function simpsons


! ==========================================
! gaussian_int:
!
Expand Down