Skip to content

Commit 633e9ed

Browse files
committed
Merge branch 'ufs/dev' into feature/gfdlmpv3
2 parents 214f46a + c86be50 commit 633e9ed

35 files changed

Lines changed: 1307 additions & 323 deletions

.github/PULL_REQUEST_TEMPLATE/pull_request_template.md renamed to .github/pull_request_template.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
## Description of Changes:
1+
## Description of Changes:
22
One or more paragraphs describing the problem, solution, and required changes.
33

4-
## Tests Conducted:
5-
Explicitly state what tests were run on these changes, or if any are still pending (for README or other text-only changes, just put "None required". Make note of the compilers used, the platform/machine, and other relevant details as necessary. For more complicated changes, or those resulting in scientific changes, please be explicit!
6-
**OR** Add any links to tests conducted. For example, "See ufs-community/ufs-weather-model/pull/<pr_number>"
4+
## Tests Conducted:
5+
Explicitly state what tests were run on these changes, or if any are still pending (for README or other text-only changes, just put "None required". Make note of the compilers used, the platform/machine, and other relevant details as necessary. For more complicated changes, or those resulting in scientific changes, please be explicit!
6+
**OR** Add any links to tests conducted. For example, "See ufs-community/ufs-weather-model#<pr_number>"
77

88
## Dependencies:
99
Add any links to parent PRs (e.g. SCM and/or UFS PRs) or submodules (e.g. rte-rrtmgp). For example:
10-
- NCAR/ccpp-framework/pull/<pr_number>
11-
- NOAA-EMC/fv3atm/pull/<pr_number>
12-
- ufs-community/ufs-weather-model/pull/<pr_number>
10+
- NCAR/ccpp-framework#<pr_number>
11+
- NOAA-EMC/fv3atm#<pr_number>
12+
- ufs-community/ufs-weather-model/#<pr_number>
1313

1414
## Documentation:
1515
Does this PR add new capabilities that need to be documented or require modifications to the existing documentation? If so, brief supporting material can be provided here. Contact the CODEOWNERS if your PR requires extensive updates to the documentation. See https://github.com/NCAR/ccpp-doc for Technical Documentation or https://dtcenter.org/community-code/common-community-physics-package-ccpp/documentation for the latest Scientific Documentation.
1616

17-
## Issue (optional):
18-
If this PR is resolving or referencing one or more issues, in this repository or elewhere, list them here. For example, "Fixes issue mentioned in #123" or "Related to bug in https://github.com/NCAR/other_repository/pull/63"
17+
## Issue (optional):
18+
If this PR is resolving or referencing one or more issues, in this repository or elewhere, list them here. For example, "Fixes issue mentioned in #123" or "Related to bug in NCAR/other_repository#123"
1919

20-
## Contributors (optional):
20+
## Contributors (optional):
2121
If others have contributed to this work aside from the PR author, list them here
22-

.github/workflows/basic_checks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7+
if: github.repository == 'NCAR/ccpp-physics' || github.repository == 'ufs-community/ccpp-physics'
78

89
runs-on: macos-latest
910

.github/workflows/ci_fv3_ccpp_prebuild.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on: [push, pull_request]
44

55
jobs:
66
ccpp-prebuild-FV3:
7+
if: github.repository == 'NCAR/ccpp-physics' || github.repository == 'ufs-community/ccpp-physics'
78

89
# The type of runner that the job will run on
9-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1011

1112
steps:
1213
- name: Checkout current ccpp-physics code
@@ -38,11 +39,11 @@ jobs:
3839
git remote add remote_local $GIT_REMOTE_URL
3940
git fetch remote_local $GIT_REMOTE_BRANCH
4041
git checkout remote_local/$GIT_REMOTE_BRANCH
41-
42-
- name: Set up Python 3.8.5
42+
43+
- name: Set up Python 3.10.13
4344
uses: actions/setup-python@v3
4445
with:
45-
python-version: 3.8.5
46+
python-version: 3.10.13
4647

4748
- name: Add conda to system path
4849
run: |
@@ -53,4 +54,4 @@ jobs:
5354
run: |
5455
cd /home/runner/work/ccpp-physics/ccpp-physics/fv3atm/ccpp/
5556
mkdir -p /home/runner/work/ccpp-physics/ccpp-physics/fv3atm/bin/ccpp/physics/physics/
56-
./framework/scripts/ccpp_prebuild.py --config config/ccpp_prebuild_config.py
57+
./framework/scripts/ccpp_prebuild.py --config config/ccpp_prebuild_config.py

.github/workflows/ci_scm_ccpp_prebuild.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on: [push, pull_request]
44

55
jobs:
66
ccpp-prebuild-SCM:
7+
if: github.repository == 'NCAR/ccpp-physics' || github.repository == 'ufs-community/ccpp-physics'
78

89
# The type of runner that the job will run on
9-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1011

1112
steps:
1213

@@ -42,11 +43,11 @@ jobs:
4243
git remote add remote_local $GIT_REMOTE_URL
4344
git fetch remote_local $GIT_REMOTE_BRANCH
4445
git checkout remote_local/$GIT_REMOTE_BRANCH
45-
46-
- name: Set up Python 3.8.5
46+
47+
- name: Set up Python 3.10.13
4748
uses: actions/setup-python@v3
4849
with:
49-
python-version: 3.8.5
50+
python-version: 3.10.13
5051

5152
- name: Add conda to system path
5253
run: |
@@ -58,4 +59,4 @@ jobs:
5859
cd /home/runner/work/ccpp-physics/ccpp-physics/ccpp-scm/
5960
git status
6061
mkdir -p /home/runner/work/ccpp-physics/ccpp-physics/ccpp-scm/scm/bin/ccpp/physics/physics/
61-
./ccpp/framework/scripts/ccpp_prebuild.py --config ccpp/config/ccpp_prebuild_config.py
62+
./ccpp/framework/scripts/ccpp_prebuild.py --config ccpp/config/ccpp_prebuild_config.py

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,12 @@ target_include_directories(ccpp_physics PUBLIC
196196
target_link_libraries(ccpp_physics PRIVATE MPI::MPI_Fortran)
197197
target_link_libraries(ccpp_physics PUBLIC w3emc::w3emc_d
198198
sp::sp_d
199-
NetCDF::NetCDF_Fortran)
199+
NetCDF::NetCDF_Fortran
200+
)
201+
#add FMS for FV3 only
202+
if(FV3)
203+
target_link_libraries(ccpp_physics PUBLIC fms)
204+
endif()
200205

201206
# Define where to install the library
202207
install(TARGETS ccpp_physics

CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ physics/GWD/ugwpv1_gsldrag_post.* @md
3636
physics/GWD/unified_ugwp* @mdtoyNOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales
3737
physics/MP/Ferrier_Aligo/module_MP_FER_HIRES.* @ericaligo-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales
3838
physics/MP/Ferrier_Aligo/mp_fer_hires.* @ericaligo-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales
39-
physics/MP/GFDL/GFDL_parse_tracers.F90 @grantfirl @rhaesung @Qingfu-Liu @dustinswales
4039
physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.* @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales
4140
physics/MP/GFDL/v1_2019/gfdl_cloud_microphys_mod.* @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales
4241
physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.* @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales

physics/CONV/C3/cu_c3_driver.F90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,9 @@ subroutine cu_c3_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
657657
enddo
658658
do i = its,itf
659659
if(mconv(i).lt.0.)mconv(i)=0.
660-
if((dx(i)<6500.).and.do_mynnedmf.and.(maxMF(i).gt.0.))ierr(i)=555
660+
if(do_mynnedmf) then
661+
if((dx(i)<6500.).and.(maxMF(i).gt.0.))ierr(i)=555
662+
endif
661663
enddo
662664
!$acc end kernels
663665
if (dx(its)<6500.) then

physics/CONV/Grell_Freitas/cu_gf_deep.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5496,7 +5496,7 @@ subroutine get_partition_liq_ice(ierr,tn,po_cup, p_liq_ice,melting_layer
54965496
,itf,ktf,its,ite, kts,kte, cumulus )
54975497
implicit none
54985498
character *(*), intent (in) :: cumulus
5499-
integer ,intent (in ) :: itf,ktf, its,ite, kts,kte
5499+
integer ,intent (in ) :: itf,ktf, its,ite, kts,kte
55005500
real(kind=kind_phys), intent (in ), dimension(its:ite,kts:kte) :: tn,po_cup
55015501
real(kind=kind_phys), intent (inout), dimension(its:ite,kts:kte) :: p_liq_ice,melting_layer
55025502
!$acc declare copyin(tn,po_cup) copy(p_liq_ice,melting_layer)

physics/GWD/cires_tauamf_data.F90

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ subroutine read_tau_amf(me, master, errmsg, errflg)
3636
if(iernc.ne.0) then
3737
write(errmsg,'(*(a))') "read_tau_amf: cannot open file_limb_tab data-file ", &
3838
trim(ugwp_taufile)
39-
print *, 'cannot open ugwp-v1 tau-file=',trim(ugwp_taufile)
39+
print *, 'cannot open ugwp-v1 tau-file=',trim(ugwp_taufile)
4040
errflg = 1
4141
return
4242
else
@@ -51,26 +51,26 @@ subroutine read_tau_amf(me, master, errmsg, errflg)
5151
status = nf90_inquire_dimension(ncid, DimID, len =ntau_d2t )
5252

5353
if (me == master) print *, ntau_d1y, ntau_d2t, ' dimd of tau_ngw ugwp-v1 '
54-
if (ntau_d2t .le. 0 .or. ntau_d1y .le. 0) then
55-
print *, 'ugwp-v1 tau-file=', trim(ugwp_taufile)
56-
print *, ' ugwp-v1: ', 'ntau_d2t=',ntau_d2t, 'ntau_d2t=',ntau_d1y
57-
stop
58-
endif
54+
if (ntau_d2t .le. 0 .or. ntau_d1y .le. 0) then
55+
print *, 'ugwp-v1 tau-file=', trim(ugwp_taufile)
56+
print *, ' ugwp-v1: ', 'ntau_d2t=',ntau_d2t, 'ntau_d2t=',ntau_d1y
57+
stop
58+
endif
5959

6060
if (.not.allocated(ugwp_taulat)) allocate (ugwp_taulat(ntau_d1y ))
6161
if (.not.allocated(days_limb)) allocate (days_limb(ntau_d2t))
62-
if (.not.allocated(tau_limb)) allocate (tau_limb(ntau_d1y, ntau_d2t ))
62+
if (.not.allocated(tau_limb)) allocate (tau_limb(ntau_d1y, ntau_d2t ))
6363

64-
iernc=nf90_inq_varid( ncid, 'DAYS', vid )
64+
iernc=nf90_inq_varid( ncid, 'DAYS', vid )
6565
iernc= nf90_get_var( ncid, vid, days_limb)
66-
iernc=nf90_inq_varid( ncid, 'LATS', vid )
66+
iernc=nf90_inq_varid( ncid, 'LATS', vid )
6767
iernc= nf90_get_var( ncid, vid, ugwp_taulat)
68-
iernc=nf90_inq_varid( ncid, 'ABSMF', vid )
68+
iernc=nf90_inq_varid( ncid, 'ABSMF', vid )
6969
iernc= nf90_get_var( ncid, vid, tau_limb)
7070

71-
iernc=nf90_close(ncid)
71+
iernc=nf90_close(ncid)
7272

73-
endif
73+
endif
7474

7575
end subroutine read_tau_amf
7676

@@ -102,22 +102,22 @@ subroutine cires_indx_ugwp (npts, me, master, dlat,j1_tau,j2_tau, w1_j1tau, w2_j
102102

103103

104104
j2_tau(j) = min(j2_tau(j),ntau_d1y)
105-
j1_tau(j) = max(j2_tau(j)-1,1)
105+
j1_tau(j) = max(j2_tau(j)-1,1)
106106

107107
if (j1_tau(j) /= j2_tau(j) ) then
108108
w2_j2tau(j) = (dlat(j) - ugwp_taulat(j1_tau(j))) &
109-
/ (ugwp_taulat(j2_tau(j))-ugwp_taulat(j1_tau(j)))
109+
/ (ugwp_taulat(j2_tau(j))-ugwp_taulat(j1_tau(j)))
110110
else
111111
w2_j2tau(j) = 1.0
112112
endif
113-
w1_j1tau(j) = 1.0 - w2_j2tau(j)
113+
w1_j1tau(j) = 1.0 - w2_j2tau(j)
114114
enddo
115115
return
116116
end subroutine cires_indx_ugwp
117117

118118
!>
119119
subroutine tau_amf_interp(me, master, im, idate, fhour, j1_tau,j2_tau, ddy_j1, ddy_j2, tau_ddd)
120-
use machine, only: kind_phys
120+
use machine, only: kind_phys
121121
implicit none
122122

123123
!input
@@ -141,38 +141,38 @@ subroutine tau_amf_interp(me, master, im, idate, fhour, j1_tau,j2_tau, ddy_j1, d
141141

142142
it1 = 2
143143
do iday=1, ntau_d2t
144-
if (fddd .lt. days_limb(iday) ) then
145-
it2 = iday
146-
exit
147-
endif
148-
enddo
144+
if (fddd .lt. days_limb(iday) ) then
145+
it2 = iday
146+
exit
147+
endif
148+
enddo
149149

150-
it2 = min(it2,ntau_d2t)
151-
it1 = max(it2-1,1)
152-
if (it2 > ntau_d2t ) then
153-
print *, ' Error in time-interpolation for tau_amf_interp '
154-
print *, ' it1, it2, ntau_d2t ', it1, it2, ntau_d2t
155-
print *, ' Error in time-interpolation see cires_tauamf_data.F90 '
156-
stop
157-
endif
150+
it2 = min(it2,ntau_d2t)
151+
it1 = max(it2-1,1)
152+
if (it2 > ntau_d2t ) then
153+
print *, ' Error in time-interpolation for tau_amf_interp '
154+
print *, ' it1, it2, ntau_d2t ', it1, it2, ntau_d2t
155+
print *, ' Error in time-interpolation see cires_tauamf_data.F90 '
156+
stop
157+
endif
158158

159-
w2 = (fddd-days_limb(it1))/(days_limb(it2)-days_limb(it1))
160-
w1 = 1.0-w2
159+
w2 = (fddd-days_limb(it1))/(days_limb(it2)-days_limb(it1))
160+
w1 = 1.0-w2
161161

162-
do i=1, im
163-
j1 = j1_tau(i)
164-
j2 = j2_tau(i)
165-
tx1 = tau_limb(j1, it1)*ddy_j1(i)+tau_limb(j2, it1)*ddy_j2(i)
166-
tx2 = tau_limb(j1, it2)*ddy_j1(i)+tau_limb(j2, it2)*ddy_j2(i)
167-
tau_ddd(i) = tx1*w1 + w2*tx2
162+
do i=1, im
163+
j1 = j1_tau(i)
164+
j2 = j2_tau(i)
165+
tx1 = tau_limb(j1, it1)*ddy_j1(i)+tau_limb(j2, it1)*ddy_j2(i)
166+
tx2 = tau_limb(j1, it2)*ddy_j1(i)+tau_limb(j2, it2)*ddy_j2(i)
167+
tau_ddd(i) = tx1*w1 + w2*tx2
168168
enddo
169169

170170
end subroutine tau_amf_interp
171171

172172
!>
173173
subroutine gfs_idate_calendar(idate, fhour, ddd, fddd)
174174

175-
use machine, only: kind_phys
175+
use machine, only: kind_phys
176176
implicit none
177177
! input
178178
integer, intent(in) :: idate(4)

physics/GWD/cires_ugwpv1_oro.F90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ subroutine orogw_v1 (im, km, imx, me, master, dtp, kdt, do_tofd, &
222222
dusfc(i) = 0.0
223223
dvsfc(i) = 0.0
224224
ipt(i) = 0
225-
enddo
225+
enddo
226+
zlwb(:) = 0.0
226227

227228
! ---- for lm and gwd calculation points
228229
!cires_ugwp_initialize.F90: real, parameter :: hpmax=2400.0, hpmin=25.0

0 commit comments

Comments
 (0)