Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d033868
Update physics/PBL/SATMEDMF/satmedmfvdifq.F so that the sa3dtke and
BinLiu-NOAA Jul 11, 2025
ff95d68
Initial commit for MPAS interstitials.
dustinswales Jul 15, 2025
8cd11b0
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Jul 16, 2025
9f54c41
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Jul 17, 2025
7a341b8
The following changes/improvements for PBL/SATMEDMF are from @JongilH…
BinLiu-NOAA Jul 19, 2025
b15920d
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Jul 21, 2025
b385926
From @JongilHan66: In satmedmfvdifq.F, update max elmh to from 500m t…
BinLiu-NOAA Jul 28, 2025
865a637
Merge remote-tracking branch 'remotes/origin/ufs/dev' into feature/3d…
BinLiu-NOAA Jul 28, 2025
e41d80e
Metadata changes
dustinswales Jul 29, 2025
d9a7796
Typo
dustinswales Jul 29, 2025
1dfc855
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Aug 18, 2025
7025d8d
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Aug 18, 2025
5282714
Merge remote-tracking branch 'remotes/upstream/ufs/dev' into feature/…
BinLiu-NOAA Aug 23, 2025
daf5859
Introduce tuning parameter for convective cloud liquid
lisa-bengtsson Aug 25, 2025
2c4dbd1
Merge pull request #301 from dustinswales/feature/mpas_nuopc_init
dustinswales Aug 29, 2025
203dd55
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
lisa-bengtsson Sep 3, 2025
78d819c
Update name in .meta files
lisa-bengtsson Sep 3, 2025
cb519be
Merge remote-tracking branch 'remotes/upstream/ufs/dev' into feature/…
BinLiu-NOAA Sep 4, 2025
c858549
fix CI script
lisa-bengtsson Sep 4, 2025
8ceb5b2
Merge pull request #303 from hafs-community/feature/3dtke_update
rhaesung Sep 8, 2025
fc47f60
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
lisa-bengtsson Sep 8, 2025
077f204
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Sep 8, 2025
a04a215
Merge pull request #308 from lisa-bengtsson/cloud_water
grantfirl Sep 10, 2025
e26dac1
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Sep 15, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/ci_fv3_ccpp_prebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:
run: |
cd /home/runner/work/ccpp-physics/ccpp-physics/fv3atm/ccpp/
mkdir -p /home/runner/work/ccpp-physics/ccpp-physics/fv3atm/bin/ccpp/physics/physics/
./framework/scripts/ccpp_prebuild.py --config config/ccpp_prebuild_config.py
./framework/scripts/ccpp_prebuild.py --config config/ccpp_prebuild_config_fv3.py
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ target_link_libraries(ccpp_physics PUBLIC w3emc::w3emc_d
NetCDF::NetCDF_Fortran
)
#add FMS for FV3 only
if(FV3)
if(FV3 OR MPAS)
target_link_libraries(ccpp_physics PUBLIC fms)
endif()

