Skip to content

Commit

Permalink
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physics
Browse files Browse the repository at this point in the history
… into mynnsfc_openacc
  • Loading branch information
timsliwinski-noaa committed Sep 8, 2023
2 parents 36a313e + 7efb112 commit 770ad33
Show file tree
Hide file tree
Showing 46 changed files with 4,802 additions and 907 deletions.
1,424 changes: 767 additions & 657 deletions physics/clm_lake.f90

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions physics/clm_lake.meta
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
[ccpp-arg-table]
name = clm_lake_run
type = scheme
[flag_restart]
standard_name = flag_for_restart
long_name = flag for restart (warmstart) or coldstart
units = flag
dimensions = ()
type = logical
intent = in
[im]
standard_name = horizontal_loop_extent
long_name = horizontal loop extent
Expand Down Expand Up @@ -935,6 +942,13 @@
type = logical
active = (control_for_lake_model_selection == 3)
intent = in
[clm_debug_print]
standard_name = flag_for_printing_in_clm_lake_model
long_name = flag for printing in clm lake model
units = flag
dimensions = ()
type = logical
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
8 changes: 4 additions & 4 deletions physics/cu_gf_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module cu_gf_deep
integer, parameter :: autoconv=1 !2
integer, parameter :: aeroevap=1 !3
real(kind=kind_phys), parameter :: scav_factor = 0.5

real(kind=kind_phys), parameter :: dx_thresh = 6500.
!> still 16 ensembles for clousres
integer, parameter:: maxens3=16
Expand Down Expand Up @@ -4707,11 +4708,10 @@ subroutine get_zu_zd_pdf_fim(kklev,p,rand_vmas,zubeg,ipr,xland,zuh2,draft,ierr,k
if(draft == 1) then
lev_start=min(.9,.1+csum*.013)
kb_adj=max(kb,2)
tunning=max(p(kklev+1),.5*(p(kpbli)+p(kt)))
tunning=p(kklev)
! tunning=p(kklev+1) !p(kpbli+1) !p(kklev) !p(kt)+(p(kpbli)-p(kt))*lev_start
! tunning=.5*(p(kb_adj)+p(kt)) !p(kpbli+1) !p(kklev) !p(kt)+(p(kpbli)-p(kt))*lev_start
! trash is the depth of the cloud
trash=-p(kt)+p(kb_adj)
tunning=p(kklev)
if(rand_vmas.ne.0.) tunning=p(kklev-1)+.1*rand_vmas*trash
beta_deep=1.3 +(1.-trash/1200.)
tunning =min(0.95, (tunning-p(kb_adj))/(p(kt)-p(kb_adj))) !=.6
tunning =max(0.02, tunning)
Expand Down
26 changes: 20 additions & 6 deletions physics/cu_gf_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
fhour,fh_dfi_radar,ix_dfi_radar,num_dfi_radar,cap_suppress, &
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, &
errmsg,errflg)
!-------------------------------------------------------------
implicit none
Expand All @@ -80,6 +81,10 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
integer :: ichoice=0 ! 0 2 5 13 8
integer :: ichoicem=13 ! 0 2 5 13
integer :: ichoice_s=3 ! 0 1 2 3
integer, intent(in) :: spp_cu_deep ! flag for using SPP perturbations
real(kind_phys), dimension(:,:), intent(in) :: &
& spp_wts_cu_deep
real(kind=kind_phys) :: spp_wts_cu_deep_tmp

