Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 8 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
branch = main
[submodule "physics/SFC_Layer/MYNN/MYNN"]
path = physics/SFC_Layer/MYNN/MYNN
url = https://github.com/NCAR/MYNN-SFC
branch = ccpp/dev
# url = https://github.com/NCAR/MYNN-SFC
# branch = ccpp/dev
url = https://github.com/scrasmussen/MYNN-SFC
branch = mynn-sfc-remove-physcons
[submodule "physics/CONV/C3"]
path = physics/CONV/C3
url = https://github.com/ufs-community/c3
branch = main
# url = https://github.com/ufs-community/c3
# branch = main
url = https://github.com/scrasmussen/c3
branch = c3-remove-physcons
2 changes: 1 addition & 1 deletion physics/CONV/C3
148 changes: 108 additions & 40 deletions physics/CONV/Chikira_Sugiyama/cs_conv.F90

Large diffs are not rendered by default.

98 changes: 97 additions & 1 deletion physics/CONV/Chikira_Sugiyama/cs_conv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[ccpp-table-properties]
name = cs_conv
type = scheme
dependencies = ../../tools/funcphys.f90,../../hooks/machine.F,../../hooks/physcons.F90
dependencies = ../../tools/funcphys.f90,../../hooks/machine.F

########################################################################
[ccpp-arg-table]
Expand Down Expand Up @@ -448,6 +448,102 @@
type = real
kind = kind_phys
intent = out
[cp]
standard_name = specific_heat_of_dry_air_at_constant_pressure
long_name = specific heat of dry air at constant pressure
units = J kg-1 K-1
dimensions = ()
type = real
kind = kind_phys
intent = in
[grav]
standard_name = gravitational_acceleration
long_name = gravitational acceleration
units = m s-2
dimensions = ()
type = real
kind = kind_phys
intent = in
[rair]
standard_name = gas_constant_of_dry_air
long_name = ideal gas constant for dry air
units = J kg-1 K-1
dimensions = ()
type = real
kind = kind_phys
intent = in
[rvap]
standard_name = gas_constant_water_vapor
long_name = ideal gas constant for water vapor
units = J kg-1 K-1
dimensions = ()
type = real
kind = kind_phys
intent = in
[cliq]
standard_name = specific_heat_of_liquid_water_at_constant_pressure
long_name = specific heat of liquid water at constant pressure
units = J kg-1 K-1
dimensions = ()
type = real
kind = kind_phys
intent = in
[cvap]
standard_name = specific_heat_of_water_vapor_at_constant_pressure
long_name = specific heat of water vapor at constant pressure
units = J kg-1 K-1
dimensions = ()
type = real
kind = kind_phys
intent = in
[epsv]
standard_name = ratio_of_dry_air_to_water_vapor_gas_constants
long_name = rd/rv
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[epsvm1]
standard_name = ratio_of_dry_air_to_water_vapor_gas_constants_minus_one
long_name = (rd/rv) - 1
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[epsvt]
standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one
long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor)
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[el]
standard_name = latent_heat_of_vaporization_of_water_at_0C
long_name = latent heat of evaporation/sublimation
units = J kg-1
dimensions = ()
type = real
kind = kind_phys
intent = in
[emelt]
standard_name = latent_heat_of_fusion_of_water_at_0C
long_name = latent heat of fusion
units = J kg-1
dimensions = ()
type = real
kind = kind_phys
intent = in
[t0c]
standard_name = temperature_at_zero_celsius
long_name = temperature at 0 degrees Celsius
units = K
dimensions = ()
type = real
kind = kind_phys
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
5 changes: 3 additions & 2 deletions physics/CONV/Grell_Freitas/cu_gf_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
!> This module contains the Grell_Freitas deep convection scheme
module cu_gf_deep
use machine , only : kind_phys
use physcons, only : qamin
real(kind=kind_phys), parameter::g=9.81
real(kind=kind_phys), parameter:: cp=1004.
real(kind=kind_phys), parameter:: xlv=2.5e6
Expand Down Expand Up @@ -143,7 +142,8 @@ subroutine cu_gf_deep_run( &
!! betwee -1 and +1
,do_capsuppress,cap_suppress_j & !
,k22 & !
,jmin,kdt,mc_thresh) !
,jmin,kdt,mc_thresh &
,qamin)

implicit none