Expand Down
18 changes: 5 additions & 13 deletions physics/CONV/SAMF/samfdeepcnv.f
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
& islimsk,garea,dot,ncloud,hpbl,ud_mf,dd_mf,dt_mf,cnvw,cnvc, &
& QLCN, QICN, w_upi, cf_upi, CNV_MFD, &
& CNV_DQLDT,CLCN,CNV_FICE,CNV_NDROP,CNV_NICE,mp_phys,mp_phys_mg,&
& clam,c0s,c1,betal,betas,evef,pgcon,asolfac, &
& clam,c0s,c1,betal,betas,evef,pgcon,asolfac,cscale, &
& do_ca, ca_closure, ca_entr, ca_trigger, nthresh,ca_deep, &
& rainevap,sigmain,sigmaout,omegain,omegaout,betadcu,betamcu, &
& betascu,maxMF,do_mynnedmf,sigmab_coldstart,errmsg,errflg)
Expand All @@ -97,7 +97,7 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
integer, intent(in) :: islimsk(:)
real(kind=kind_phys), intent(in) :: cliq, cp, cvap, eps, epsm1, &
& fv, grav, hvap, rd, rv, t0c
real(kind=kind_phys), intent(in) :: delt
real(kind=kind_phys), intent(in) :: delt, cscale
real(kind=kind_phys), intent(in) :: psp(:), delp(:,:), &
& prslp(:,:), garea(:), hpbl(:), dot(:,:), phil(:,:)
real(kind=kind_phys), dimension(:), intent(in) :: fscav
Expand Down Expand Up @@ -219,7 +219,7 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
! parameters for prognostic sigma closure
real(kind=kind_phys) omega_u(im,km),zdqca(im,km),tmfq(im,km),
& omegac(im),zeta(im,km),dbyo1(im,km),sigmab(im),qadv(im,km),
& sigmaoutx(im),tentr(im,km)
& tentr(im,km)
real(kind=kind_phys) gravinv,invdelt,sigmind,sigminm,sigmins
parameter(sigmind=0.01,sigmins=0.03,sigminm=0.01)
logical flag_shallow, flag_mid
Expand Down Expand Up @@ -3467,24 +3467,16 @@ subroutine samfdeepcnv_run (im,km,first_time_step,restart, &
endif
enddo
c
!
if(progsigma)then
do i = 1, im
sigmaoutx(i)=max(sigmaout(i,1),0.0)
sigmaoutx(i)=min(sigmaoutx(i),1.0)
enddo
endif
c
!> - Calculate convective cloud water.
do k = 1, km
do i = 1, im
if (cnvflg(i) .and. rn(i) > 0.) then
if (k >= kbcon(i) .and. k < ktcon(i)) then
cnvw(i,k) = cnvwt(i,k) * xmb(i) * dt2
if(progsigma)then
cnvw(i,k) = cnvw(i,k) * sigmaoutx(i)
cnvw(i,k) = cnvw(i,k) * cscale
else
cnvw(i,k) = cnvw(i,k) * sigmagfm(i)
cnvw(i,k) = cnvw(i,k) * cscale
endif
endif
endif
Expand Down
8 changes: 8 additions & 0 deletions physics/CONV/SAMF/samfdeepcnv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@
type = real
kind = kind_phys
intent = in
[cscale]
standard_name = multiplicative_tuning_parameter_for_convective_cloud_water
long_name = multiplicative tuning parameter for convective cloud_water
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[delt]
standard_name = timestep_for_physics
long_name = physics time step
Expand Down
17 changes: 5 additions & 12 deletions physics/CONV/SAMF/samfshalcnv.f
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, &
& t0c,delt,ntk,ntr,delp,first_time_step,restart, &
& tmf,qmicro,progsigma,progomega, &
& prslp,psp,phil,tkeh,qtr,prevsq,q,q1,t1,u1,v1,fscav, &
& rn,kbot,ktop,kcnv,islimsk,garea, &
& rn,kbot,ktop,kcnv,islimsk,garea,cscale, &
& dot,ncloud,hpbl,ud_mf,dt_mf,cnvw,cnvc, &
& clam,c0s,c1,evef,pgcon,asolfac,hwrf_samfshal, &
& sigmain,sigmaout,omegain,omegaout,betadcu,betamcu,betascu, &
Expand All @@ -71,7 +71,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, &
real(kind=kind_phys), intent(in) :: cliq, cp, cvap, &
& eps, epsm1, fv, grav, hvap, rd, rv, t0c, betascu, betadcu, &
& betamcu
real(kind=kind_phys), intent(in) :: delt
real(kind=kind_phys), intent(in) :: delt, cscale
real(kind=kind_phys), intent(in) :: psp(:), delp(:,:), &
& prslp(:,:), garea(:), hpbl(:), dot(:,:), phil(:,:), &
& tmf(:,:,:), q(:,:)
Expand Down Expand Up @@ -167,7 +167,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, &
! parameters for prognostic sigma closure
real(kind=kind_phys) omega_u(im,km),zdqca(im,km),tmfq(im,km),
& omegac(im),zeta(im,km),dbyo1(im,km),
& sigmab(im),qadv(im,km),sigmaoutx(im)
& sigmab(im),qadv(im,km)
real(kind=kind_phys) gravinv,dxcrtas,invdelt,sigmind,sigmins,
& sigminm
logical flag_shallow,flag_mid
Expand Down Expand Up @@ -2441,23 +2441,16 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, &
endif
enddo
c
if(progsigma)then
do i = 1, im
sigmaoutx(i)=max(sigmaout(i,1),0.0)
sigmaoutx(i)=min(sigmaoutx(i),1.0)
enddo
endif

c convective cloud water
do k = 1, km
do i = 1, im
if (cnvflg(i)) then
if (k >= kbcon(i) .and. k < ktcon(i)) then
cnvw(i,k) = cnvwt(i,k) * xmb(i) * dt2
if (progsigma) then
cnvw(i,k) = cnvw(i,k) * sigmaoutx(i)
cnvw(i,k) = cnvw(i,k) * cscale
else
cnvw(i,k) = cnvw(i,k) * sigmagfm(i)
cnvw(i,k) = cnvw(i,k) * cscale
endif
endif
endif
Expand Down
8 changes: 8 additions & 0 deletions physics/CONV/SAMF/samfshalcnv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@
type = real
kind = kind_phys
intent = in
[cscale]
standard_name = multiplicative_tuning_parameter_for_convective_cloud_water
long_name = multiplicative tuning parameter for convective cloud water
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[delt]
standard_name = timestep_for_physics
long_name = physics time step
Expand Down
72 changes: 72 additions & 0 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.mpas.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
!>\file GFS_rad_time_vary.mpas.F90
!! Contains code related to GFS radiation suite setup (radiation part of time_vary_step)
module GFS_rad_time_vary
implicit none

private

public GFS_rad_time_vary_timestep_init

contains

!> This module contains code related to GFS radiation setup.

!> \section arg_table_GFS_rad_time_vary_timestep_init Argument Table
!! \htmlinclude GFS_rad_time_vary_timestep_init.html
!!
subroutine GFS_rad_time_vary_timestep_init (lrseeds, rseeds, lslwr, lsswr, isubc_lw, &
isubc_sw, icsdsw, icsdlw, sec, kdt, ipsd0, ipsdlim, errmsg, errflg)
use mersenne_twister, only: random_setseed, random_index, random_stat
use machine, only: kind_phys
use radcons, only: con_100
implicit none

! Interface variables
logical, intent(in) :: lrseeds
integer, intent(in), optional :: rseeds(:,:)
integer, intent(in) :: isubc_lw, isubc_sw, kdt
integer, intent(in) :: ipsd0, ipsdlim
logical, intent(in) :: lslwr, lsswr
integer, intent(inout), optional :: icsdsw(:), icsdlw(:)
real(kind_phys), intent(in) :: sec
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg

! Local variables
type (random_stat) :: stat
integer :: ix, j, i, ipseed, ixx
integer, allocatable, dimension(:) :: numrdm

! Initialize CCPP error handling variables
errmsg = ''
errflg = 0

if (lsswr .or. lslwr) then
!--- set up random seed index in a reproducible way for entire cubed-sphere face (lat-lon grid)
if ((isubc_lw==2) .or. (isubc_sw==2)) then
!NRL If random seeds supplied by NEPTUNE
if(lrseeds) then
do ix=1,size(icsdsw)
icsdsw(ix) = rseeds(ix,1)
icsdlw(ix) = rseeds(ix,2)
enddo
else
allocate(numrdm(size(icsdlw)*2))
ipseed = mod(nint(con_100*sqrt(sec)), ipsdlim) + 1 + ipsd0
call random_setseed (ipseed, stat)
call random_index (ipsdlim, numrdm, stat)

ixx = 1
do ix=1,size(icsdsw)*2,2
icsdsw(ixx) = numrdm(ix)
icsdlw(ixx) = numrdm(ix+1)
ixx = ixx + 1
enddo
deallocate(numrdm)
end if ! lrseeds
endif ! isubc_lw and isubc_sw
endif ! lsswr or lslwr

end subroutine GFS_rad_time_vary_timestep_init

end module GFS_rad_time_vary
114 changes: 114 additions & 0 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.mpas.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
[ccpp-table-properties]
name = GFS_rad_time_vary
type = scheme
relative_path = ../../
dependencies = hooks/machine.F,Radiation/mersenne_twister.f,Radiation/RRTMG/radcons.f90

########################################################################
[ccpp-arg-table]
name = GFS_rad_time_vary_timestep_init
type = scheme
[lrseeds]
standard_name = do_host_provided_random_seeds
long_name = flag to use host-provided random seeds
units = flag
dimensions = ()
type = logical
intent = in
[rseeds]
standard_name = random_number_seeds_from_host
long_name = random number seeds from host
units = none
dimensions = (horizontal_dimension, number_of_host_provided_random_number_streams)
type = integer
intent = in
optional = True
[lslwr]
standard_name = flag_for_calling_longwave_radiation
long_name = logical flags for lw radiation calls
units = flag
dimensions = ()
type = logical
intent = in
[lsswr]
standard_name = flag_for_calling_shortwave_radiation
long_name = logical flags for sw radiation calls
units = flag
dimensions = ()
type = logical
intent = in
[isubc_lw]
standard_name = flag_for_lw_clouds_sub_grid_approximation
long_name = flag for lw clouds sub-grid approximation
units = flag
dimensions = ()
type = integer
intent = in
[isubc_sw]
standard_name = flag_for_sw_clouds_grid_approximation
long_name = flag for sw clouds sub-grid approximation
units = flag
dimensions = ()
type = integer
intent = in
[icsdsw]
standard_name = random_number_seed_for_mcica_shortwave
long_name = random seeds for sub-column cloud generators sw
units = none
dimensions = (horizontal_dimension)
type = integer
intent = inout
optional = True
[icsdlw]
standard_name = random_number_seed_for_mcica_longwave
long_name = random seeds for sub-column cloud generators lw
units = none
dimensions = (horizontal_dimension)
type = integer
intent = inout
optional = True
[sec]
standard_name = forecast_time_in_seconds
long_name = seconds elapsed since model initialization
units = s
dimensions = ()
type = real
kind = kind_phys
intent = in
[kdt]
standard_name = index_of_timestep
long_name = current forecast iteration
units = index
dimensions = ()
type = integer
intent = in
[ipsd0]
standard_name = initial_seed_for_mcica
long_name = initial permutaion seed for mcica radiation
units = 1
dimensions = ()
type = integer
intent = in
[ipsdlim]
standard_name = limit_for_initial_seed_for_mcica
long_name = limit for initial permutaion seed for mcica radiation
units = 1
dimensions = ()
type = integer
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
units = none
dimensions = ()
type = character
kind = len=*
intent = out
[errflg]
standard_name = ccpp_error_code
long_name = error code for error handling in CCPP
units = 1
dimensions = ()
type = integer
intent = out

Loading