logical, intent(in) :: do_cap_suppress
real(kind=kind_phys), parameter :: aodc0=0.14
Expand Down Expand Up @@ -313,9 +318,18 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
! these should be coming in from outside
!
! cactiv(:) = 0
rand_mom(:) = 0.
rand_vmas(:) = 0.
rand_clos(:,:) = 0.
if (spp_cu_deep == 0) then
rand_mom(:) = 0.
rand_vmas(:) = 0.
rand_clos(:,:) = 0.
else
do i=1,im
spp_wts_cu_deep_tmp=min(max(-1.0_kind_phys, spp_wts_cu_deep(i,1)),1.0_kind_phys)
rand_mom(i) = spp_wts_cu_deep_tmp
rand_vmas(i) = spp_wts_cu_deep_tmp
rand_clos(i,:) = spp_wts_cu_deep_tmp
end do
end if
!$acc end kernels
!
its=1
Expand Down Expand Up @@ -630,7 +644,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
enddo
!$acc end kernels
if (dx(its)<6500.) then
ichoice=10
! ichoice=10
imid_gf=0
endif
!
Expand Down Expand Up @@ -734,7 +748,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
,rand_mom & ! for stochastics mom, if temporal and spatial patterns exist
,rand_vmas & ! for stochastics vertmass, if temporal and spatial patterns exist
,rand_clos & ! for stochastics closures, if temporal and spatial patterns exist
,0 & ! flag to what you want perturbed
,spp_cu_deep & ! flag to what you want perturbed
! 1 = momentum transport
! 2 = normalized vertical mass flux profile
! 3 = closures
Expand Down Expand Up @@ -816,7 +830,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
,rand_mom & ! for stochastics mom, if temporal and spatial patterns exist
,rand_vmas & ! for stochastics vertmass, if temporal and spatial patterns exist
,rand_clos & ! for stochastics closures, if temporal and spatial patterns exist
,0 & ! flag to what you want perturbed
,spp_cu_deep & ! flag to what you want perturbed
! 1 = momentum transport
! 2 = normalized vertical mass flux profile
! 3 = closures
Expand Down
15 changes: 15 additions & 0 deletions physics/cu_gf_driver.meta
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,21 @@
dimensions = ()
type = integer
intent = in
[spp_wts_cu_deep]
standard_name = spp_weights_for_cu_deep_scheme
long_name = spp weights for cu deep scheme
units = 1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[spp_cu_deep]
standard_name = control_for_deep_convection_spp_perturbations
long_name = control for deep convection spp perturbations
units = count
dimensions = ()
type = integer
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
2 changes: 1 addition & 1 deletion physics/docs/ccpp_doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------

INPUT = pdftxt/mainpage.txt \
pdftxt/all_shemes_list.txt \
pdftxt/all_schemes_list.txt \
pdftxt/GFS_v16_suite.txt \
pdftxt/GFS_v17_p8_suite.txt \
pdftxt/RAP_suite.txt \
Expand Down
14 changes: 8 additions & 6 deletions physics/docs/ccppsrw_doxyfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Doxyfile 1.9.3

DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "CCPP Scidoc for SRW v2.1.0"
PROJECT_NUMBER = "SRW v2.1.0"
PROJECT_NAME = "CCPP SciDoc for UFS-SRW v3.0.0"
PROJECT_NUMBER = "SRW v3.0.0"
PROJECT_BRIEF = "Common Community Physics Package Developed at DTC"
PROJECT_LOGO = img/dtc_logo.png
OUTPUT_DIRECTORY = doc
Expand Down Expand Up @@ -115,9 +115,10 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------

INPUT = pdftxt/SRW_mainpage.txt \
pdftxt/SRW_all_shemes_list.txt \
pdftxt/SRW_all_schemes_list.txt \
pdftxt/GFS_v16_suite.txt \
pdftxt/HRRR_suite.txt \
pdftxt/RAP_suite.txt \
pdftxt/RRFS_v1beta_suite.txt \
pdftxt/WoFS_v0_suite.txt \
pdftxt/RRFS_SGSCLOUD.txt \
Expand All @@ -144,6 +145,7 @@ INPUT = pdftxt/SRW_mainpage.txt \
pdftxt/RUCLSM.txt \
pdftxt/THOMPSON.txt \
pdftxt/suite_input.nml.txt \
pdftxt/CLM_LAKE.txt \
pdftxt/GFS_SPP.txt \
../fv_sat_adj.F90 \
../GFS_time_vary_pre.fv3.F90 \
Expand Down Expand Up @@ -206,6 +208,7 @@ INPUT = pdftxt/SRW_mainpage.txt \
../sfc_nst_pre.f \
../sfc_nst_post.f \
../sfc_ocean.F \
../clm_lake.f90 \
../module_nst_model.f90 \
../module_nst_parameters.f90 \
../module_nst_water_prop.f90 \
Expand Down Expand Up @@ -283,7 +286,6 @@ INPUT = pdftxt/SRW_mainpage.txt \
../mp_nssl.F90 \
../module_mp_nssl_2mom.F90 \
../funcphys.f90 \
../physparam.f \
../physcons.F90 \
../radcons.f90 \
../mersenne_twister.f \
Expand All @@ -302,7 +304,7 @@ EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH = pdftxt/RE210 \
EXAMPLE_PATH = pdftxt/RE300 \
doc/html
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
Expand Down Expand Up @@ -540,7 +542,7 @@ DIRECTORY_GRAPH = YES
DIR_GRAPH_MAX_DEPTH = 1
DOT_IMAGE_FORMAT = SVG
INTERACTIVE_SVG = NO
DOT_PATH =
DOT_PATH =
DOTFILE_DIRS =
MSCFILE_DIRS =
DIAFILE_DIRS =
Expand Down
Loading

0 comments on commit 770ad33

Please sign in to comment.