Expand Down Expand Up @@ -192,6 +192,7 @@ subroutine cu_gf_deep_run( &
,intent (in ) :: &
kpbl
!$acc declare copyin(kpbl)
real(kind_phys), intent(in) :: qamin
!
! basic environmental input includes moisture convergence (mconv)
! omega (omeg), windspeed (us,vs), and a flag (ierr) to turn off
Expand Down
11 changes: 7 additions & 4 deletions physics/CONV/Grell_Freitas/cu_gf_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
module cu_gf_driver

! DH* TODO: replace constants with arguments to cu_gf_driver_run
!use physcons , g => con_g, cp => con_cp, xlv => con_hvap, r_v => con_rv
use machine , only: kind_phys
use cu_gf_deep, only: cu_gf_deep_run,neg_check,fct1d3
use cu_gf_sh , only: cu_gf_sh_run
Expand Down Expand Up @@ -68,7 +67,8 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart, gf_co
dfi_radar_max_intervals,ldiag3d,qci_conv,do_cap_suppress, &
maxupmf,maxMF,do_mynnedmf,ichoice_in,ichoicem_in,ichoice_s_in, &
spp_cu_deep,spp_wts_cu_deep,nchem,chem3d,fscav,wetdpc_deep, &
do_smoke_transport,kdt,ten_t,ten_u,ten_v,ten_q,dcliw,dclcw,errmsg,errflg)
do_smoke_transport,kdt,ten_t,ten_u,ten_v,ten_q,dcliw,dclcw, &
qamin,errmsg,errflg)
!-------------------------------------------------------------
implicit none
integer, parameter :: maxiens=1
Expand Down Expand Up @@ -165,6 +165,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart, gf_co
!$acc declare copy(cactiv,cactiv_m,chem3d,wetdpc_deep)
real(kind_phys), dimension(:,:), intent(out) :: ten_t, ten_u, ten_v, dcliw, dclcw
real(kind_phys), dimension(:,:,:), intent(out) :: ten_q
real(kind_phys), intent(in) :: qamin

character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg
Expand Down Expand Up @@ -782,7 +783,8 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart, gf_co
! betwee -1 and +1
,do_cap_suppress_here,cap_suppress_j &
,k22m &
,jminm,kdt,mc_thresh)
,jminm,kdt,mc_thresh &
,qamin)
!$acc kernels
do i=its,itf
do k=kts,ktf
Expand Down Expand Up @@ -868,7 +870,8 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart, gf_co
! betwee -1 and +1
,do_cap_suppress_here,cap_suppress_j &
,k22 &
,jmin,kdt,mc_thresh)
,jmin,kdt,mc_thresh &
,qamin)
jpr=0
ipr=0
!$acc kernels
Expand Down
8 changes: 8 additions & 0 deletions physics/CONV/Grell_Freitas/cu_gf_driver.meta
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,14 @@
type = real
kind = kind_phys
intent = out
[qamin]
standard_name = minimum_aerosol_concentration
long_name = Minimum aerosol mass mixing ratio
units = kg kg-1
dimensions = ()
type = real
kind = kind_phys
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
13 changes: 8 additions & 5 deletions physics/CONV/SAMF/samfaerosols.F
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ module samfcnv_aerosols
subroutine samfdeepcnv_aerosols(im, ix, km, itc, ntc, ntr, delt,
& xlamde, xlamdd, cnvflg, jmin, kb, kmax, kd94, ktcon, fscav,
& edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp,
& qtr, qaero)
& qtr, qaero, g, qamin)

use machine , only : kind_phys
use physcons, only : g => con_g, qamin

implicit none

Expand All @@ -35,6 +34,8 @@ subroutine samfdeepcnv_aerosols(im, ix, km, itc, ntc, ntr, delt,
& eta, etad, zi, xlamue, xlamud
real(kind=kind_phys), dimension(ix,km), intent(in) :: delp
real(kind=kind_phys), dimension(ix,km,ntr+2), intent(in) :: qtr
real(kind=kind_phys), intent(in) :: g
real(kind=kind_phys), intent(in) :: qamin
c -- output arguments
real(kind=kind_phys), dimension(im,km,ntc), intent(out) :: qaero

Expand Down Expand Up @@ -412,10 +413,9 @@ end subroutine samfdeepcnv_aerosols
subroutine samfshalcnv_aerosols(im, ix, km, itc, ntc, ntr, delt,
& cnvflg, kb, kmax, kbcon, ktcon, fscav,
& xmb, c0t, eta, zi, xlamue, xlamud, delp,
& qtr, qaero)
& qtr, qaero, con_g, qamin)

use machine , only : kind_phys
use physcons, only : g => con_g, qamin

implicit none

