Skip to content

Commit

Permalink
changes to work with ufs-dev PR#184
Browse files Browse the repository at this point in the history
  • Loading branch information
grantfirl committed May 23, 2024
1 parent 8183aa6 commit 0cd476c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 32 deletions.
1 change: 1 addition & 0 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
TYPEDEFS_NEW_METADATA = {
'ccpp_types' : {
'ccpp_types' : '',
'MPI_Comm' : '',
'ccpp_t' : 'cdata',
},
'machine' : {
Expand Down
2 changes: 1 addition & 1 deletion ccpp/framework
Submodule framework updated 102 files
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 34 files
+8 −1 CMakeLists.txt
+1 −8 physics/GWD/cires_tauamf_data.F90
+2 −2 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90
+2 −9 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90
+3 −3 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90
+7 −0 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta
+3 −15 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90
+3 −15 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90
+22 −29 physics/Interstitials/UFS_SCM_NEPTUNE/iccninterp.F90
+13 −2 physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.F90
+3 −3 physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta
+13 −67 physics/Interstitials/UFS_SCM_NEPTUNE/sfcsub.F
+2 −1 physics/MP/Ferrier_Aligo/mp_fer_hires.F90
+1 −1 physics/MP/Ferrier_Aligo/mp_fer_hires.meta
+6 −23 physics/MP/Morrison_Gettelman/aerinterp.F90
+2 −2 physics/MP/NSSL/mp_nssl.F90
+1 −1 physics/MP/NSSL/mp_nssl.meta
+5 −4 physics/MP/Thompson/module_mp_thompson.F90
+3 −2 physics/MP/Thompson/mp_thompson.F90
+2 −2 physics/MP/Thompson/mp_thompson.meta
+2 −1 physics/MP/Thompson/mp_thompson_post.F90
+1 −1 physics/MP/Thompson/mp_thompson_post.meta
+3 −2 physics/Radiation/RRTMGP/rrtmgp_lw_cloud_optics.F90
+3 −2 physics/Radiation/RRTMGP/rrtmgp_lw_gas_optics.F90
+3 −1 physics/Radiation/RRTMGP/rrtmgp_lw_main.F90
+1 −1 physics/Radiation/RRTMGP/rrtmgp_lw_main.meta
+3 −2 physics/Radiation/RRTMGP/rrtmgp_sw_cloud_optics.F90
+3 −2 physics/Radiation/RRTMGP/rrtmgp_sw_gas_optics.F90
+3 −1 physics/Radiation/RRTMGP/rrtmgp_sw_main.F90
+1 −1 physics/Radiation/RRTMGP/rrtmgp_sw_main.meta
+30 −8 physics/Radiation/radiation_clouds.f
+3 −11 physics/photochem/h2ointerp.f90
+2 −1 physics/smoke_dust/rrfs_smoke_wrapper.F90
+1 −1 physics/smoke_dust/rrfs_smoke_wrapper.meta
1 change: 1 addition & 0 deletions scm/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ endif()
# How about using proper compile targets etc?
#------------------------------------------------------------------------------
# Configure sources
set(MPI ON)
ADD_SUBDIRECTORY(${CCPP_FRAMEWORK_SRC} ${CMAKE_BINARY_DIR}/ccpp/framework)
ADD_SUBDIRECTORY(${CCPP_PHYSICS_SRC} ${CMAKE_BINARY_DIR}/ccpp/physics)
ADD_DEPENDENCIES(ccpp_physics ccpp_framework)
Expand Down
39 changes: 13 additions & 26 deletions scm/src/GFS_typedefs.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module GFS_typedefs

use mpi_f08
use machine, only: kind_phys, kind_dbl_prec, kind_sngl_prec

use module_radsw_parameters, only: topfsw_type, sfcfsw_type
Expand Down Expand Up @@ -85,7 +86,7 @@ module GFS_typedefs
type GFS_init_type
integer :: me !< my MPI-rank
integer :: master !< master MPI-rank
integer :: fcst_mpi_comm !< forecast tasks mpi communicator
type(MPI_Comm) :: fcst_mpi_comm !< forecast tasks mpi communicator
integer :: fcst_ntasks !< total number of forecast tasks
integer :: tile_num !< tile number for this MPI rank
integer :: isc !< starting i-index for this MPI-domain
Expand Down Expand Up @@ -693,7 +694,7 @@ module GFS_typedefs

integer :: me !< MPI rank designator
integer :: master !< MPI rank of master atmosphere processor
integer :: communicator !< MPI communicator
type(MPI_Comm) :: communicator !< MPI communicator
integer :: ntasks !< MPI size in communicator
integer :: nthreads !< OpenMP threads available for physics
integer :: nlunit !< unit for namelist
Expand Down Expand Up @@ -1153,6 +1154,7 @@ module GFS_typedefs
logical :: lheatstrg !< flag for canopy heat storage parameterization
logical :: lseaspray !< flag for sea spray parameterization
logical :: cnvcld
logical :: xr_cnvcld !< flag for adding suspended convective clouds to Xu-Randall cloud fraction
logical :: random_clds !< flag controls whether clouds are random
logical :: shal_cnv !< flag for calling shallow convection
logical :: do_deep !< whether to do deep convection
Expand Down Expand Up @@ -2582,7 +2584,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate(Sfcprop%iceprv (IM))
allocate(Sfcprop%snowprv (IM))
allocate(Sfcprop%graupelprv(IM))

Sfcprop%iceprv = clear_val
Sfcprop%snowprv = clear_val
Sfcprop%graupelprv = clear_val
Expand Down Expand Up @@ -3297,7 +3298,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
real(kind=kind_phys), dimension(:), intent(in) :: bk
logical, intent(in) :: restart
logical, intent(in) :: hydrostatic
integer, intent(in) :: communicator
type(MPI_Comm), intent(in) :: communicator
integer, intent(in) :: ntasks
integer, intent(in) :: nthreads

Expand All @@ -3307,9 +3308,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: seed0
logical :: exists
real(kind=kind_phys) :: tem
real(kind=kind_phys) :: rinc(5)
real(kind=kind_sngl_prec) :: rinc4(5)
real(kind=kind_dbl_prec) :: rinc8(5)
real(kind=kind_dbl_prec) :: rinc(5)
real(kind=kind_phys) :: wrk(1)
real(kind=kind_phys), parameter :: con_hr = 3600.

Expand Down Expand Up @@ -3673,6 +3672,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: lheatstrg = .false. !< flag for canopy heat storage parameterization
logical :: lseaspray = .false. !< flag for sea spray parameterization
logical :: cnvcld = .false.
logical :: xr_cnvcld = .true. !< flag for including suspended convective clouds in Xu-Randall cloud fraction
logical :: random_clds = .false. !< flag controls whether clouds are random
logical :: shal_cnv = .false. !< flag for calling shallow convection
integer :: imfshalcnv = 1 !< flag for mass-flux shallow convection scheme
Expand Down Expand Up @@ -3979,7 +3979,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

real(kind=kind_phys) :: radar_tten_limits(2) = (/ limit_unspecified, limit_unspecified /)
integer :: itime
integer :: w3kindreal,w3kindint

!--- END NAMELIST VARIABLES

Expand Down Expand Up @@ -4069,8 +4068,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
hwrf_samfdeep, hwrf_samfshal,progsigma,betascu,betamcu, &
betadcu,h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf,&
shinhong, do_ysu, dspheat, lheatstrg, lseaspray, cnvcld, &
random_clds, shal_cnv, imfshalcnv, imfdeepcnv, isatmedmf, &
do_deep, jcap, &
xr_cnvcld, random_clds, shal_cnv, imfshalcnv, imfdeepcnv, &
isatmedmf, do_deep, jcap, &
cs_parm, flgmin, cgwf, ccwf, cdmbgwd, sup, ctei_rm, crtrh, &
dlqf, rbcr, shoc_parm, psauras, prauras, wminras, &
do_sppt, do_shum, do_skeb, &
Expand Down Expand Up @@ -4949,6 +4948,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%lheatstrg = lheatstrg
Model%lseaspray = lseaspray
Model%cnvcld = cnvcld
Model%xr_cnvcld = xr_cnvcld
Model%random_clds = random_clds
Model%shal_cnv = shal_cnv
Model%imfshalcnv = imfshalcnv
Expand Down Expand Up @@ -5664,19 +5664,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%cdec = -9999.
Model%clstp = -9999
rinc(1:5) = 0
call w3kind(w3kindreal,w3kindint)
if (w3kindreal == 8) then
rinc8(1:5) = 0
call w3difdat(jdat,idat,4,rinc8)
rinc = rinc8
else if (w3kindreal == 4) then
rinc4(1:5) = 0
call w3difdat(jdat,idat,4,rinc4)
rinc = rinc4
else
write(0,*)' FATAL ERROR: Invalid w3kindreal'
call abort
endif
call w3difdat(jdat,idat,4,rinc)
Model%phour = rinc(4)/con_hr
Model%fhour = (rinc(4) + Model%dtp)/con_hr
Model%zhour = mod(Model%phour,Model%fhzero)
Expand Down Expand Up @@ -6251,7 +6239,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
' do_shoc=', Model%do_shoc, ' nshoc3d=', Model%nshoc_3d, &
' nshoc_2d=', Model%nshoc_2d, ' shoc_cld=', Model%shoc_cld, &
' nkbfshoc=', Model%nkbfshoc, ' nahdshoc=', Model%nahdshoc, &
' nscfshoc=', Model%nscfshoc, &
' nscfshoc=', Model%nscfshoc, ' xr_cnvcld=',Model%xr_cnvcld, &
' uni_cld=', Model%uni_cld, &
' ntot3d=', Model%ntot3d, ' ntot2d=', Model%ntot2d, &
' shocaftcnv=',Model%shocaftcnv,' indcld=', Model%indcld, &
Expand Down Expand Up @@ -6474,7 +6462,7 @@ subroutine control_print(Model)
print *, 'basic control parameters'
print *, ' me : ', Model%me
print *, ' master : ', Model%master
print *, ' communicator : ', Model%communicator
print *, ' communicator : ', Model%communicator%mpi_val
print *, ' nlunit : ', Model%nlunit
print *, ' fn_nml : ', trim(Model%fn_nml)
print *, ' fhzero : ', Model%fhzero
Expand Down Expand Up @@ -7192,7 +7180,6 @@ subroutine tbd_create (Tbd, IM, Model)
allocate (Tbd%h2opl (IM,levh2o,h2o_coeff))
Tbd%h2opl = clear_val
Tbd%ozpl = clear_val


!--- ccn and in needs
! DH* allocate only for MG? *DH
Expand Down
14 changes: 10 additions & 4 deletions scm/src/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -3346,7 +3346,7 @@
long_name = MPI communicator
units = index
dimensions = ()
type = integer
type = MPI_Comm
[ntasks]
standard_name = number_of_mpi_tasks
long_name = number of MPI tasks in communicator
Expand Down Expand Up @@ -5424,6 +5424,12 @@
units = flag
dimensions = ()
type = logical
[xr_cnvcld]
standard_name = flag_for_suspended_convective_clouds_in_Xu_Randall
long_name = flag for using suspended convective clouds in Xu Randall
units = flag
dimensions = ()
type = logical
[shal_cnv]
standard_name = flag_for_simplified_arakawa_schubert_shallow_convection
long_name = flag for calling shallow convection
Expand Down Expand Up @@ -10047,7 +10053,7 @@
[ltg1_max]
standard_name = lightning_threat_index_1
long_name = lightning threat index 1
units = flashes 5 min-1
units = flashes min-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
Expand All @@ -10056,7 +10062,7 @@
[ltg2_max]
standard_name = lightning_threat_index_2
long_name = lightning threat index 2
units = flashes 5 min-1
units = flashes min-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
Expand All @@ -10065,7 +10071,7 @@
[ltg3_max]
standard_name = lightning_threat_index_3
long_name = lightning threat index 3
units = flashes 5 min-1
units = flashes min-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
Expand Down

0 comments on commit 0cd476c

Please sign in to comment.