Skip to content

Commit 40aa0a1

Browse files
committed
Merge branch 'ufs/dev' into feature/tendency_cleanup
2 parents 59b0a31 + bca8f11 commit 40aa0a1

38 files changed

+1973
-775
lines changed

.github/workflows/ci_fv3_ccpp_prebuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
run: |
5555
cd /home/runner/work/ccpp-physics/ccpp-physics/fv3atm/ccpp/
5656
mkdir -p /home/runner/work/ccpp-physics/ccpp-physics/fv3atm/bin/ccpp/physics/physics/
57-
./framework/scripts/ccpp_prebuild.py --config config/ccpp_prebuild_config.py
57+
./framework/scripts/ccpp_prebuild.py --config config/ccpp_prebuild_config_fv3.py

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ target_link_libraries(ccpp_physics PUBLIC w3emc::w3emc_d
199199
NetCDF::NetCDF_Fortran
200200
)
201201
#add FMS for FV3 only
202-
if(FV3)
202+
if(FV3 OR MPAS)
203203
target_link_libraries(ccpp_physics PUBLIC fms)
204204
endif()
205205

physics/CONV/SAMF/samfdeepcnv.f

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ subroutine samfdeepcnv_run (im,km,nn,first_time_step,restart, &
8282
& islimsk,garea,dot,ncloud,hpbl,ud_mf,dd_mf,dt_mf,cnvw,cnvc, &
8383
& QLCN, QICN, w_upi, cf_upi, CNV_MFD, &
8484
& CNV_DQLDT,CLCN,CNV_FICE,CNV_NDROP,CNV_NICE,mp_phys,mp_phys_mg,&
85-
& clam,c0s,c1,betal,betas,evef,pgcon,asolfac, &
85+
& clam,c0s,c1,betal,betas,evef,pgcon,asolfac,cscale, &
8686
& do_ca, ca_closure, ca_entr, ca_trigger, nthresh,ca_deep, &
8787
& rainevap,sigmain,sigmaout,omegain,omegaout,betadcu,betamcu, &
8888
& betascu,maxMF,do_mynnedmf,sigmab_coldstart,errmsg,errflg)
@@ -97,7 +97,7 @@ subroutine samfdeepcnv_run (im,km,nn,first_time_step,restart, &
9797
integer, intent(in) :: islimsk(:)
9898
real(kind=kind_phys), intent(in) :: cliq, cp, cvap, eps, epsm1, &
9999
& fv, grav, hvap, rd, rv, t0c
100-
real(kind=kind_phys), intent(in) :: delt
100+
real(kind=kind_phys), intent(in) :: delt, cscale
101101
real(kind=kind_phys), intent(in) :: psp(:), delp(:,:), &
102102
& prslp(:,:), garea(:), hpbl(:), dot(:,:), phil(:,:)
103103
real(kind=kind_phys), dimension(:), intent(in) :: fscav
@@ -217,7 +217,7 @@ subroutine samfdeepcnv_run (im,km,nn,first_time_step,restart, &
217217
! parameters for prognostic sigma closure
218218
real(kind=kind_phys) omega_u(im,km),zdqca(im,km),tmfq(im,km),
219219
& omegac(im),zeta(im,km),dbyo1(im,km),sigmab(im),qadv(im,km),
220-
& sigmaoutx(im),tentr(im,km)
220+
& tentr(im,km)
221221
real(kind=kind_phys) gravinv,invdelt,sigmind,sigminm,sigmins
222222
parameter(sigmind=0.01,sigmins=0.03,sigminm=0.01)
223223
logical flag_shallow, flag_mid
@@ -2553,10 +2553,10 @@ subroutine samfdeepcnv_run (im,km,nn,first_time_step,restart, &
25532553
c
25542554
c------- final changed variable per unit mass flux
25552555
c
2556-
!> - If grid size is less than a threshold value (dxcrtas: currently 8km if progsigma is not used and 30km if progsigma is used), the quasi-equilibrium assumption of Arakawa-Schubert is not used any longer.
2556+
!> - If grid size is less than a threshold value (dxcrtas: currently 8km if progsigma is not used), or progsigma = true, the quasi-equilibrium assumption of Arakawa-Schubert is not used any longer.
25572557
!
25582558
if(progsigma)then
2559-
dxcrtas=30.e3
2559+
dxcrtas=500.e3
25602560
dxcrtuf=10.e3
25612561
else
25622562
dxcrtas=8.e3
@@ -3486,24 +3486,16 @@ subroutine samfdeepcnv_run (im,km,nn,first_time_step,restart, &
34863486
endif
34873487
enddo
34883488
c
3489-
!
3490-
if(progsigma)then
3491-
do i = 1, im
3492-
sigmaoutx(i)=max(sigmaout(i,1),0.0)
3493-
sigmaoutx(i)=min(sigmaoutx(i),1.0)
3494-
enddo
3495-
endif
3496-
c
34973489
!> - Calculate convective cloud water.
34983490
do k = 1, km
34993491
do i = 1, im
35003492
if (cnvflg(i) .and. rn(i) > 0.) then
35013493
if (k >= kbcon(i) .and. k < ktcon(i)) then
35023494
cnvw(i,k) = cnvwt(i,k) * xmb(i) * dt2
35033495
if(progsigma)then
3504-
cnvw(i,k) = cnvw(i,k) * sigmaoutx(i)
3496+
cnvw(i,k) = cnvw(i,k) * cscale
35053497
else
3506-
cnvw(i,k) = cnvw(i,k) * sigmagfm(i)
3498+
cnvw(i,k) = cnvw(i,k) * cscale
35073499
endif
35083500
endif
35093501
endif

physics/CONV/SAMF/samfdeepcnv.meta

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@
195195
type = real
196196
kind = kind_phys
197197
intent = in
198+
[cscale]
199+
standard_name = multiplicative_tuning_parameter_for_convective_cloud_water
200+
long_name = multiplicative tuning parameter for convective cloud_water
201+
units = none
202+
dimensions = ()
203+
type = real
204+
kind = kind_phys
205+
intent = in
198206
[delt]
199207
standard_name = timestep_for_physics
200208
long_name = physics time step
@@ -519,7 +527,7 @@
519527
[omegain]
520528
standard_name = prognostic_updraft_velocity_in_convection
521529
long_name = convective updraft velocity
522-
units = frac
530+
units = Pa s-1
523531
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
524532
type = real
525533
kind = kind_phys
@@ -528,7 +536,7 @@
528536
[omegaout]
529537
standard_name = updraft_velocity_updated_by_physics
530538
long_name = convective updraft velocity updated by physics
531-
units = frac
539+
units = Pa s-1
532540
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
533541
type = real
534542
kind = kind_phys

physics/CONV/SAMF/samfshalcnv.f

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ subroutine samfshalcnv_run(im,km,nn,itc,ntc,cliq,cp,cvap, &
5555
& t0c,delt,ntk,ntr,delp,first_time_step,restart, &
5656
& tmf,qmicro,progsigma,progomega, &
5757
& prslp,psp,phil,tkeh,qtr,dqtr,prevsq,q,q1,t1,u1,v1,fscav, &
58-
& rn,kbot,ktop,kcnv,islimsk,garea, ten_t, ten_u, ten_v, ten_q, &
59-
& dot,ncloud,hpbl,ud_mf,dt_mf,cnvw,cnvc, &
58+
& rn,kbot,ktop,kcnv,islimsk,garea,cscale,ten_t, ten_u, ten_v, &
59+
& ten_q, dot,ncloud,hpbl,ud_mf,dt_mf,cnvw,cnvc, &
6060
& clam,c0s,c1,evef,pgcon,asolfac,hwrf_samfshal, &
6161
& sigmain,sigmaout,omegain,omegaout,betadcu,betamcu,betascu, &
6262
& errmsg,errflg)
@@ -71,7 +71,7 @@ subroutine samfshalcnv_run(im,km,nn,itc,ntc,cliq,cp,cvap, &
7171
real(kind=kind_phys), intent(in) :: cliq, cp, cvap, &
7272
& eps, epsm1, fv, grav, hvap, rd, rv, t0c, betascu, betadcu, &
7373
& betamcu
74-
real(kind=kind_phys), intent(in) :: delt
74+
real(kind=kind_phys), intent(in) :: delt, cscale
7575
real(kind=kind_phys), intent(in) :: psp(:), delp(:,:), &
7676
& prslp(:,:), garea(:), hpbl(:), dot(:,:), phil(:,:), &
7777
& tmf(:,:,:), q(:,:)
@@ -170,7 +170,7 @@ subroutine samfshalcnv_run(im,km,nn,itc,ntc,cliq,cp,cvap, &
170170
! parameters for prognostic sigma closure
171171
real(kind=kind_phys) omega_u(im,km),zdqca(im,km),tmfq(im,km),
172172
& omegac(im),zeta(im,km),dbyo1(im,km),
173-
& sigmab(im),qadv(im,km),sigmaoutx(im)
173+
& sigmab(im),qadv(im,km)
174174
real(kind=kind_phys) gravinv,dxcrtas,invdelt,sigmind,sigmins,
175175
& sigminm
176176
logical flag_shallow,flag_mid
@@ -207,7 +207,7 @@ subroutine samfshalcnv_run(im,km,nn,itc,ntc,cliq,cp,cvap, &
207207
parameter(betaw=.03,dxcrtc0=9.e3)
208208
parameter(h1=0.33333333)
209209
! progsigma
210-
parameter(dxcrtas=30.e3,sigmind=0.01,sigmins=0.03,sigminm=0.01)
210+
parameter(dxcrtas=500.e3,sigmind=0.01,sigmins=0.03,sigminm=0.01)
211211
c local variables and arrays
212212
real(kind=kind_phys) pfld(im,km), to(im,km), qo(im,km),
213213
& uo(im,km), vo(im,km), qeso(im,km),
@@ -2464,23 +2464,16 @@ subroutine samfshalcnv_run(im,km,nn,itc,ntc,cliq,cp,cvap, &
24642464
endif
24652465
enddo
24662466
c
2467-
if(progsigma)then
2468-
do i = 1, im
2469-
sigmaoutx(i)=max(sigmaout(i,1),0.0)
2470-
sigmaoutx(i)=min(sigmaoutx(i),1.0)
2471-
enddo
2472-
endif
2473-
24742467
c convective cloud water
24752468
do k = 1, km
24762469
do i = 1, im
24772470
if (cnvflg(i)) then
24782471
if (k >= kbcon(i) .and. k < ktcon(i)) then
24792472
cnvw(i,k) = cnvwt(i,k) * xmb(i) * dt2
24802473
if (progsigma) then
2481-
cnvw(i,k) = cnvw(i,k) * sigmaoutx(i)
2474+
cnvw(i,k) = cnvw(i,k) * cscale
24822475
else
2483-
cnvw(i,k) = cnvw(i,k) * sigmagfm(i)
2476+
cnvw(i,k) = cnvw(i,k) * cscale
24842477
endif
24852478
endif
24862479
endif

physics/CONV/SAMF/samfshalcnv.meta

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@
195195
type = real
196196
kind = kind_phys
197197
intent = in
198+
[cscale]
199+
standard_name = multiplicative_tuning_parameter_for_convective_cloud_water
200+
long_name = multiplicative tuning parameter for convective cloud water
201+
units = none
202+
dimensions = ()
203+
type = real
204+
kind = kind_phys
205+
intent = in
198206
[delt]
199207
standard_name = timestep_for_physics
200208
long_name = physics time step
@@ -551,7 +559,7 @@
551559
[omegain]
552560
standard_name = prognostic_updraft_velocity_in_convection
553561
long_name = convective updraft velocity
554-
units = frac
562+
units = Pa s-1
555563
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
556564
type = real
557565
kind = kind_phys
@@ -560,7 +568,7 @@
560568
[omegaout]
561569
standard_name = updraft_velocity_updated_by_physics
562570
long_name = convective updraft velocity updated by physics
563-
units = frac
571+
units = Pa s-1
564572
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
565573
type = real
566574
kind = kind_phys

physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.F90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ end subroutine GFS_photochemistry_init
4747
! #########################################################################################
4848
subroutine GFS_photochemistry_run (dtp, ntqv, ntoz, im, levs, ozphys, oz_phys_2015, oz_phys_2006, con_1ovg, &
4949
prsl, dp, ozpl, h2o_phys, h2ophys, h2opl, gq0, gt0, ten_q, ten_u, ten_v, ten_t, do3_dt_prd, do3_dt_ozmx, &
50-
do3_dt_temp, do3_dt_ohoz, errmsg, errflg)
50+
do3_dt_temp, do3_dt_ohoz, dqv_dt_prd, dqv_dt_qvmx, errmsg, errflg)
5151

5252
! Inputs
5353
real(kind=kind_phys), intent(in) :: &
@@ -81,7 +81,9 @@ subroutine GFS_photochemistry_run (dtp, ntqv, ntoz, im, levs, ozphys, oz_phys_20
8181
do3_dt_prd, & ! Physics tendency: production and loss effect
8282
do3_dt_ozmx, & ! Physics tendency: ozone mixing ratio effect
8383
do3_dt_temp, & ! Physics tendency: temperature effect
84-
do3_dt_ohoz ! Physics tendency: overhead ozone effect
84+
do3_dt_ohoz, & ! Physics tendency: overhead ozone effect
85+
dqv_dt_prd, & ! Physics tendency: Climatological net production effect
86+
dqv_dt_qvmx ! Physics tendency: specific humidity effect
8587

8688
! Outputs
8789
real(kind=kind_phys), intent(out), dimension(:,:) :: &
@@ -132,7 +134,7 @@ subroutine GFS_photochemistry_run (dtp, ntqv, ntoz, im, levs, ozphys, oz_phys_20
132134
if (h2o_phys) then
133135
init_h2o0 = gq0(:,:,ntqv)
134136
h2o0 = init_h2o0
135-
call h2ophys%run(dtp, prsl, h2opl, h2o0)
137+
call h2ophys%run(dtp, prsl, h2opl, h2o0, dqv_dt_prd, dqv_dt_qvmx)
136138
do i=1, im
137139
do k=1, levs
138140
ten_q(i,k,ntqv) = (h2o0(i,k) - init_h2o0(i,k))/dtp

physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.meta

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,24 @@
245245
kind = kind_phys
246246
intent = inout
247247
optional = True
248+
[dqv_dt_prd]
249+
standard_name = water_vapor_tendency_due_to_production_and_loss_rate
250+
long_name = water_vapor tendency due to production and loss rate
251+
units = kg kg-1 s-1
252+
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
253+
type = real
254+
kind = kind_phys
255+
intent = inout
256+
optional = True
257+
[dqv_dt_qvmx]
258+
standard_name = water_vapor_tendency_due_to_water_vapor_mixing_ratio
259+
long_name = water_vapor tendency due to water_vapor mixing ratio
260+
units = kg kg-1 s-1
261+
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
262+
type = real
263+
kind = kind_phys
264+
intent = inout
265+
optional = True
248266
[errmsg]
249267
standard_name = ccpp_error_message
250268
long_name = error message for error handling in CCPP

0 commit comments

Comments
 (0)