Expand All @@ -435,6 +435,8 @@ subroutine samfshalcnv_aerosols(im, ix, km, itc, ntc, ntr, delt,
& eta, zi, xlamue !, xlamud
real(kind=kind_phys), dimension(ix,km), intent(in) :: delp
real(kind=kind_phys), dimension(ix,km,ntr+2), intent(in) :: qtr
real(kind=kind_phys), intent(in) :: con_g
real(kind=kind_phys), intent(in) :: qamin
c -- output arguments
real(kind=kind_phys), dimension(im,km,ntc), intent(out) :: qaero

Expand Down Expand Up @@ -463,9 +465,10 @@ subroutine samfshalcnv_aerosols(im, ix, km, itc, ntc, ntr, delt,
real(kind=kind_phys), parameter :: zero = 0.0_kind_phys
real(kind=kind_phys), parameter :: epsil = 1.e-22_kind_phys ! prevent division by zero
real(kind=kind_phys), parameter :: escav = 0.8_kind_phys ! wet scavenging efficiency
real(kind=kind_phys) :: g

c -- begin

g = con_g
c -- check if aerosols are present
if ( ntc <= 0 .or. itc <= 0 .or. ntr <= 0 ) return
if ( ntr < itc + ntc - 3 ) return
Expand Down
8 changes: 4 additions & 4 deletions physics/CONV/SAMF/samfshalcnv.f
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ subroutine samfshalcnv_run(im,km,nn,itc,ntc,cliq,cp,cvap, &
& ten_q, dot,ncloud,hpbl,ud_mf,dt_mf,cnvw,cnvc, &
& clam,c0s,c1,evef,pgcon,asolfac,hwrf_samfshal, &
& sigmain,sigmaout,omegain,omegaout,betadcu,betamcu,betascu, &
& cat_adj_shal,errmsg,errflg)
& cat_adj_shal,qamin,errmsg,errflg)
!
use machine , only : kind_phys
use funcphys , only : fpvs
Expand Down Expand Up @@ -93,7 +93,7 @@ subroutine samfshalcnv_run(im,km,nn,itc,ntc,cliq,cp,cvap, &
real(kind=kind_phys), intent(out) :: rn(:), &
& cnvw(:,:), cnvc(:,:), dt_mf(:,:)
!
real(kind=kind_phys), intent(out) :: ud_mf(:,:)
real(kind=kind_phys), intent(out), optional :: ud_mf(:,:)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was ud_f changed to optional? It doesn't appear to be optional to me. Also, the metadata doesn't reflect this. I'm guessing that we should just revert this?

real(kind=kind_phys), intent(inout), optional :: sigmaout(:,:), &
& omegaout(:,:)

Expand All @@ -102,6 +102,7 @@ subroutine samfshalcnv_run(im,km,nn,itc,ntc,cliq,cp,cvap, &
logical, intent(in) :: hwrf_samfshal,first_time_step, &
& restart,progsigma,progomega
real(kind_phys), intent(in) :: cat_adj_shal
real(kind=kind_phys), intent(in) :: qamin
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg

Expand Down Expand Up @@ -2127,7 +2128,7 @@ subroutine samfshalcnv_run(im,km,nn,itc,ntc,cliq,cp,cvap, &
! & cnvflg, kb, kmax, ktcon, fscav,
!! & edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp,
! & xmb, c0t, eta, zi, xlamue, xlamud, delp,
! & qtr, qaero)
! & qtr, qaero, grav, qamin)
! endif
!
!> ## For the "feedback control", calculate updated values of the state variables by multiplying the cloud base mass flux and the tendencies calculated per unit cloud base mass flux from the static control.
Expand Down Expand Up @@ -2616,4 +2617,3 @@ subroutine samfshalcnv_run(im,km,nn,itc,ntc,cliq,cp,cvap, &
end subroutine samfshalcnv_run
!> @}
end module samfshalcnv

8 changes: 8 additions & 0 deletions physics/CONV/SAMF/samfshalcnv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,14 @@
type = real
kind = kind_phys
intent = in
[qamin]
standard_name = minimum_aerosol_concentration
long_name = Minimum aerosol mass mixing ratio
units = kg kg-1
dimensions = ()
type = real
kind = kind_phys
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
4 changes: 0 additions & 4 deletions physics/CONV/SAS/sascnvn.F
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ subroutine sascnvn_run(
!
use machine , only : kind_phys
use funcphys , only : fpvs
! use physcons, grav => con_g, cp => con_cp, hvap => con_hvap &
! &, rv => con_rv, fv => con_fvirt, t0c => con_t0c &
! &, cvap => con_cvap, cliq => con_cliq &
! &, eps => con_eps, epsm1 => con_epsm1,rgas => con_rd
implicit none
!
! Interface variables
Expand Down
4 changes: 0 additions & 4 deletions physics/CONV/SAS/shalcnv.F
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ subroutine shalcnv_run( &
!
use machine , only : kind_phys
use funcphys , only : fpvs
! use physcons, grav => con_g, cp => con_cp, hvap => con_hvap &
! &, rv => con_rv, fv => con_fvirt, t0c => con_t0c &
! &, rd => con_rd, cvap => con_cvap, cliq => con_cliq &
! &, eps => con_eps, epsm1 => con_epsm1
implicit none
!
! Interface variables
Expand Down
Loading