Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8d3d071
add three ecmwf related files
BoYang-NOAA Apr 15, 2025
5e2d647
Merge remote-tracking branch 'ufs-community/ufs/dev' into ecmwf
BoYang-NOAA Apr 22, 2025
7124268
add a doc section in ecmwf_ngw_emc
BoYang-NOAA Apr 29, 2025
98fbceb
revert scientific documentation
BoYang-NOAA May 5, 2025
726586e
add copyright/Apache licence header
BoYang-NOAA May 5, 2025
9c4545f
3D-TKE EMDF GFS PBL scheme related changes from FIU (Ping Zhu, Ping.Z…
BinLiu-NOAA May 9, 2025
c3f9a68
bug fix to maxMF check: only access when do_mynnedmf=.true.
SamuelTrahanNOAA May 13, 2025
c0d1ab9
modifies href calcuation to href=max(Omax, 2*sigma, hpbl)
rhaesung May 22, 2025
fee5340
update drag_suite.F90 based on Mike Toy's comment
rhaesung May 27, 2025
dfa39f6
Add an option to use liquid potential temperature in temperature
BinLiu-NOAA Feb 4, 2025
35e92bc
Merge remote-tracking branch 'remotes/origin/ufs/dev' into feature/gf…
BinLiu-NOAA Jun 2, 2025
9f25905
Update sa3dtke variables standard names in SATMEDMF
Jun 3, 2025
ffb2069
Change indices i3 and j3 in routine aer_property in radiation_aerosol…
climbfuji Jun 4, 2025
ef97ca0
Merge remote-tracking branch 'upstream/ufs/dev' into ogwd
rhaesung Jun 4, 2025
a6c6bbd
Update nonlocal mixing and coding style for sa3dkte in ccpp physics
Jun 4, 2025
97b38cb
Merge remote-tracking branch 'remotes/upstream/ufs/dev' into feature/…
BinLiu-NOAA Jun 9, 2025
a0935cf
nrest=n+4 in mersenne_twister
NickSzapiro-NOAA Jun 10, 2025
0eb443b
Updates on SA3DTKE non-local transport
Jun 16, 2025
11a126b
Update nonlocal mass-flux transport for Shear production of TKE
Jun 17, 2025
ad5a241
Merge pull request #285 from RuiyuSun/gcycleupdate
grantfirl Jun 20, 2025
f8f1086
Merge remote-tracking branch 'upstream/ufs/dev' into ogwd
rhaesung Jun 20, 2025
2df5a7e
Merge remote-tracking branch 'upstream/ufs/dev' into feature/3dtke_gf…
BinLiu-NOAA Jun 21, 2025
51a2952
Merge remote-tracking branch 'origin/ufs/dev' into feature/gfspbl_lpt
BinLiu-NOAA Jun 21, 2025
92cd443
Merge remote-tracking branch 'remotes/origin/feature/gfspbl_lpt' into…
BinLiu-NOAA Jun 21, 2025
0182088
update CMakeLists.txt to use FMS for FV3 only
grantfirl Jun 23, 2025
8a5f4f5
Merge pull request #287 from rhaesung/ogwd
grantfirl Jun 24, 2025
423c290
Merge branch 'main' into combo_20250625
grantfirl Jun 25, 2025
845246c
Merge remote-tracking branch 'upstream/ufs/dev' into feature/3dtke_gf…
BinLiu-NOAA Jun 26, 2025
110761c
Merge branch 'ufs/dev' into combo_20250625
grantfirl Jun 26, 2025
e8133cc
Merge branch 'ecmwf' into combo_20250625
grantfirl Jun 27, 2025
d287d74
Merge branch 'bugfix/maxmf-check' into combo_20250625
grantfirl Jun 27, 2025
477b6a2
Merge branch 'bugfix/radiation_aerosols_restart_reproducibility_neptu…
grantfirl Jun 27, 2025
59b9bc1
Merge branch 'mersenne_nrest' into combo_20250625
grantfirl Jun 27, 2025
65a2547
Merge pull request #279 from hafs-community/feature/3dtke_gfspbl
rhaesung Jun 27, 2025
b20022b
tlim_okw instead of tlim_fgf in cires_ugwpv1_triggers.F90
NickSzapiro-NOAA Jun 30, 2025
21bce1e
Initialize intent(out) zlwb in cires_ugwpv1_oro.F90
NickSzapiro-NOAA Jun 30, 2025
1694611
Set jj if dlat > 0.0, dlon <= 0.0 in sfcsub.F
NickSzapiro-NOAA Jun 30, 2025
2a26a8c
Merge branch 'ufs/dev' into combo_20250625
grantfirl Jul 8, 2025
ef272c1
Merge remote-tracking branch 'nick-fork/warning_explicit_gwd' into co…
grantfirl Jul 8, 2025
57dd80c
Merge branch 'combo_20250625' of https://github.com/grantfirl/ccpp-ph…
dustinswales Jul 14, 2025
87610cf
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
dustinswales Jul 16, 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
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,12 @@ target_include_directories(ccpp_physics PUBLIC
target_link_libraries(ccpp_physics PRIVATE MPI::MPI_Fortran)
target_link_libraries(ccpp_physics PUBLIC w3emc::w3emc_d
sp::sp_d
NetCDF::NetCDF_Fortran)
NetCDF::NetCDF_Fortran
)
#add FMS for FV3 only
if(FV3)
target_link_libraries(ccpp_physics PUBLIC fms)
endif()

# Define where to install the library
install(TARGETS ccpp_physics
Expand Down
4 changes: 3 additions & 1 deletion physics/CONV/C3/cu_c3_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,9 @@ subroutine cu_c3_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
enddo
do i = its,itf
if(mconv(i).lt.0.)mconv(i)=0.
if((dx(i)<6500.).and.do_mynnedmf.and.(maxMF(i).gt.0.))ierr(i)=555
if(do_mynnedmf) then
if((dx(i)<6500.).and.(maxMF(i).gt.0.))ierr(i)=555
endif
enddo
!$acc end kernels
if (dx(its)<6500.) then
Expand Down
3 changes: 2 additions & 1 deletion physics/GWD/cires_ugwpv1_oro.F90
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ subroutine orogw_v1 (im, km, imx, me, master, dtp, kdt, do_tofd, &
dusfc(i) = 0.0
dvsfc(i) = 0.0
ipt(i) = 0
enddo
enddo
zlwb(:) = 0.0

! ---- for lm and gwd calculation points
!cires_ugwp_initialize.F90: real, parameter :: hpmax=2400.0, hpmin=25.0
Expand Down
2 changes: 1 addition & 1 deletion physics/GWD/cires_ugwpv1_triggers.F90
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ subroutine get_spectra_tau_okw(nw, im, levs, trig_okw, xlatd, sinlat, coslat, t
if (dmax >= tlim_okw) kex = kex+1
do k=klow+1, ktop
dtot = abs(trig_okw(i,k))
if (dtot >= tlim_fgf ) kex = kex+1
if (dtot >= tlim_okw ) kex = kex+1
if ( dtot > dmax) then
klev(i) = k
dmax = dtot
Expand Down
956 changes: 956 additions & 0 deletions physics/GWD/ecmwf_ngw.F90

Large diffs are not rendered by default.

30 changes: 23 additions & 7 deletions physics/GWD/ugwpv1_gsldrag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ module ugwpv1_gsldrag
use cires_ugwpv1_module, only: cires_ugwpv1_init, ngwflux_update, calendar_ugwp
use cires_ugwpv1_module, only: knob_ugwp_version, cires_ugwp_dealloc, tamp_mpa
use cires_ugwpv1_solv2, only: cires_ugwpv1_ngw_solv2
! use cires_ugwpv1_solv2, only: cires_ugwpv1_ngw_solv2, ecmwf_ngw
use ecmwf_ngw, only: ecmwf_ngw_emc

use cires_ugwpv1_oro, only: orogw_v1

use drag_suite, only: drag_suite_run, drag_suite_psl
Expand Down Expand Up @@ -70,7 +73,8 @@ subroutine ugwpv1_gsldrag_init ( &
con_pi, con_rerth, con_p0, &
con_g, con_omega, con_cp, con_rd, con_rv,con_fvirt, &
do_ugwp,do_ugwp_v0, do_ugwp_v0_orog_only, do_gsl_drag_ls_bl, &
do_gsl_drag_ss, do_gsl_drag_tofd, do_ugwp_v1, &
do_gsl_drag_ss, do_gsl_drag_tofd, do_ngw_ec, do_ugwp_v1, &
!! do_gsl_drag_ss, do_gsl_drag_tofd, do_ugwp_v1, &
do_ugwp_v1_orog_only, do_ugwp_v1_w_gsldrag, errmsg, errflg)

use ugwp_common
Expand All @@ -94,9 +98,10 @@ subroutine ugwpv1_gsldrag_init ( &
real(kind=kind_phys), intent (in) :: con_g, con_cp, con_rd, con_rv, con_omega, con_fvirt
logical, intent (in) :: do_ugwp

logical, intent (in) :: do_ugwp_v0, do_ugwp_v0_orog_only, &
do_gsl_drag_ls_bl, do_gsl_drag_ss, &
do_gsl_drag_tofd, do_ugwp_v1, &
logical, intent (in) :: do_ugwp_v0, do_ugwp_v0_orog_only, &
do_gsl_drag_ls_bl, do_gsl_drag_ss, &
!! do_gsl_drag_tofd, do_ugwp_v1, &
do_gsl_drag_tofd, do_ugwp_v1, do_ngw_ec, &
do_ugwp_v1_orog_only,do_ugwp_v1_w_gsldrag

character(len=*), intent (in) :: fn_nml2
Expand Down Expand Up @@ -302,7 +307,7 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp,
fhzero, kdt, ldiag3d, lssav, flag_for_gwd_generic_tend, do_gsl_drag_ls_bl, &
do_gsl_drag_ss, do_gsl_drag_tofd, &
do_gwd_opt_psl, psl_gwd_dx_factor, &
do_ugwp_v1, do_ugwp_v1_orog_only, &
do_ngw_ec, do_ugwp_v1, do_ugwp_v1_orog_only, &
do_ugwp_v1_w_gsldrag, gwd_opt, do_tofd, ldiag_ugwp, ugwp_seq_update, &
cdmbgwd, alpha_fd, jdat, nmtvr, hprime, oc, theta, sigma, gamma, &
elvmax, clx, oa4, varss,oc1ss,oa4ss,ol4ss, dx, xlat, xlat_d, sinlat, coslat, &
Expand Down Expand Up @@ -356,7 +361,7 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp,
! flags for choosing combination of GW drag schemes to run

logical, intent (in) :: do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd
logical, intent (in) :: do_ugwp_v1, do_ugwp_v1_orog_only, do_tofd
logical, intent (in) :: do_ugwp_v1, do_ngw_ec, do_ugwp_v1_orog_only, do_tofd
logical, intent (in) :: ldiag_ugwp, ugwp_seq_update
logical, intent (in) :: do_ugwp_v1_w_gsldrag ! combination of ORO and NGW schemes

Expand Down Expand Up @@ -698,10 +703,21 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp,
call ngwflux_update(me, master, im, levs, kdt, ddd_ugwp,curdate, &
tau_amf, xlat_d, sinlat,coslat, rain, tau_ngw)

call cires_ugwpv1_ngw_solv2(me, master, im, levs, kdt, dtp, &
if (do_ngw_ec) then

call ecmwf_ngw_emc(me, master, im, levs, kdt, dtp, dx, &
tau_ngw, tgrs, ugrs, vgrs, q1, prsl, prsi, &
zmet, zmeti,prslk, xlat_d, sinlat, coslat, &
dudt_ngw, dvdt_ngw, dtdt_ngw, kdis_ngw, zngw)
else

call cires_ugwpv1_ngw_solv2(me, master, im, levs, kdt, dtp, &
tau_ngw, tgrs, ugrs, vgrs, q1, prsl, prsi, &
zmet, zmeti,prslk, xlat_d, sinlat, coslat, &
dudt_ngw, dvdt_ngw, dtdt_ngw, kdis_ngw, zngw)

endif

!
! => con_g, con_cp, con_rd, con_rv, con_omega, con_pi, con_fvirt
!
Expand Down
16 changes: 15 additions & 1 deletion physics/GWD/ugwpv1_gsldrag.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = ugwpv1_gsldrag
type = scheme
dependencies = ../hooks/machine.F,drag_suite.F90
dependencies = cires_ugwpv1_module.F90,cires_ugwpv1_triggers.F90,cires_ugwpv1_initialize.F90,cires_ugwpv1_solv2.F90
dependencies = cires_ugwpv1_module.F90,cires_ugwpv1_triggers.F90,cires_ugwpv1_initialize.F90,cires_ugwpv1_solv2.F90,ecmwf_ngw.F90
dependencies = cires_ugwpv1_sporo.F90,cires_ugwpv1_oro.F90
########################################################################
[ccpp-arg-table]
Expand Down Expand Up @@ -218,6 +218,13 @@
dimensions = ()
type = logical
intent = in
[do_ngw_ec]
standard_name = flag_for_ngw_ec
long_name = flag to activate ecmwf ngwd
units = flag
dimensions = ()
type = logical
intent = in
[do_ugwp_v1]
standard_name = flag_for_ugwp_version_1
long_name = flag to activate ver 1 CIRES UGWP
Expand Down Expand Up @@ -417,6 +424,13 @@
type = real
kind = kind_phys
intent = in
[do_ngw_ec]
standard_name = flag_for_ngw_ec
long_name = flag to activate ecmwf ngwd
units = flag
dimensions = ()
type = logical
intent = in
[do_ugwp_v1]
standard_name = flag_for_ugwp_version_1
long_name = flag to activate ver 1 CIRES UGWP
Expand Down
7 changes: 5 additions & 2 deletions physics/Interstitials/UFS_SCM_NEPTUNE/sfcsub.F
Original file line number Diff line number Diff line change
Expand Up @@ -3093,8 +3093,11 @@ subroutine subst(data,imax,jmax,dlon,dlat,ijordr)
enddo
enddo
else
do i=1,imax
data(imax-i+1,jj) = work(i,j)
do j=1,jmax
jj = jmax - j + 1
do i=1,imax
data(imax-i+1,jj) = work(i,j)
enddo
enddo
endif
else
Expand Down
2 changes: 1 addition & 1 deletion physics/Radiation/mersenne_twister.f
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ module mersenne_twister
integer,parameter:: tmaskc=-272236544 !< tempering parameter
integer,parameter:: mag01(0:1)=(/0,mata/)
integer,parameter:: iseed=4357
integer,parameter:: nrest=n+6
integer,parameter:: nrest=n+4
! Defined types
type random_stat !< Generator state
private
Expand Down
4 changes: 2 additions & 2 deletions physics/Radiation/radiation_aerosols.f
Original file line number Diff line number Diff line change
Expand Up @@ -2901,7 +2901,7 @@ subroutine aer_property &
! --- map grid in longitude direction, lon from 0 to 355 deg resolution

! print *,' Seeking lon index for point i =',i
i3 = i1
i3 = 1
lab_do_IMXAE : do while ( i3 <= IMXAE )
tmp1 = dltg * (i3 - 1)
dtmp = alon(i) - tmp1
Expand Down Expand Up @@ -2942,7 +2942,7 @@ subroutine aer_property &
! --- map grid in latitude direction, lat from 90n to 90s in 5 deg resolution

! print *,' Seeking lat index for point i =',i
j3 = j1
j3 = 1
lab_do_JMXAE : do while ( j3 <= JMXAE )
tmp2 = 90.0 - dltg * (j3 - 1)
dtmp = tmp2 - alat(i)
Expand Down
Loading