Skip to content

Commit

Permalink
Changes for Capgen in SCM
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Sep 17, 2024
1 parent 967cb1a commit e8b745c
Show file tree
Hide file tree
Showing 13 changed files with 475 additions and 159 deletions.
11 changes: 11 additions & 0 deletions ccpp/config/host_files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ccpp/physics/physics/hooks/machine.f
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/module_ccpp_suite_simulator.F90
ccpp/physics/physics/photochem/h2o_def.f
ccpp/physics/physics/photochem/module_ozphys.F90
ccpp/physics/physics/Radiation/RRTMG/radlw_param.f
ccpp/physics/physics/Radiation/RRTMG/radsw_param.f
scm/src/ccpp_config.F90
scm/src/GFS_typedefs.F90
scm/src/CCPP_typedefs.F90
scm/src/scm_type_defs.F90
scm/src/scm_physical_constants.F90
128 changes: 128 additions & 0 deletions ccpp/config/scheme_files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
ccpp/physics/physics/photochem/module_ozphys.F90
ccpp/physics/physics/Radiation/RRTMG/radlw_param.f
ccpp/physics/physics/Radiation/RRTMG/radsw_param.f
ccpp/physics/physics/hooks/physcons.F90
ccpp/physics/physics/tools/get_prs_fv3.F90
ccpp/physics/physics/tools/get_phi_fv3.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_DCNV_generic_pre.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_DCNV_generic_post.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_GWD_generic_pre.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_GWD_generic_post.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_pre.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_pre.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.scm.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_1.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_2.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_stateout_reset.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_stateout_update.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_5.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_pre.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_pre.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_inter.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_post.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_loop_control_part1.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_loop_control_part2.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_cloud_diagnostics.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_overlap.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/cnvc90.f
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpre.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpost.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_physics_post.F90
ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/scm_sfc_flux_spec.F90
ccpp/physics/physics/Radiation/RRTMG/radlw_main.F90
ccpp/physics/physics/Radiation/RRTMG/radsw_main.F90
ccpp/physics/physics/Radiation/RRTMG/rrtmg_lw_post.F90
ccpp/physics/physics/Radiation/RRTMG/rrtmg_lw_pre.F90
ccpp/physics/physics/Radiation/RRTMG/rrtmg_sw_post.F90
ccpp/physics/physics/Radiation/RRTMG/rad_sw_pre.F90
ccpp/physics/physics/Radiation/RRTMGP/rrtmgp_aerosol_optics.F90
ccpp/physics/physics/Radiation/RRTMGP/rrtmgp_lw_main.F90
ccpp/physics/physics/Radiation/RRTMGP/rrtmgp_sw_main.F90
ccpp/physics/physics/GWD/cires_ugwp.F90
ccpp/physics/physics/GWD/cires_ugwp_post.F90
ccpp/physics/physics/GWD/unified_ugwp.F90
ccpp/physics/physics/GWD/unified_ugwp_post.F90
ccpp/physics/physics/GWD/ugwpv1_gsldrag.F90
ccpp/physics/physics/GWD/ugwpv1_gsldrag_post.F90
ccpp/physics/physics/GWD/drag_suite.F90
ccpp/physics/physics/GWD/gwdc_pre.f
ccpp/physics/physics/GWD/gwdc.f
ccpp/physics/physics/GWD/gwdc_post.f
ccpp/physics/physics/GWD/gwdps.f
ccpp/physics/physics/GWD/rayleigh_damp.f
ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv_pre.F90
ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv.F90
ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv_post.F90
ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv_aw_adj.F90
ccpp/physics/physics/CONV/nTiedtke/cu_ntiedtke_pre.F90
ccpp/physics/physics/CONV/nTiedtke/cu_ntiedtke.F90
ccpp/physics/physics/CONV/nTiedtke/cu_ntiedtke_post.F90
ccpp/physics/physics/CONV/SAMF/samfdeepcnv.f
ccpp/physics/physics/CONV/SAMF/samfshalcnv.f
ccpp/physics/physics/CONV/SAS/sascnvn.F
ccpp/physics/physics/CONV/SAS/shalcnv.F
ccpp/physics/physics/CONV/Grell_Freitas/cu_gf_driver_pre.F90
ccpp/physics/physics/CONV/Grell_Freitas/cu_gf_driver.F90
ccpp/physics/physics/CONV/Grell_Freitas/cu_gf_driver_post.F90
ccpp/physics/physics/CONV/C3/cu_c3_driver_pre.F90
ccpp/physics/physics/CONV/C3/cu_c3_driver.F90
ccpp/physics/physics/CONV/C3/cu_c3_driver_post.F90
ccpp/physics/physics/CONV/RAS/rascnv.F90
ccpp/physics/physics/PBL/SHOC/shoc.F90
ccpp/physics/physics/PBL/HEDMF/hedmf.f
ccpp/physics/physics/PBL/SHOC/moninshoc.f
ccpp/physics/physics/PBL/SATMEDMF/satmedmfvdif.F
ccpp/physics/physics/PBL/SATMEDMF/satmedmfvdifq.F
ccpp/physics/physics/PBL/saYSU/shinhongvdif.F90
ccpp/physics/physics/PBL/YSU/ysuvdif.F90
ccpp/physics/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.F90
ccpp/physics/physics/PBL/MYJ/myjpbl_wrapper.F90
ccpp/physics/physics/MP/GFDL/gfdl_cloud_microphys.F90
ccpp/physics/physics/MP/Zhao_Carr/zhaocarr_gscond.f
ccpp/physics/physics/MP/Zhao_Carr/zhaocarr_precpd.f
ccpp/physics/physics/MP/Morrison_Gettelmanm_micro.F90
ccpp/physics/physics/MP/Morrison_Gettelmanm_micro_pre.F90
ccpp/physics/physics/MP/Morrison_Gettelmanm_micro_post.F90
ccpp/physics/physics/MP/Thompson/mp_thompson_pre.F90
ccpp/physics/physics/MP/Thompson/mp_thompson.F90
ccpp/physics/physics/MP/Thompson/mp_thompson_post.F90
ccpp/physics/physics/MP/NSSL/mp_nssl.F90
ccpp/physics/physics/MP/Ferrier_Aligo/mp_fer_hires.F90
ccpp/physics/physics/SFC_Layer/GFDL/gfdl_sfc_layer.F90
ccpp/physics/physics/SFC_Layer/UFS/sfc_diag.f
ccpp/physics/physics/SFC_Layer/UFS/sfc_diag_post.F90
ccpp/physics/physics/SFC_Layer/MYNN/mynnsfc_wrapper.F90
ccpp/physics/physics/SFC_Layer/MYJ/myjsfc_wrapper.F90
ccpp/physics/physics/SFC_Layer/UFS/sfc_diff.f
ccpp/physics/physics/SFC_Layer/UFS/sfc_nst.f
ccpp/physics/physics/SFC_Layer/UFS/sfc_nst_post.f
ccpp/physics/physics/SFC_Layer/UFS/sfc_nst_pre.f
ccpp/physics/physics/SFC_Models/Land/RUC/lsm_ruc.F90
ccpp/physics/physics/SFC_Models/Land/Noah/lsm_noah.f
ccpp/physics/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90
ccpp/physics/physics/SFC_Models/Ocean/sfc_ocean.F
ccpp/physics/physics/SFC_Models/SeaIce/CICE/sfc_sice.f
ccpp/physics/physics/SFC_Models/SeaIce/CICE/sfc_cice.f
ccpp/physics/physics/SFC_Models/Lake/Flake/flake_driver.F90
ccpp/physics/physics/smoke_dust/rrfs_smoke_wrapper.F90
ccpp/physics/physics/smoke_dust/rrfs_smoke_postpbl.F90
ccpp/physics/physics/photochem/h2ophys.f
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 214 files
2 changes: 0 additions & 2 deletions scm/src/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ module CCPP_typedefs

