From b6441477b3807451aee453450943a7f7d1f1d5a4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 18 Sep 2024 15:18:34 +0000 Subject: [PATCH] Address reviewers comments. Additional bug fixes. --- CMakeLists.txt | 25 ++++++++++++------- physics/CONV/Grell_Freitas/cu_gf_driver.meta | 1 + .../UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.meta | 1 + .../GFS_rrtmgp_cloud_overlap.meta | 24 ------------------ .../UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta | 2 -- .../UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta | 1 + physics/MP/NSSL/mp_nssl.meta | 2 +- physics/MP/Thompson/mp_thompson.meta | 6 +++-- physics/Radiation/RRTMG/radlw_param.meta | 2 +- physics/Radiation/RRTMG/radsw_param.meta | 2 +- physics/Radiation/RRTMGP/rrtmgp_lw_main.meta | 1 + physics/Radiation/RRTMGP/rrtmgp_sw_main.meta | 3 ++- physics/smoke_dust/rrfs_smoke_wrapper.meta | 2 +- physics/tools/get_phi_fv3.meta | 2 +- 14 files changed, 31 insertions(+), 43 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 81c5d4cd1..ce1ab6d62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,14 +60,16 @@ endforeach() #------------------------------------------------------------------------------ # Set the sources: kinds file # DJS2024: This file is autogenerated by the framework (Capgen) -set(KINDS $ENV{CCPP_KINDS}) -if(KINDS) - message(STATUS "Got CCPP KINDS from environment variable") -else(KINDS) - include(${CMAKE_CURRENT_BINARY_DIR}/CCPP_KINDS.cmake) - message(STATUS "Got CCPP KINDS from cmakefile include file") -endif(KINDS) -list(REMOVE_DUPLICATES KINDS) +if(CAPGEN) + set(KINDS $ENV{CCPP_KINDS}) + if(KINDS) + message(STATUS "Got CCPP KINDS from environment variable") + else(KINDS) + include(${CMAKE_CURRENT_BINARY_DIR}/CCPP_KINDS.cmake) + message(STATUS "Got CCPP KINDS from cmakefile include file") + endif(KINDS) + list(REMOVE_DUPLICATES KINDS) +endif() # Set the sources: physics schemes set(SCHEMES $ENV{CCPP_SCHEMES}) @@ -181,7 +183,12 @@ endif() #------------------------------------------------------------------------------ -add_library(ccpp_physics STATIC ${KINDS} ${SCHEMES} ${SCHEMES_OPENMP_OFF} ${SCHEMES_DYNAMICS} ${CAPS}) +if(CAPGEN) + add_library(ccpp_physics STATIC ${KINDS} ${SCHEMES} ${SCHEMES_OPENMP_OFF} ${SCHEMES_DYNAMICS} ${CAPS}) +else() + add_library(ccpp_physics STATIC ${SCHEMES} ${SCHEMES_OPENMP_OFF} ${SCHEMES_DYNAMICS} ${CAPS}) +endif() + # Generate list of Fortran modules from defined sources foreach(source_f90 ${CAPS}) get_filename_component(tmp_source_f90 ${source_f90} NAME) diff --git a/physics/CONV/Grell_Freitas/cu_gf_driver.meta b/physics/CONV/Grell_Freitas/cu_gf_driver.meta index 62abff1c7..0e1803f87 100644 --- a/physics/CONV/Grell_Freitas/cu_gf_driver.meta +++ b/physics/CONV/Grell_Freitas/cu_gf_driver.meta @@ -532,6 +532,7 @@ type = real kind = kind_phys intent = in + optional = True [dfi_radar_max_intervals] standard_name = maximum_number_of_radar_derived_temperature_or_convection_suppression_intervals long_name = maximum allowed number of time ranges with radar-derived microphysics temperature tendencies or radar-derived convection suppression diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.meta index 78f58a0bc..49856447f 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.meta @@ -321,6 +321,7 @@ type = real kind = kind_phys intent = in + optional = True [effrin_cldliq] standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle long_name = eff. radius of cloud liquid water particle in micrometer diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_overlap.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_overlap.meta index ca51de9bf..f2f44ccb1 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_overlap.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_overlap.meta @@ -60,30 +60,6 @@ type = real intent = in kind = kind_phys -[p_lev] - standard_name = air_pressure_at_interface_for_RRTMGP - long_name = air pressure at vertical interface for radiation calculation - units = Pa - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - intent = in -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP - long_name = air pressure at vertical layer for radiation calculation - units = Pa - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - intent = in -[tv_lay] - standard_name = virtual_temperature - long_name = layer virtual temperature - units = K - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - intent = in [deltaZc] standard_name = layer_thickness_from_layer_center long_name = layer_thickness diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta index f44329aa7..c0d688d1f 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta @@ -481,7 +481,6 @@ type = real kind = kind_phys intent = inout - optional = True [htrlwc] standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_timestep long_name = longwave clear sky heating rate @@ -490,7 +489,6 @@ type = real kind = kind_phys intent = inout - optional = True [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta index 4622865d9..d08284229 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta @@ -441,6 +441,7 @@ type = real kind = kind_phys intent = inout + optional = True [coszen] standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep long_name = mean cos of zenith angle over rad call period diff --git a/physics/MP/NSSL/mp_nssl.meta b/physics/MP/NSSL/mp_nssl.meta index 63730b0cc..a4730faad 100644 --- a/physics/MP/NSSL/mp_nssl.meta +++ b/physics/MP/NSSL/mp_nssl.meta @@ -68,7 +68,7 @@ long_name = MPI communicator units = index dimensions = () - type = integer + type = MPI_Comm intent = in [qc] standard_name = cloud_liquid_water_mixing_ratio diff --git a/physics/MP/Thompson/mp_thompson.meta b/physics/MP/Thompson/mp_thompson.meta index 6209d68b7..e43874fbd 100644 --- a/physics/MP/Thompson/mp_thompson.meta +++ b/physics/MP/Thompson/mp_thompson.meta @@ -243,7 +243,7 @@ long_name = MPI communicator units = index dimensions = () - type = integer + type = MPI_Comm intent = in [mpirank] standard_name = mpi_rank @@ -662,7 +662,7 @@ long_name = MPI communicator units = index dimensions = () - type = integer + type = MPI_Comm intent = in [mpirank] standard_name = mpi_rank @@ -738,6 +738,7 @@ type = real kind = kind_phys intent = in + optional = True [spp_var_list] standard_name = perturbed_spp_schemes long_name = perturbed spp schemes @@ -755,6 +756,7 @@ type = real kind = kind_phys intent = in + optional = True [cplchm] standard_name = flag_for_chemistry_coupling long_name = flag controlling cplchm collection (default off) diff --git a/physics/Radiation/RRTMG/radlw_param.meta b/physics/Radiation/RRTMG/radlw_param.meta index 8ad489fc7..451cb7daf 100644 --- a/physics/Radiation/RRTMG/radlw_param.meta +++ b/physics/Radiation/RRTMG/radlw_param.meta @@ -35,4 +35,4 @@ [ccpp-arg-table] name = module_radlw_parameters - type = module \ No newline at end of file + type = module diff --git a/physics/Radiation/RRTMG/radsw_param.meta b/physics/Radiation/RRTMG/radsw_param.meta index c9ccfadd5..333a6421a 100644 --- a/physics/Radiation/RRTMG/radsw_param.meta +++ b/physics/Radiation/RRTMG/radsw_param.meta @@ -45,4 +45,4 @@ [ccpp-arg-table] name = module_radsw_parameters - type = module \ No newline at end of file + type = module diff --git a/physics/Radiation/RRTMGP/rrtmgp_lw_main.meta b/physics/Radiation/RRTMGP/rrtmgp_lw_main.meta index fc9c44c53..b5ff9c61e 100644 --- a/physics/Radiation/RRTMGP/rrtmgp_lw_main.meta +++ b/physics/Radiation/RRTMGP/rrtmgp_lw_main.meta @@ -45,6 +45,7 @@ type = character kind = len=* intent = in + optional = True [doGP_cldoptics_PADE] standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE long_name = logical flag to control cloud optics scheme. diff --git a/physics/Radiation/RRTMGP/rrtmgp_sw_main.meta b/physics/Radiation/RRTMGP/rrtmgp_sw_main.meta index b2aa1b016..5549c57a5 100644 --- a/physics/Radiation/RRTMGP/rrtmgp_sw_main.meta +++ b/physics/Radiation/RRTMGP/rrtmgp_sw_main.meta @@ -45,6 +45,7 @@ type = character kind = len=* intent = in + optional = True [doGP_cldoptics_PADE] standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE long_name = logical flag to control cloud optics scheme. @@ -202,7 +203,7 @@ standard_name = number_of_columns_per_RRTMGP_SW_block long_name = number of columns to process at a time by RRTMGP SW scheme units = count - dimensions = () + dimensions = () type = integer intent = in [idx] diff --git a/physics/smoke_dust/rrfs_smoke_wrapper.meta b/physics/smoke_dust/rrfs_smoke_wrapper.meta index 6b41cf5e1..24ffdb818 100755 --- a/physics/smoke_dust/rrfs_smoke_wrapper.meta +++ b/physics/smoke_dust/rrfs_smoke_wrapper.meta @@ -930,7 +930,7 @@ long_name = MPI communicator units = index dimensions = () - type = integer + type = MPI_Comm intent = in [mpirank] standard_name = mpi_rank diff --git a/physics/tools/get_phi_fv3.meta b/physics/tools/get_phi_fv3.meta index 1fbaf98ed..2d30a7bb6 100644 --- a/physics/tools/get_phi_fv3.meta +++ b/physics/tools/get_phi_fv3.meta @@ -3,7 +3,7 @@ name = get_phi_fv3 type = scheme dependencies = ../hooks/machine.F - + ######################################################################## [ccpp-arg-table] name = get_phi_fv3_run