Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physics changes for new ccpp framework (Capgen) #1085

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
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
20 changes: 19 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ foreach(typedef_module ${TYPEDEFS})
endforeach()

#------------------------------------------------------------------------------
# Set the sources: kinds file
# DJS2024: This file is autogenerated by the framework (Capgen)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FYI. I haven't modified the physics to use this autogenerated type yet. The physics schemes still reference physics/hooks/machine.F to access the working precision. In the "post-capgen cleanup phase", I plan to implement the framework autogenerated kinds within the physics

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})
if(SCHEMES)
Expand Down Expand Up @@ -170,7 +183,12 @@ endif()

#------------------------------------------------------------------------------

add_library(ccpp_physics STATIC ${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)
Expand Down
204 changes: 102 additions & 102 deletions physics/CONV/C3/cu_c3_driver.meta
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,6 @@
dimensions = ()
type = integer
intent = in
[mpirank]
standard_name = mpi_rank
long_name = current MPI-rank
units = index
dimensions = ()
type = integer
intent = in
[mpiroot]
standard_name = mpi_root
long_name = master MPI-rank
units = index
dimensions = ()
type = integer
intent = in
[progsigma]
standard_name = do_prognostic_updraft_area_fraction
long_name = flag for prognostic sigma in cumuls scheme
Expand All @@ -64,6 +50,20 @@
dimensions = ()
type = integer
intent = in
[mpirank]
standard_name = mpi_rank
long_name = current MPI-rank
units = index
dimensions = ()
type = integer
intent = in
[mpiroot]
standard_name = mpi_root
long_name = master MPI-rank
units = index
dimensions = ()
type = integer
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down Expand Up @@ -189,6 +189,14 @@
type = real
kind = kind_phys
intent = in
[r_d]
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
[xlv]
standard_name = latent_heat_of_vaporization_of_water_at_0C
long_name = latent heat of evaporation/sublimation
Expand All @@ -205,14 +213,6 @@
type = real
kind = kind_phys
intent = in
[r_d]
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
[forcet]
standard_name = tendency_of_air_temperature_due_to_nonphysics
long_name = temperature tendency due to dynamics only
Expand All @@ -231,6 +231,30 @@
kind = kind_phys
intent = in
optional = True
[phil]
standard_name = geopotential
long_name = layer geopotential
units = m2 s-2
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[delp]
standard_name = air_pressure_difference_between_midlayers
long_name = pres(k) - pres(k+1)
units = Pa
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[raincv]
standard_name = lwe_thickness_of_deep_convective_precipitation_amount
long_name = deep convective rainfall amount on physics timestep
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
[tmf]
standard_name = tendency_of_vertically_diffused_tracer_concentration
long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme
Expand All @@ -257,15 +281,6 @@
kind = kind_phys
intent = in
optional = True
[sigmaout]
standard_name = updraft_area_fraction_updated_by_physics
long_name = convective updraft area fraction updated by physics
units = frac
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = out
optional = True
[betascu]
standard_name = tuning_param_for_shallow_cu
long_name = tuning param for shallow cu in case prognostic closure is used
Expand All @@ -289,30 +304,6 @@
dimensions = ()
type = real
intent = in
[phil]
standard_name = geopotential
long_name = layer geopotential
units = m2 s-2
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[delp]
standard_name = air_pressure_difference_between_midlayers
long_name = pres(k) - pres(k+1)
units = Pa
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[raincv]
standard_name = lwe_thickness_of_deep_convective_precipitation_amount
long_name = deep convective rainfall amount on physics timestep
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
[qv_spechum]
standard_name = specific_humidity_of_new_state
long_name = water vapor specific humidity updated by physics
Expand Down Expand Up @@ -462,6 +453,23 @@
type = real
kind = kind_phys
intent = inout
[ca_deep]
standard_name = cellular_automata_area_fraction_for_deep_convection_from_coupled_process
long_name = fraction of cellular automata for deep convection
units = frac
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = True
[rainevap]
standard_name = physics_field_for_coupling
long_name = physics_field_for_coupling
units = m2 s-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
[pbl]
standard_name = atmosphere_boundary_layer_thickness
long_name = PBL thickness
Expand Down Expand Up @@ -555,16 +563,16 @@
dimensions = ()
type = integer
intent = in
[ntcw]
standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array
long_name = tracer index for cloud condensate (or liquid water)
[ntiw]
standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array
long_name = tracer index for ice water
units = index
dimensions = ()
type = integer
intent = in
[ntiw]
standard_name = index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array
long_name = tracer index for ice water
[ntcw]
standard_name = index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array
long_name = tracer index for cloud condensate (or liquid water)
units = index
dimensions = ()
type = integer
Expand Down Expand Up @@ -604,29 +612,6 @@
dimensions = ()
type = integer
intent = in
[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
units = count
dimensions = ()
type = integer
intent = in
[ldiag3d]
standard_name = flag_for_diagnostics_3D
long_name = flag for 3d diagnostic fields
units = flag
dimensions = ()
type = logical
intent = in
[qci_conv]
standard_name = convective_cloud_condesate_after_rainout
long_name = convective cloud condesate after rainout
units = kg kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
optional = True
[fhour]
standard_name = forecast_time
long_name = current forecast time
Expand All @@ -635,13 +620,6 @@
type = real
kind = kind_phys
intent = in
[do_cap_suppress]
standard_name = flag_for_radar_derived_convection_suppression
long_name = flag for radar-derived convection suppression
units = flag
dimensions = ()
type = logical
intent = in
[fh_dfi_radar]
standard_name = forecast_lead_times_bounding_radar_derived_temperature_or_convection_suppression_intervals
long_name = forecast lead times bounding radar derived temperature or convection suppression intervals
Expand Down Expand Up @@ -673,23 +651,45 @@
kind = kind_phys
intent = in
optional = True
[ca_deep]
standard_name = cellular_automata_area_fraction_for_deep_convection_from_coupled_process
long_name = fraction of cellular automata for deep convection
units = frac
dimensions = (horizontal_loop_extent)
[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
units = count
dimensions = ()
type = integer
intent = in
[ldiag3d]
standard_name = flag_for_diagnostics_3D
long_name = flag for 3d diagnostic fields
units = flag
dimensions = ()
type = logical
intent = in
[qci_conv]
standard_name = convective_cloud_condesate_after_rainout
long_name = convective cloud condesate after rainout
units = kg kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
intent = inout
optional = True
[rainevap]
standard_name = physics_field_for_coupling
long_name = physics_field_for_coupling
units = m2 s-2
dimensions = (horizontal_loop_extent)
[do_cap_suppress]
standard_name = flag_for_radar_derived_convection_suppression
long_name = flag for radar-derived convection suppression
units = flag
dimensions = ()
type = logical
intent = in
[sigmaout]
standard_name = updraft_area_fraction_updated_by_physics
long_name = convective updraft area fraction updated by physics
units = frac
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = out
optional = True
[maxupmf]
standard_name = maximum_convective_updraft_mass_flux
long_name = maximum convective updraft mass flux within a column
Expand Down
Loading
Loading