Skip to content

Commit 1468bb3

Browse files
committed
Merge branch 'nf_albd' into NCAR_sync_20251112
2 parents a78d06b + 3c07619 commit 1468bb3

30 files changed

+296
-416
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Explicitly state what tests were run on these changes, or if any are still pendi
88
## Dependencies:
99
Add any links to parent PRs (e.g. SCM and/or UFS PRs) or submodules (e.g. rte-rrtmgp). For example:
1010
- NCAR/ccpp-framework#<pr_number>
11-
- NOAA-EMC/fv3atm#<pr_number>
11+
- NOAA-EMC/ufsatm#<pr_number>
1212
- ufs-community/ufs-weather-model/#<pr_number>
1313

1414
## Documentation:

CMakeLists.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ get_filename_component(LOCAL_CURRENT_SOURCE_DIR ${FULL_PATH_TO_CMAKELISTS} DIREC
8181

8282
#------------------------------------------------------------------------------
8383

84-
# List of files that need to be compiled without OpenMP
85-
set(SCHEMES_OPENMP_OFF ${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_optics.F90
84+
# List of files that should be compiled with RTE-RRTMGP compilation flags
85+
set(SCHEMES_RTERRTMGP ${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_optics.F90
8686
${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_optics_constants.F90
8787
${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_concentrations.F90
8888
${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_optics_util_string.F90
@@ -109,6 +109,9 @@ set(SCHEMES_OPENMP_OFF ${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-
109109
${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/rte-frontend/mo_rte_kind.F90
110110
${LOCAL_CURRENT_SOURCE_DIR}/physics/Radiation/RRTMGP/rte-rrtmgp/rte-frontend/mo_optical_props.F90)
111111

112+
# List of files that need to be compiled without OpenMP (currently a copy of SCHEMES_RTERRTMGP)
113+
set(SCHEMES_OPENMP_OFF ${SCHEMES_RTERRTMGP})
114+
112115
# List of files that need to be compiled with different precision
113116
set(SCHEMES_DYNAMICS)
114117

@@ -124,11 +127,19 @@ if(SCHEMES_DYNAMICS)
124127
list(REMOVE_ITEM SCHEMES ${SCHEMES_DYNAMICS})
125128
endif()
126129

130+
# Remove files that need to be compiled with different flags for RTE-RRTMGP from list
131+
# of files with standard compiler flags, and assign special flags
132+
if(SCHEMES_RTERRTMGP)
133+
SET_PROPERTY(SOURCE ${SCHEMES_RTERRTMGP}
134+
APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_RTERRTMGP}")
135+
list(REMOVE_ITEM SCHEMES ${SCHEMES_RTERRTMGP})
136+
endif()
137+
127138
# Remove files that need to be compiled without OpenMP from list
128139
# of files with standard compiler flags, and assign no-OpenMP flags
129140
if(SCHEMES_OPENMP_OFF)
130141
SET_PROPERTY(SOURCE ${SCHEMES_OPENMP_OFF}
131-
APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_RTERRTMGP}")
142+
APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_OPENMP_OFF}")
132143
list(REMOVE_ITEM SCHEMES ${SCHEMES_OPENMP_OFF})
133144
endif()
134145

@@ -184,7 +195,7 @@ endif()
184195

185196
set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR})
186197

187-
add_library(ccpp_physics STATIC ${SCHEMES} ${SCHEMES_OPENMP_OFF} ${SCHEMES_DYNAMICS} ${CAPS})
198+
add_library(ccpp_physics STATIC ${SCHEMES} ${SCHEMES_RTERRTMGP} ${SCHEMES_OPENMP_OFF} ${SCHEMES_DYNAMICS} ${CAPS})
188199

189200
set_target_properties(ccpp_physics PROPERTIES VERSION ${PROJECT_VERSION}
190201
SOVERSION ${PROJECT_VERSION_MAJOR})

physics/CONV/Grell_Freitas/cu_gf_deep.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3960,7 +3960,7 @@ subroutine neg_check(name,j,dt,q,outq,outt,outu,outv, &
39603960
,intent (in ) :: &
39613961
dt
39623962
real(kind=kind_phys) :: names,scalef,thresh,qmem,qmemf,qmem2,qtest,qmem1
3963-
integer :: icheck
3963+
integer :: i,k,icheck
39643964
!
39653965
! first do check on vertical heating rate
39663966
!

physics/CONV/SAMF/samfdeepcnv.f

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,9 +1673,9 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
16731673
if(totflg) return
16741674
!!
16751675
c
1676-
c estimate the onvective overshooting as the level
1676+
c Estimate the convective overshooting as the level
16771677
c where the [aafac * cloud work function] becomes zero,
1678-
c which is the final cloud top
1678+
c which is the final cloud top.
16791679
c
16801680
!> - Continue calculating the cloud work function past the point of neutral buoyancy to represent overshooting according to Han and Pan (2011) \cite han_and_pan_2011 . Convective overshooting stops when \f$ cA_u < 0\f$ where \f$c\f$ is currently 10%, or when 10% of the updraft cloud work function has been consumed by the stable buoyancy force.
16811681
do i = 1, im

physics/CONV/SAS/sascnvn.F

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -974,9 +974,9 @@ subroutine sascnvn_run(
974974
if(totflg) return
975975
!!
976976
!
977-
! estimate the onvective overshooting as the level
977+
! Estimate the convective overshooting as the level
978978
! where the [aafac * cloud work function] becomes zero,
979-
! which is the final cloud top
979+
! which is the final cloud top.
980980
!
981981
!> - Continue calculating the cloud work function past the point of neutral buoyancy to represent overshooting according to Han and Pan (2011) \cite han_and_pan_2011 . Convective overshooting stops when \f$ cA_u < 0\f$ where \f$c\f$ is currently 10%, or when 10% of the updraft cloud work function has been consumed by the stable buoyancy force.
982982
do i = 1, im
@@ -1001,7 +1001,7 @@ subroutine sascnvn_run(
10011001
& dz1 * (g / (cp * to(i,k)))
10021002
& * dbyo(i,k) / (1. + gamma)
10031003
& * rfact
1004-
!NRL MNM: Limit overshooting not to be deeper than the actual cloud
1004+
!NRL MNM: Limit overshooting not to be deeper than half the actual cloud
10051005
tem = 0.5 * (zi(i,ktcon(i))-zi(i,kbcon(i)))
10061006
tem1 = zi(i,k)-zi(i,ktcon(i))
10071007
if(aa2(i) < 0. .or. tem1 >= tem) then

physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
398398
Grid, Tbd, Cldprop, Radtend, Diag, Interstitial, &
399399
nthreads, blkno, errmsg, errflg)
400400

401-
#ifdef MPI
402401
use mpi_f08
403-
#endif
404402
#ifdef _OPENMP
405403
use omp_lib
406404
#endif
@@ -433,13 +431,8 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
433431
errmsg = ''
434432
errflg = 0
435433

436-
#ifdef MPI
437434
mpirank = Model%me
438435
mpisize = Model%ntasks
439-
#else
440-
mpirank = 0
441-
mpisize = 1
442-
#endif
443436
#ifdef _OPENMP
444437
omprank = OMP_GET_THREAD_NUM()
445438
ompsize = nthreads
@@ -451,9 +444,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
451444
#ifdef _OPENMP
452445
!$OMP BARRIER
453446
#endif
454-
#ifdef MPI
455447
! call MPI_BARRIER(Model%communicator,ierr)
456-
#endif
457448

458449
do impi=0,mpisize-1
459450
do iomp=0,ompsize-1
@@ -950,17 +941,13 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
950941
!$OMP BARRIER
951942
#endif
952943
end do
953-
#ifdef MPI
954944
! call MPI_BARRIER(Model%communicator,ierr)
955-
#endif
956945
end do
957946

958947
#ifdef _OPENMP
959948
!$OMP BARRIER
960949
#endif
961-
#ifdef MPI
962950
! call MPI_BARRIER(Model%communicator,ierr)
963-
#endif
964951

965952
end subroutine GFS_diagtoscreen_run
966953

@@ -997,9 +984,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup
997984
Grid, Tbd, Cldprop, Radtend, Diag, Interstitial, &
998985
nthreads, blkno, errmsg, errflg)
999986

1000-
#ifdef MPI
1001987
use mpi_f08
1002-
#endif
1003988
#ifdef _OPENMP
1004989
use omp_lib
1005990
#endif
@@ -1032,13 +1017,8 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup
10321017
errmsg = ''
10331018
errflg = 0
10341019

1035-
#ifdef MPI
10361020
mpirank = Model%me
10371021
call MPI_COMM_SIZE(Model%communicator, mpisize, ierr)
1038-
#else
1039-
mpirank = 0
1040-
mpisize = 1
1041-
#endif
10421022
#ifdef _OPENMP
10431023
omprank = OMP_GET_THREAD_NUM()
10441024
ompsize = nthreads
@@ -1050,9 +1030,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup
10501030
#ifdef _OPENMP
10511031
!$OMP BARRIER
10521032
#endif
1053-
#ifdef MPI
10541033
! call MPI_BARRIER(Model%communicator,ierr)
1055-
#endif
10561034

10571035
do impi=0,mpisize-1
10581036
do iomp=0,ompsize-1
@@ -1388,17 +1366,13 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup
13881366
!$OMP BARRIER
13891367
#endif
13901368
end do
1391-
#ifdef MPI
13921369
! call MPI_BARRIER(Model%communicator,ierr)
1393-
#endif
13941370
end do
13951371

13961372
#ifdef _OPENMP
13971373
!$OMP BARRIER
13981374
#endif
1399-
#ifdef MPI
14001375
! call MPI_BARRIER(Model%communicator,ierr)
1401-
#endif
14021376

14031377
end subroutine GFS_interstitialtoscreen_run
14041378

0 commit comments

Comments
 (0)