diff --git a/doc/NamesNotInDictionary.txt b/doc/NamesNotInDictionary.txt index 496c6413..c934e247 100644 --- a/doc/NamesNotInDictionary.txt +++ b/doc/NamesNotInDictionary.txt @@ -1,43 +1,51 @@ ####################### Date/time of when script was run: -2024-09-18 19:06:50.047235 +2024-10-10 14:17:36.423628 ####################### Non-dictionary standard names found in the following metadata files: -------------------------- -atmospheric_physics/tj2016/tj2016_precip.meta +atmospheric_physics/schemes/sima_diagnostics/sima_state_diagnostics.meta - - gas_constant_of_water_vapor - - lwe_large_scale_precipitation_rate_at_surface - - ratio_of_water_vapor_to_dry_air_molecular_weights - - sum_of_sigma_pressure_hybrid_coordinate_a_coefficient_and_sigma_pressure_hybrid_coordinate_b_coefficient + - air_pressure_at_interface + - air_pressure_of_dry_air_at_interface + - ln_air_pressure_at_interface + - ln_air_pressure_of_dry_air_at_interface -------------------------- -atmospheric_physics/tj2016/tj2016_sfc_pbl_hs.meta +atmospheric_physics/schemes/sima_diagnostics/tropopause_diagnostics.meta - - air_pressure_at_interface - - eddy_heat_diffusivity - - eddy_momentum_diffusivity - - gas_constant_of_water_vapor - - ln_air_pressure_at_interface - - pi_constant - - ratio_of_water_vapor_to_dry_air_molecular_weights - - sum_of_sigma_pressure_hybrid_coordinate_a_coefficient_and_sigma_pressure_hybrid_coordinate_b_coefficient - - surface_eastward_wind_stress - - surface_evaporation_rate - - surface_northward_wind_stress - - surface_upward_sensible_heat_flux - - tendency_of_air_temperature_due_to_diabatic_heating - - tendency_of_air_temperature_due_to_vertical_diffusion - - tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water_due_to_vertical_diffusion + - tropopause_air_pressure + - tropopause_air_pressure_from_climatological_method + - tropopause_air_pressure_from_cold_point_method + - tropopause_air_pressure_from_hybrid_stobie_linoz_with_climatological_backup_method + - tropopause_air_pressure_from_lapse_rate_method + - tropopause_air_temperature + - tropopause_air_temperature_from_climatological_method + - tropopause_air_temperature_from_cold_point_method + - tropopause_air_temperature_from_hybrid_stobie_linoz_with_climatological_backup_method + - tropopause_air_temperature_from_lapse_rate_method + - tropopause_geopotential_height_wrt_surface + - tropopause_geopotential_height_wrt_surface_from_climatological_method + - tropopause_geopotential_height_wrt_surface_from_cold_point_method + - tropopause_geopotential_height_wrt_surface_from_hybrid_stobie_linoz_with_climatological_backup_method + - tropopause_geopotential_height_wrt_surface_from_lapse_rate_method + - tropopause_vertical_layer_index + - tropopause_vertical_layer_index_from_climatological_method + - tropopause_vertical_layer_index_from_cold_point_method + - tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method + - tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method_for_chemistry + - tropopause_vertical_layer_index_from_lapse_rate_method + - vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_linearized_ozone_chemistry + - vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_stratospheric_chemistry -------------------------- -atmospheric_physics/dry_adiabatic_adjust/dadadj.meta +atmospheric_physics/schemes/dry_adiabatic_adjust/dadadj.meta - air_pressure_at_interface - binary_indicator_for_dry_adiabatic_adjusted_grid_cell @@ -47,13 +55,59 @@ atmospheric_physics/dry_adiabatic_adjust/dadadj.meta -------------------------- -atmospheric_physics/dry_adiabatic_adjust/dadadj_apply_qv_tendency.meta +atmospheric_physics/schemes/dry_adiabatic_adjust/dadadj_apply_qv_tendency.meta - tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water -------------------------- -atmospheric_physics/zhang_mcfarlane/zm_conv_momtran.meta +atmospheric_physics/schemes/utilities/geopotential_temp.meta + + - air_pressure_at_interface + - ln_air_pressure_at_interface + +-------------------------- + +atmospheric_physics/schemes/tropopause_find/tropopause_find.meta + + - air_pressure_at_interface + - fill_value_for_diagnostic_output + - fractional_calendar_days_on_end_of_current_timestep + - pi_constant + - ratio_of_dry_air_gas_constant_to_specific_heat_of_dry_air_at_constant_pressure + - tropopause_air_pressure + - tropopause_air_pressure_from_chemical_method + - tropopause_air_pressure_from_climatological_method + - tropopause_air_pressure_from_climatology_dataset + - tropopause_air_pressure_from_cold_point_method + - tropopause_air_pressure_from_hybrid_stobie_linoz_with_climatological_backup_method + - tropopause_air_pressure_from_lapse_rate_method + - tropopause_air_temperature + - tropopause_air_temperature_from_chemical_method + - tropopause_air_temperature_from_climatological_method + - tropopause_air_temperature_from_cold_point_method + - tropopause_air_temperature_from_hybrid_stobie_linoz_with_climatological_backup_method + - tropopause_air_temperature_from_lapse_rate_method + - tropopause_calendar_days_from_climatology + - tropopause_geopotential_height_wrt_surface + - tropopause_geopotential_height_wrt_surface_from_chemical_method + - tropopause_geopotential_height_wrt_surface_from_climatological_method + - tropopause_geopotential_height_wrt_surface_from_cold_point_method + - tropopause_geopotential_height_wrt_surface_from_hybrid_stobie_linoz_with_climatological_backup_method + - tropopause_geopotential_height_wrt_surface_from_lapse_rate_method + - tropopause_vertical_layer_index + - tropopause_vertical_layer_index_from_chemical_method + - tropopause_vertical_layer_index_from_climatological_method + - tropopause_vertical_layer_index_from_cold_point_method + - tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method + - tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method_for_chemistry + - tropopause_vertical_layer_index_from_lapse_rate_method + - vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_linearized_ozone_chemistry + - vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_stratospheric_chemistry + +-------------------------- + +atmospheric_physics/schemes/zhang_mcfarlane/zm_conv_momtran.meta - atmosphere_detrainment_convective_mass_flux_for_deep_convection_for_convective_columns - atmosphere_downdraft_convective_mass_flux_for_deep_convection_for_convective_columns @@ -80,33 +134,7 @@ atmospheric_physics/zhang_mcfarlane/zm_conv_momtran.meta -------------------------- -atmospheric_physics/zhang_mcfarlane/zm_conv_evap.meta - - - - - cloud_area_fraction - - flag_for_zhang_mcfarlane_convective_organization_parameterization? - - freezing_point_of_water? - - frozen_precipitation_mass_flux_at_interface_due_to_deep_convection? - - heating_rate - - latent_heat_of_fusion_of_water_at_0c? - - latent_heat_of_vaporization_of_water_at_0c? - - lwe_frozen_precipitation_rate_at_surface_due_to_deep_convection - - lwe_precipitation_rate_at_surface_due_to_deep_convection - - precipitation_mass_flux_at_interface_due_to_deep_convection? - - pressure_thickness - - specific_heat_of_dry_air_at_constant_pressure? - - tendency_of_dry_air_enthalpy_at_constant_pressure_due_to_frozen_precipitation_melt? - - tendency_of_dry_air_enthalpy_at_constant_pressure_due_to_frozen_precipitation_production_in_deep_convection? - - tendency_of_frozen_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection? - - tendency_of_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection? - - tendency_of_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection_excluding_subcloud_evaporation - - tendency_of_water_vapor_mixing_ratio_wrt_moist_air and_condensed_water? - - tunable_evaporation_efficiency_for_land_in_zhang_mcfarlane_deep_convection_scheme? - - tunable_evaporation_efficiency_in_zhang_mcfarlane_deep_convection_scheme? - --------------------------- - -atmospheric_physics/zhang_mcfarlane/zm_convr.meta +atmospheric_physics/schemes/zhang_mcfarlane/zm_convr.meta - air_pressure_at_interface - atmosphere_convective_mass_flux_due_to all_convection? @@ -162,7 +190,7 @@ atmospheric_physics/zhang_mcfarlane/zm_convr.meta -------------------------- -atmospheric_physics/zhang_mcfarlane/zm_conv_convtran.meta +atmospheric_physics/schemes/zhang_mcfarlane/zm_conv_convtran.meta - atmosphere_detrainment_convective_mass_flux_for_deep_convection_for_convective_columns - atmosphere_downdraft_convective_mass_flux_for_deep_convection_for_convective_columns @@ -184,76 +212,57 @@ atmospheric_physics/zhang_mcfarlane/zm_conv_convtran.meta -------------------------- -atmospheric_physics/utilities/geopotential_temp.meta +atmospheric_physics/schemes/zhang_mcfarlane/zm_conv_evap.meta - - air_pressure_at_interface - - ln_air_pressure_at_interface + - + - cloud_area_fraction + - flag_for_zhang_mcfarlane_convective_organization_parameterization? + - freezing_point_of_water? + - frozen_precipitation_mass_flux_at_interface_due_to_deep_convection? + - heating_rate + - latent_heat_of_fusion_of_water_at_0c? + - latent_heat_of_vaporization_of_water_at_0c? + - lwe_frozen_precipitation_rate_at_surface_due_to_deep_convection + - lwe_precipitation_rate_at_surface_due_to_deep_convection + - precipitation_mass_flux_at_interface_due_to_deep_convection? + - pressure_thickness + - specific_heat_of_dry_air_at_constant_pressure? + - tendency_of_dry_air_enthalpy_at_constant_pressure_due_to_frozen_precipitation_melt? + - tendency_of_dry_air_enthalpy_at_constant_pressure_due_to_frozen_precipitation_production_in_deep_convection? + - tendency_of_frozen_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection? + - tendency_of_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection? + - tendency_of_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection_excluding_subcloud_evaporation + - tendency_of_water_vapor_mixing_ratio_wrt_moist_air and_condensed_water? + - tunable_evaporation_efficiency_for_land_in_zhang_mcfarlane_deep_convection_scheme? + - tunable_evaporation_efficiency_in_zhang_mcfarlane_deep_convection_scheme? -------------------------- -atmospheric_physics/cam_diagnostics/tropopause_diagnostics.meta +atmospheric_physics/schemes/tj2016/tj2016_precip.meta - - tropopause_air_pressure - - tropopause_air_pressure_from_climatological_method - - tropopause_air_pressure_from_cold_point_method - - tropopause_air_pressure_from_hybrid_stobie_linoz_with_climatological_backup_method - - tropopause_air_pressure_from_lapse_rate_method - - tropopause_air_temperature - - tropopause_air_temperature_from_climatological_method - - tropopause_air_temperature_from_cold_point_method - - tropopause_air_temperature_from_hybrid_stobie_linoz_with_climatological_backup_method - - tropopause_air_temperature_from_lapse_rate_method - - tropopause_geopotential_height_wrt_surface - - tropopause_geopotential_height_wrt_surface_from_climatological_method - - tropopause_geopotential_height_wrt_surface_from_cold_point_method - - tropopause_geopotential_height_wrt_surface_from_hybrid_stobie_linoz_with_climatological_backup_method - - tropopause_geopotential_height_wrt_surface_from_lapse_rate_method - - tropopause_vertical_layer_index - - tropopause_vertical_layer_index_from_climatological_method - - tropopause_vertical_layer_index_from_cold_point_method - - tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method - - tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method_for_chemistry - - tropopause_vertical_layer_index_from_lapse_rate_method - - vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_linearized_ozone_chemistry - - vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_stratospheric_chemistry + - gas_constant_of_water_vapor + - lwe_large_scale_precipitation_rate_at_surface + - ratio_of_water_vapor_to_dry_air_molecular_weights + - sum_of_sigma_pressure_hybrid_coordinate_a_coefficient_and_sigma_pressure_hybrid_coordinate_b_coefficient -------------------------- -atmospheric_physics/tropopause_find/tropopause_find.meta +atmospheric_physics/schemes/tj2016/tj2016_sfc_pbl_hs.meta - air_pressure_at_interface - - fill_value_for_diagnostic_output - - fractional_calendar_days_on_end_of_current_timestep + - eddy_heat_diffusivity + - eddy_momentum_diffusivity + - gas_constant_of_water_vapor + - ln_air_pressure_at_interface - pi_constant - - ratio_of_dry_air_gas_constant_to_specific_heat_of_dry_air_at_constant_pressure - - tropopause_air_pressure - - tropopause_air_pressure_from_chemical_method - - tropopause_air_pressure_from_climatological_method - - tropopause_air_pressure_from_climatology_dataset - - tropopause_air_pressure_from_cold_point_method - - tropopause_air_pressure_from_hybrid_stobie_linoz_with_climatological_backup_method - - tropopause_air_pressure_from_lapse_rate_method - - tropopause_air_temperature - - tropopause_air_temperature_from_chemical_method - - tropopause_air_temperature_from_climatological_method - - tropopause_air_temperature_from_cold_point_method - - tropopause_air_temperature_from_hybrid_stobie_linoz_with_climatological_backup_method - - tropopause_air_temperature_from_lapse_rate_method - - tropopause_calendar_days_from_climatology - - tropopause_geopotential_height_wrt_surface - - tropopause_geopotential_height_wrt_surface_from_chemical_method - - tropopause_geopotential_height_wrt_surface_from_climatological_method - - tropopause_geopotential_height_wrt_surface_from_cold_point_method - - tropopause_geopotential_height_wrt_surface_from_hybrid_stobie_linoz_with_climatological_backup_method - - tropopause_geopotential_height_wrt_surface_from_lapse_rate_method - - tropopause_vertical_layer_index - - tropopause_vertical_layer_index_from_chemical_method - - tropopause_vertical_layer_index_from_climatological_method - - tropopause_vertical_layer_index_from_cold_point_method - - tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method - - tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method_for_chemistry - - tropopause_vertical_layer_index_from_lapse_rate_method - - vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_linearized_ozone_chemistry - - vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_stratospheric_chemistry + - ratio_of_water_vapor_to_dry_air_molecular_weights + - sum_of_sigma_pressure_hybrid_coordinate_a_coefficient_and_sigma_pressure_hybrid_coordinate_b_coefficient + - surface_eastward_wind_stress + - surface_evaporation_rate + - surface_northward_wind_stress + - surface_upward_sensible_heat_flux + - tendency_of_air_temperature_due_to_diabatic_heating + - tendency_of_air_temperature_due_to_vertical_diffusion + - tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water_due_to_vertical_diffusion ####################### diff --git a/schemes/sima_diagnostics/kessler_diagnostics.F90 b/schemes/sima_diagnostics/kessler_diagnostics.F90 new file mode 100644 index 00000000..2d343ad8 --- /dev/null +++ b/schemes/sima_diagnostics/kessler_diagnostics.F90 @@ -0,0 +1,58 @@ +module kessler_diagnostics +! +! Diagnostics for use by the Kessler physics suite only +! + + use ccpp_kinds, only: kind_phys + + implicit none + private + save + + public :: kessler_diagnostics_init ! init routine + public :: kessler_diagnostics_run ! main routine + +CONTAINS + + !> \section arg_table_kessler_diagnostics_init Argument Table + !! \htmlinclude kessler_diagnostics_init.html + subroutine kessler_diagnostics_init(errmsg, errflg) + use cam_history, only: history_add_field + use cam_history_support, only: horiz_only + + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables: + + errmsg = '' + errflg = 0 + + call history_add_field('PRECT', 'total_precipitation_rate_at_surface', horiz_only, 'avg', 'm s-1') + + end subroutine kessler_diagnostics_init + + !> \section arg_table_kessler_diagnostics_run Argument Table + !! \htmlinclude kessler_diagnostics_run.html + subroutine kessler_diagnostics_run(precl, errmsg, errflg) + + use cam_history, only: history_out_field + !------------------------------------------------ + ! Input / output parameters + !------------------------------------------------ + ! State variables + real(kind_phys), intent(in) :: precl(:) ! Total precipitation + ! CCPP error handling variables + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg + + errmsg = '' + errflg = 0 + + call history_out_field('PRECT', precl) + + end subroutine kessler_diagnostics_run + + !======================================================================= + +end module kessler_diagnostics diff --git a/schemes/sima_diagnostics/kessler_diagnostics.meta b/schemes/sima_diagnostics/kessler_diagnostics.meta new file mode 100644 index 00000000..63e889ff --- /dev/null +++ b/schemes/sima_diagnostics/kessler_diagnostics.meta @@ -0,0 +1,41 @@ +[ccpp-table-properties] + name = kessler_diagnostics + type = scheme + +[ccpp-arg-table] + name = kessler_diagnostics_init + type = scheme +[ errmsg ] + standard_name = ccpp_error_message + units = none + type = character | kind = len=512 + dimensions = () + intent = out +[ errflg ] + standard_name = ccpp_error_code + units = 1 + type = integer + dimensions = () + intent = out + +[ccpp-arg-table] + name = kessler_diagnostics_run + type = scheme +[ precl ] + standard_name = total_precipitation_rate_at_surface + units = m s-1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent) + intent = in +[ errmsg ] + standard_name = ccpp_error_message + units = none + type = character | kind = len=512 + dimensions = () + intent = out +[ errflg ] + standard_name = ccpp_error_code + units = 1 + type = integer + dimensions = () + intent = out diff --git a/schemes/sima_diagnostics/scheme_diagnostics_template.F90 b/schemes/sima_diagnostics/scheme_diagnostics_template.F90 new file mode 100644 index 00000000..a00a2d86 --- /dev/null +++ b/schemes/sima_diagnostics/scheme_diagnostics_template.F90 @@ -0,0 +1,78 @@ +module SCHEME_diagnostics +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! +! THIS IS A TEMPLATE +! 1. copy this file to a new file with the correct name +! (SCHEME_diagnostics.F90) +! 2. do a search and replace for "SCHEME" in this file and +! replace with your scheme name +! 3. Add desired history_add_field calls to the init phase +! 4. Add all fields that are being output as inputs to the run phase +! 5. Add desired history_out_field calls to the run phase +! 6. Run $ccpp_framework/scripts/ccpp_fortran_to_metadata.py on this .F90 +! file to generate the metadata +! 7. Complete the metadata (fill out standard names, units, dimensions) +! 8. Add this scheme to the SDF file for your suite (likely will be at end) +! 9. Delete this header section +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + use ccpp_kinds, only: kind_phys + + implicit none + private + save + + public :: SCHEME_diagnostics_init ! init routine + public :: SCHEME_diagnostics_run ! main routine + +CONTAINS + + !> \section arg_table_SCHEME_diagnostics_init Argument Table + !! \htmlinclude SCHEME_diagnostics_init.html + subroutine SCHEME_diagnostics_init(errmsg, errflg) + use cam_history, only: history_add_field + use cam_history_support, only: horiz_only + + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables: + + errmsg = '' + errflg = 0 + + ! History add field calls + ! Example: + ! call history_add_field('TESTDIAG', 'not_a_real_diagnostic_field', horiz_only, 'avg', 'gremlin s-1') + + end subroutine SCHEME_diagnostics_init + + !> \section arg_table_SCHEME_diagnostics_run Argument Table + !! \htmlinclude SCHEME_diagnostics_run.html + subroutine SCHEME_diagnostics_run(list, of, fields, errmsg, errflg) + + use cam_history, only: history_out_field + !------------------------------------------------ + ! Input / output parameters + !------------------------------------------------ + ! State variables + real(kind_phys), intent(in) :: list(:,:) + real(kind_phys), intent(in) :: of(:) + real(kind_phys), intent(in) :: fields(:,:) + ! CCPP error handling variables + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg + + errmsg = '' + errflg = 0 + + ! History out field calls + ! Example: + ! call history_out_field('TESTDIAG', of) + + end subroutine SCHEME_diagnostics_run + + !======================================================================= + +end module SCHEME_diagnostics diff --git a/schemes/sima_diagnostics/sima_state_diagnostics.F90 b/schemes/sima_diagnostics/sima_state_diagnostics.F90 new file mode 100644 index 00000000..42786f07 --- /dev/null +++ b/schemes/sima_diagnostics/sima_state_diagnostics.F90 @@ -0,0 +1,180 @@ +module sima_state_diagnostics + + use ccpp_kinds, only: kind_phys + use ccpp_constituent_prop_mod, only: ccpp_constituent_prop_ptr_t + + implicit none + private + save + + public :: sima_state_diagnostics_init ! init routine + public :: sima_state_diagnostics_run ! main routine + + character(len=65) :: const_std_names(6) = & + (/'water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water ', & + 'cloud_liquid_water_mixing_ratio_wrt_moist_air_and_condensed_water', & + 'rain_mixing_ratio_wrt_moist_air_and_condensed_water ', & + 'cloud_ice_mixing_ratio_wrt_moist_air_and_condensed_water ', & + 'snow_mixing_ratio_wrt_moist_air_and_condensed_water ', & + 'graupel_water_mixing_ratio_wrt_moist_air_and_condensed_water '/) + + character(len=6) :: const_diag_names(6) = (/'Q ', & + 'CLDLIQ', & + 'RAINQM', & + 'CLDICE', & + 'SNOWQM', & + 'GRAUQM'/) + +CONTAINS + + !> \section arg_table_sima_state_diagnostics_init Argument Table + !! \htmlinclude sima_state_diagnostics_init.html + subroutine sima_state_diagnostics_init(const_props, errmsg, errflg) + use cam_history, only: history_add_field + use cam_history_support, only: horiz_only + + type(ccpp_constituent_prop_ptr_t), intent(in) :: const_props(:) + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables: + + integer :: const_idx, name_idx + integer :: const_num_found + character(len=512) :: standard_name + + errmsg = '' + errflg = 0 + + ! Add state fields + call history_add_field('PS', 'surface_pressure', horiz_only, 'avg', 'Pa') + call history_add_field('PSDRY', 'surface_pressure_of_dry_air', horiz_only, 'avg', 'Pa') + call history_add_field('PHIS', 'surface_geopotential', horiz_only, 'lst', 'Pa') + call history_add_field('T', 'air_temperature', 'lev', 'avg', 'K') + call history_add_field('U', 'eastward_wind', 'lev', 'avg', 'm s-1') + call history_add_field('V', 'northward_wind', 'lev', 'avg', 'm s-1') + call history_add_field('DSE', 'dry_static_energy', 'lev', 'avg', 'm s-1') + call history_add_field('OMEGA', 'lagrangian_tendency_of_air_pressure', 'lev', 'avg', 'Pa s-1') + call history_add_field('PMID', 'air_pressure', 'lev', 'avg', 'Pa') + call history_add_field('PMIDDRY', 'air_pressure_of_dry_air', 'lev', 'avg', 'Pa') + call history_add_field('PDEL', 'air_pressure_thickness', 'lev', 'avg', 'Pa') + call history_add_field('PDELDRY', 'air_pressure_thickness_of_dry_air', 'lev', 'avg', 'Pa') + call history_add_field('RPDEL', 'reciprocal_of_air_pressure_thickness', 'lev', 'avg', 'Pa-1') + call history_add_field('RPDELDRY', 'reciprocal_of_air_pressure_thickness_of_dry_air', 'lev', 'avg', 'Pa-1') + call history_add_field('LNPMID', 'ln_air_pressure', 'lev', 'avg', '1') + call history_add_field('LNPMIDDRY', 'ln_air_pressure_of_dry_air', 'lev', 'avg', '1') + call history_add_field('EXNER', 'reciprocal_of_dimensionless_exner_function_wrt_surface_air_pressure','lev', 'avg', '1') + call history_add_field('ZM', 'geopotential_height_wrt_surface', 'lev', 'avg', 'm') + call history_add_field('PINT', 'air_pressure_at_interfaces', 'ilev', 'avg', 'Pa') + call history_add_field('PINTDRY', 'air_pressure_of_dry_air_at_interfaces', 'ilev', 'avg', 'Pa') + call history_add_field('LNPINT', 'ln_air_pressure_at_interfaces', 'ilev', 'avg', '1') + call history_add_field('LNPINTDRY', 'ln_air_pressure_of_dry_air_at_interfaces', 'ilev', 'avg', '1') + call history_add_field('ZI', 'geopotential_height_wrt_surface_at_interfaces', 'ilev', 'avg', 'm') + ! Add constituent fields + const_num_found = 0 + do const_idx = 1, size(const_props) + call const_props(const_idx)%standard_name(standard_name, errflg, errmsg) + do name_idx = 1, size(const_std_names) + if (trim(standard_name) == trim(const_std_names(name_idx))) then + call history_add_field(trim(const_diag_names(name_idx)), trim(const_std_names(name_idx)), 'lev', 'avg', 'kg kg-1', mixing_ratio='wet') + const_num_found = const_num_found + 1 + end if + end do + if (const_num_found == size(const_std_names)) then + exit + end if + end do + + end subroutine sima_state_diagnostics_init + + !> \section arg_table_sima_state_diagnostics_run Argument Table + !! \htmlinclude sima_state_diagnostics_run.html + subroutine sima_state_diagnostics_run(ps, psdry, phis, T, u, v, dse, omega, & + pmid, pmiddry, pdel, pdeldry, rpdel, rpdeldry, lnpmid, lnpmiddry, & + inv_exner, zm, pint, pintdry, lnpint, lnpintdry, zi, const_array, & + const_props, errmsg, errflg) + + use cam_history, only: history_out_field + !------------------------------------------------ + ! Input / output parameters + !------------------------------------------------ + ! State variables + real(kind_phys), intent(in) :: ps(:) ! surface pressure + real(kind_phys), intent(in) :: psdry(:) ! surface pressure of dry air + real(kind_phys), intent(in) :: phis(:) ! surface geopotential + real(kind_phys), intent(in) :: T(:,:) ! air temperature + real(kind_phys), intent(in) :: u(:,:) ! eastward wind (x wind) + real(kind_phys), intent(in) :: v(:,:) ! northward wind (y wind) + real(kind_phys), intent(in) :: dse(:,:) ! dry static energy + real(kind_phys), intent(in) :: omega(:,:) ! lagrangian tendency of air pressure + real(kind_phys), intent(in) :: pmid(:,:) ! air pressure + real(kind_phys), intent(in) :: pmiddry(:,:) ! air pressure of dry air + real(kind_phys), intent(in) :: pdel(:,:) ! air pressure thickness + real(kind_phys), intent(in) :: pdeldry(:,:) ! air pressure thickness of dry air + real(kind_phys), intent(in) :: rpdel(:,:) ! reciprocal of air pressure thickness + real(kind_phys), intent(in) :: rpdeldry(:,:) ! reciprocal of air pressure thickness of dry air + real(kind_phys), intent(in) :: lnpmid(:,:) ! ln air pressure + real(kind_phys), intent(in) :: lnpmiddry(:,:) ! ln air pressure of dry air + real(kind_phys), intent(in) :: inv_exner(:,:) ! inverse exner function wrt surface pressure + real(kind_phys), intent(in) :: zm(:,:) ! geopotential height wrt surface + real(kind_phys), intent(in) :: pint(:,:) ! air pressure at interfaces + real(kind_phys), intent(in) :: pintdry(:,:) ! air pressure of dry air at interfaces + real(kind_phys), intent(in) :: lnpint(:,:) ! ln air pressure at interfaces + real(kind_phys), intent(in) :: lnpintdry(:,:) ! ln air pressure of dry air at interfaces + real(kind_phys), intent(in) :: zi(:,:) ! geopotential height wrt surface at interfaces + ! Constituent variables + real(kind_phys), intent(in) :: const_array(:,:,:) + type(ccpp_constituent_prop_ptr_t), intent(in) :: const_props(:) + ! CCPP error handling variables + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg + + character(len=512) :: standard_name + integer :: const_idx, name_idx + integer :: const_num_found + + errmsg = '' + errflg = 0 + + ! Capture state fields + call history_out_field('PS' , ps) + call history_out_field('PSDRY' , psdry) + call history_out_field('PHIS' , phis) + call history_out_field('T' , T) + call history_out_field('U' , u) + call history_out_field('V' , v) + call history_out_field('DSE' , dse) + call history_out_field('OMEGA' , omega) + call history_out_field('PMID' , pmid) + call history_out_field('PMIDDRY' , pmiddry) + call history_out_field('PDEL' , pdel) + call history_out_field('PDELDRY' , pdeldry) + call history_out_field('RPDEL' , rpdel) + call history_out_field('RPDELDRY' , rpdeldry) + call history_out_field('LNPMID' , lnpmid) + call history_out_field('LNPMIDDRY', lnpmiddry) + call history_out_field('EXNER' , inv_exner) + call history_out_field('ZM' , zm) + call history_out_field('PINT' , pint) + call history_out_field('PINTDRY' , pintdry) + call history_out_field('LNPINT' , lnpint) + call history_out_field('LNPINTDRY', lnpintdry) + call history_out_field('ZI' , zi) + + ! Capture constituent fields + const_num_found = 0 + do const_idx = 1, size(const_props) + call const_props(const_idx)%standard_name(standard_name, errflg, errmsg) + do name_idx = 1, size(const_std_names) + if (trim(standard_name) == trim(const_std_names(name_idx))) then + call history_out_field(trim(const_diag_names(name_idx)), const_array(:,:,const_idx)) + const_num_found = const_num_found + 1 + end if + end do + if (const_num_found == size(const_std_names)) then + exit + end if + end do + + end subroutine sima_state_diagnostics_run +end module sima_state_diagnostics diff --git a/schemes/sima_diagnostics/sima_state_diagnostics.meta b/schemes/sima_diagnostics/sima_state_diagnostics.meta new file mode 100644 index 00000000..b847f9d8 --- /dev/null +++ b/schemes/sima_diagnostics/sima_state_diagnostics.meta @@ -0,0 +1,191 @@ +[ccpp-table-properties] + name = sima_state_diagnostics + type = scheme + +[ccpp-arg-table] + name = sima_state_diagnostics_init + type = scheme +[ const_props ] + standard_name = ccpp_constituent_properties + units = None + type = ccpp_constituent_prop_ptr_t + dimensions = (number_of_ccpp_constituents) + intent = in +[ errmsg ] + standard_name = ccpp_error_message + units = none + type = character | kind = len=512 + dimensions = () + intent = out +[ errflg ] + standard_name = ccpp_error_code + units = 1 + type = integer + dimensions = () + intent = out + +[ccpp-arg-table] + name = sima_state_diagnostics_run + type = scheme +[ ps ] + standard_name = surface_air_pressure + units = Pa + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent) + intent = in +[ psdry ] + standard_name = surface_pressure_of_dry_air + units = Pa + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent) + intent = in +[ phis ] + standard_name = surface_geopotential + units = m2 s-2 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent) + intent = in +[ T ] + standard_name = air_temperature + units = K + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ u ] + standard_name = eastward_wind + units = m s-1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ v ] + standard_name = northward_wind + units = m s-1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ dse ] + standard_name = dry_static_energy + units = J kg-1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ omega ] + standard_name = lagrangian_tendency_of_air_pressure + units = Pa s-1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ pmid ] + standard_name = air_pressure + units = Pa + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ pmiddry ] + standard_name = air_pressure_of_dry_air + units = Pa + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ pdel ] + standard_name = air_pressure_thickness + units = Pa + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ pdeldry ] + standard_name = air_pressure_thickness_of_dry_air + units = Pa + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ rpdel ] + standard_name = reciprocal_of_air_pressure_thickness + units = Pa-1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ rpdeldry ] + standard_name = reciprocal_of_air_pressure_thickness_of_dry_air + units = Pa-1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ lnpmid ] + standard_name = ln_air_pressure + units = 1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ lnpmiddry ] + standard_name = ln_air_pressure_of_dry_air + units = 1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ inv_exner ] + standard_name = reciprocal_of_dimensionless_exner_function_wrt_surface_air_pressure + units = 1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ zm ] + standard_name = geopotential_height_wrt_surface + units = m + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ pint ] + standard_name = air_pressure_at_interface + units = Pa + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_interface_dimension) + intent = in +[ pintdry ] + standard_name = air_pressure_of_dry_air_at_interface + units = Pa + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_interface_dimension) + intent = in +[ lnpint ] + standard_name = ln_air_pressure_at_interface + units = 1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_interface_dimension) + intent = in +[ lnpintdry ] + standard_name = ln_air_pressure_of_dry_air_at_interface + units = 1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_interface_dimension) + intent = in +[ zi ] + standard_name = geopotential_height_wrt_surface_at_interface + units = m + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_interface_dimension) + intent = in +[ const_array ] + standard_name = ccpp_constituents + units = none + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension, number_of_ccpp_constituents) + intent = in +[ const_props ] + standard_name = ccpp_constituent_properties + units = None + type = ccpp_constituent_prop_ptr_t + dimensions = (number_of_ccpp_constituents) + intent = in +[ errmsg ] + standard_name = ccpp_error_message + units = none + type = character | kind = len=512 + dimensions = () + intent = out +[ errflg ] + standard_name = ccpp_error_code + units = 1 + type = integer + dimensions = () + intent = out diff --git a/schemes/sima_diagnostics/sima_tend_diagnostics.F90 b/schemes/sima_diagnostics/sima_tend_diagnostics.F90 new file mode 100644 index 00000000..c5b1d240 --- /dev/null +++ b/schemes/sima_diagnostics/sima_tend_diagnostics.F90 @@ -0,0 +1,48 @@ +module sima_tend_diagnostics + + use ccpp_kinds, only: kind_phys + use ccpp_constituent_prop_mod, only: ccpp_constituent_prop_ptr_t + + implicit none + private + save + + public :: sima_tend_diagnostics_init ! init routine + public :: sima_tend_diagnostics_run ! main routine + + +CONTAINS + + !> \section arg_table_sima_tend_diagnostics_init Argument Table + !! \htmlinclude sima_tend_diagnostics_init.html + subroutine sima_tend_diagnostics_init(errmsg, errflg) + use cam_history, only: history_add_field + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Add tendency fields + call history_add_field('TTEND', 'tendency_of_air_temperature_due_to_model_physics', 'lev', 'avg', 'K s-1') + call history_add_field('UTEND', 'tendency_of_eastward_wind_due_to_model_physics', 'lev', 'avg', 'm s-2') + call history_add_field('VTEND', 'tendency_of_northward_wind_due_to_model_physics', 'lev', 'avg', 'm s-2') + + end subroutine sima_tend_diagnostics_init + + !> \section arg_table_sima_tend_diagnostics_run Argument Table + !! \htmlinclude sima_tend_diagnostics_run.html + subroutine sima_tend_diagnostics_run(dTdt_total, dudt_total, dvdt_total, errmsg, errflg) + use cam_history, only: history_out_field + ! Tendency variables + real(kind_phys), intent(in) :: dTdt_total(:,:) ! tendency of air temperature due to model physics + real(kind_phys), intent(in) :: dudt_total(:,:) ! tendency of eastward wind due to model physics + real(kind_phys), intent(in) :: dvdt_total(:,:) ! tendency of northward wind due to model physics + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Capture tendency fields + call history_out_field('TTEND', dTdt_total) + call history_out_field('UTEND', dudt_total) + call history_out_field('VTEND', dvdt_total) + + end subroutine sima_tend_diagnostics_run + !======================================================================= +end module sima_tend_diagnostics diff --git a/schemes/sima_diagnostics/sima_tend_diagnostics.meta b/schemes/sima_diagnostics/sima_tend_diagnostics.meta new file mode 100644 index 00000000..8d52f565 --- /dev/null +++ b/schemes/sima_diagnostics/sima_tend_diagnostics.meta @@ -0,0 +1,53 @@ +[ccpp-table-properties] + name = sima_tend_diagnostics + type = scheme + +[ccpp-arg-table] + name = sima_tend_diagnostics_init + type = scheme +[ errmsg ] + standard_name = ccpp_error_message + units = none + type = character | kind = len=512 + dimensions = () + intent = out +[ errflg ] + standard_name = ccpp_error_code + units = 1 + type = integer + dimensions = () + intent = out + +[ccpp-arg-table] + name = sima_tend_diagnostics_run + type = scheme +[ dTdt_total ] + standard_name = tendency_of_air_temperature_due_to_model_physics + units = K s-1 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ dudt_total ] + standard_name = tendency_of_eastward_wind_due_to_model_physics + units = m s-2 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ dvdt_total ] + standard_name = tendency_of_northward_wind_due_to_model_physics + units = m s-2 + type = real | kind = kind_phys + dimensions = (horizontal_loop_extent, vertical_layer_dimension) + intent = in +[ errmsg ] + standard_name = ccpp_error_message + units = none + type = character | kind = len=512 + dimensions = () + intent = out +[ errflg ] + standard_name = ccpp_error_code + units = 1 + type = integer + dimensions = () + intent = out diff --git a/schemes/cam_diagnostics/tropopause_diagnostics.F90 b/schemes/sima_diagnostics/tropopause_diagnostics.F90 similarity index 100% rename from schemes/cam_diagnostics/tropopause_diagnostics.F90 rename to schemes/sima_diagnostics/tropopause_diagnostics.F90 diff --git a/schemes/cam_diagnostics/tropopause_diagnostics.meta b/schemes/sima_diagnostics/tropopause_diagnostics.meta similarity index 100% rename from schemes/cam_diagnostics/tropopause_diagnostics.meta rename to schemes/sima_diagnostics/tropopause_diagnostics.meta diff --git a/suites/suite_cam7.xml b/suites/suite_cam7.xml index 5fea991f..1bacbe94 100644 --- a/suites/suite_cam7.xml +++ b/suites/suite_cam7.xml @@ -8,6 +8,8 @@ apply_heating_rate qneg geopotential_temp + + sima_state_diagnostics @@ -15,5 +17,7 @@ tropopause_find tropopause_diagnostics + + sima_tend_diagnostics diff --git a/suites/suite_held_suarez_1994.xml b/suites/suite_held_suarez_1994.xml index 315ade58..83d3d63a 100644 --- a/suites/suite_held_suarez_1994.xml +++ b/suites/suite_held_suarez_1994.xml @@ -7,5 +7,9 @@ apply_tendency_of_northward_wind apply_heating_rate geopotential_temp + sima_state_diagnostics + + + sima_tend_diagnostics diff --git a/suites/suite_kessler.xml b/suites/suite_kessler.xml index 20a1bf94..d8d58adb 100644 --- a/suites/suite_kessler.xml +++ b/suites/suite_kessler.xml @@ -16,5 +16,10 @@ kessler_update qneg geopotential_temp + sima_state_diagnostics + kessler_diagnostics + + + sima_tend_diagnostics diff --git a/suites/suite_tj2016.xml b/suites/suite_tj2016.xml index dcda5bbe..8aa50be6 100644 --- a/suites/suite_tj2016.xml +++ b/suites/suite_tj2016.xml @@ -5,6 +5,7 @@ tj2016_precip apply_heating_rate qneg + sima_state_diagnostics tj2016_sfc_pbl_hs @@ -12,6 +13,7 @@ apply_tendency_of_eastward_wind apply_tendency_of_northward_wind qneg + sima_tend_diagnostics