! type(GFS_interstitial_type) :: GFS_interstitial_type

private

! To ensure that these values match what's in the physics, array
! sizes are compared in the auto-generated physics caps in debug mode
! from module_radiation_aerosols
Expand Down
6 changes: 0 additions & 6 deletions scm/src/CCPP_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2858,12 +2858,6 @@
[ccpp-arg-table]
name = CCPP_typedefs
type = module
#[GFS_interstitial_type]
# standard_name = GFS_interstitial_type
# long_name = definition of type GFS_interstitial_type
# units = DDT
# dimensions = ()
# type = GFS_interstitial_type
[icld_cfrac]
standard_name = index_for_cloud_fraction_in_cloud_data_array
long_name = index for cloud fraction in cloud data array
Expand Down
11 changes: 7 additions & 4 deletions scm/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ get_filename_component(CCPP_ROOT "${TEST_ROOT}" DIRECTORY)
# Paths should be relative to CMAKE_SOURCE_DIR (this file's directory)
#
#------------------------------------------------------------------------------
LIST(APPEND SCHEME_FILES "/home/Dustin.Swales/Projects/framework/capgen/capgen_in_scm/ccpp-scm/scm/bin/scheme_files2.txt")
LIST(APPEND HOST_FILES "/home/Dustin.Swales/Projects/framework/capgen/capgen_in_scm/ccpp-scm/scm/bin/host_files2.txt")
LIST(APPEND SUITE_FILES "/home/Dustin.Swales/Projects/framework/capgen/capgen_in_scm/ccpp-scm/ccpp/suites/suite_SCM_GFS_v16.xml")
LIST(APPEND TYPEDEF_FILES "/home/Dustin.Swales/Projects/framework/capgen/capgen_in_scm/ccpp-scm/scm/bin/typedef_files.txt")
LIST(APPEND SCHEME_FILES "${CCPP_ROOT}/ccpp/config/scheme_files.txt")
LIST(APPEND HOST_FILES "${CCPP_ROOT}/ccpp/config/host_files.txt")
LIST(APPEND SUITE_FILES "${CCPP_ROOT}/ccpp/suites/suite_SCM_GFS_v16.xml")
# HOST is the name of the executable we will build.
# We assume there are files ${HOST}.meta and ${HOST}.F90 in CMAKE_SOURCE_DIR
SET(HOST "${CMAKE_PROJECT_NAME}")
Expand Down Expand Up @@ -257,6 +256,7 @@ endif()

INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/framework/src)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/physics)
include_directories(${MPI_Fortran_INCLUDE_PATH})

#------------------------------------------------------------------------------
# Add required preprocessor flags for build type
Expand All @@ -272,6 +272,9 @@ ADD_DEFINITIONS(-DCCPP)
# Add host-model specific preprocessor flag (needed for some physics schemes)
ADD_DEFINITIONS(-DSCM)

ADD_DEFINITIONS(-DMPI)


#------------------------------------------------------------------------------
# Add model-specific flags for C/C++/Fortran preprocessor
ADD_DEFINITIONS(-DMOIST_CAPPA -DUSE_COND -DNEMS_GSM)
Expand Down
36 changes: 18 additions & 18 deletions scm/src/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1338,143 +1338,143 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[z_c]
standard_name = molecular_sublayer_thickness_in_sea_water
long_name = sub-layer cooling thickness
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[c_0]
standard_name = coefficient_c_0
long_name = coefficient 1 to calculate d(Tz)/d(Ts)
units = none
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[c_d]
standard_name = coefficient_c_d
long_name = coefficient 2 to calculate d(Tz)/d(Ts)
units = none
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[w_0]
standard_name = coefficient_w_0
long_name = coefficient 3 to calculate d(Tz)/d(Ts)
units = none
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[w_d]
standard_name = coefficient_w_d
long_name = coefficient 4 to calculate d(Tz)/d(Ts)
units = none
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[xt]
standard_name = heat_content_in_diurnal_thermocline
long_name = heat content in diurnal thermocline layer
units = K m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[xs]
standard_name = sea_water_salinity_in_diurnal_thermocline
long_name = salinity content in diurnal thermocline layer
units = ppt m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[xu]
standard_name = x_current_in_diurnal_thermocline
long_name = u-current content in diurnal thermocline layer
units = m2 s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[xv]
standard_name = y_current_in_diurnal_thermocline
long_name = v-current content in diurnal thermocline layer
units = m2 s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[xz]
standard_name = diurnal_thermocline_layer_thickness
long_name = diurnal thermocline layer thickness
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[zm]
standard_name = ocean_mixed_layer_thickness
long_name = mixed layer thickness
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[xtts]
standard_name = derivative_of_heat_content_in_diurnal_thermocline_wrt_surface_skin_temperature
long_name = d(xt)/d(ts)
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[xzts]
standard_name = derivative_of_diurnal_thermocline_layer_thickness_wrt_surface_skin_temperature
long_name = d(xz)/d(ts)
units = m K-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[d_conv]
standard_name = free_convection_layer_thickness_in_sea_water
long_name = thickness of free convection layer (FCL)
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[ifd]
standard_name = control_for_diurnal_thermocline_calculation
long_name = index to start dtlm run or not
units = index
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[dt_cool]
standard_name = molecular_sublayer_temperature_correction_in_sea_water
long_name = sub-layer cooling amount
units = K
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[qrain]
standard_name = surface_sensible_heat_due_to_rainfall
long_name = sensible heat flux due to rainfall
units = W
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_nsstm > 0)
active = (index_to_control_for_nsstm > 0)
[snowxy]
standard_name = number_of_snow_layers
long_name = number of snow layers
Expand Down
Loading

0 comments on commit e8b745c

Please sign in to comment.