From cc42526c18763b467e3ab67a5c98d8ff2b40bd39 Mon Sep 17 00:00:00 2001 From: Courtney Peverley Date: Thu, 11 Jul 2024 11:02:06 -0600 Subject: [PATCH 01/10] add cam diagnostics scheme(s) --- cam_diagnostics/cam_diagnostics.F90 | 199 ++++++++++++++++++ cam_diagnostics/cam_diagnostics.meta | 245 +++++++++++++++++++++++ cam_diagnostics/kessler_diagnostics.F90 | 56 ++++++ cam_diagnostics/kessler_diagnostics.meta | 41 ++++ suite_held_suarez_1994.xml | 4 + suite_kessler.xml | 5 + suite_tj2016.xml | 2 + 7 files changed, 552 insertions(+) create mode 100644 cam_diagnostics/cam_diagnostics.F90 create mode 100644 cam_diagnostics/cam_diagnostics.meta create mode 100644 cam_diagnostics/kessler_diagnostics.F90 create mode 100644 cam_diagnostics/kessler_diagnostics.meta diff --git a/cam_diagnostics/cam_diagnostics.F90 b/cam_diagnostics/cam_diagnostics.F90 new file mode 100644 index 00000000..054c1d91 --- /dev/null +++ b/cam_diagnostics/cam_diagnostics.F90 @@ -0,0 +1,199 @@ +module cam_diagnostics + + use ccpp_kinds, only: kind_phys + use ccpp_constituent_prop_mod, only: ccpp_constituent_prop_ptr_t + + implicit none + private + save + + public :: cam_state_diagnostics_init ! init routine + public :: cam_state_diagnostics_run ! main routine + public :: cam_tend_diagnostics_init ! init routine + public :: cam_tend_diagnostics_run ! main routine + + character(len=65) :: const_std_names(4) = & + (/'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 '/) + + character(len=6) :: const_diag_names(4) = (/'Q ', & + 'CLDLIQ', & + 'CLDICE', & + 'RAINQM'/) + +CONTAINS + + !> \section arg_table_cam_state_diagnostics_init Argument Table + !! \htmlinclude cam_state_diagnostics_init.html + subroutine cam_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 + 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', 'inverse_exner_function_wrt_surface_pressure', 'lev', 'avg', '1') + call history_add_field('ZM', 'geopotential_height_wrt_surface', 'lev', 'avg', 'm') + call history_add_field('PINT', 'air_pressure_at_interface', 'ilev', 'avg', 'Pa') + call history_add_field('PINTDRY', 'air_pressure_of_dry_air_at_interface', 'ilev', 'avg', 'Pa') + call history_add_field('LNPINT', 'ln_air_pressure_at_interface', 'ilev', 'avg', '1') + call history_add_field('LNPINTDRY', 'ln_air_pressure_of_dry_air_at_interface', 'ilev', 'avg', '1') + call history_add_field('ZI', 'geopotential_heigh_wrt_surface_at_interface', 'ilev', 'avg', 'm') + ! Add constituent fields + 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') + end if + end do + end do + + end subroutine cam_state_diagnostics_init + + !> \section arg_table_cam_state_diagnostics_run Argument Table + !! \htmlinclude cam_state_diagnostics_run.html + subroutine cam_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 interface + real(kind_phys), intent(in) :: pintdry(:,:) ! air pressure of dry air at interface + real(kind_phys), intent(in) :: lnpint(:,:) ! ln air pressure at interface + real(kind_phys), intent(in) :: lnpintdry(:,:) ! ln air pressure of dry air at interface + real(kind_phys), intent(in) :: zi(:,:) ! geopotential height wrt surface at interface + ! 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=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + character(len=512) :: standard_name + integer :: const_idx, name_idx + + 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 + 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)) + end if + end do + end do + + end subroutine cam_state_diagnostics_run + + !> \section arg_table_cam_tend_diagnostics_init Argument Table + !! \htmlinclude cam_tend_diagnostics_init.html + subroutine cam_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 cam_tend_diagnostics_init + + !> \section arg_table_cam_tend_diagnostics_run Argument Table + !! \htmlinclude cam_tend_diagnostics_run.html + subroutine cam_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 cam_tend_diagnostics_run + !======================================================================= +end module cam_diagnostics diff --git a/cam_diagnostics/cam_diagnostics.meta b/cam_diagnostics/cam_diagnostics.meta new file mode 100644 index 00000000..f59dbfd5 --- /dev/null +++ b/cam_diagnostics/cam_diagnostics.meta @@ -0,0 +1,245 @@ +[ccpp-table-properties] + name = cam_state_diagnostics + type = scheme + +[ccpp-arg-table] + name = cam_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 = cam_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 = inverse_exner_function_wrt_surface_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=* + dimensions = () + intent = out +[ errflg ] + standard_name = ccpp_error_code + units = 1 + type = integer + dimensions = () + intent = out +##################################################################### +[ccpp-table-properties] + name = cam_tend_diagnostics + type = scheme + +[ccpp-arg-table] + name = cam_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 = cam_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/cam_diagnostics/kessler_diagnostics.F90 b/cam_diagnostics/kessler_diagnostics.F90 new file mode 100644 index 00000000..b74a4b57 --- /dev/null +++ b/cam_diagnostics/kessler_diagnostics.F90 @@ -0,0 +1,56 @@ +module kessler_diagnostics + + use ccpp_kinds, only: kind_phys + use ccpp_constituent_prop_mod, only: ccpp_constituent_prop_ptr_t + + 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=*), 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/cam_diagnostics/kessler_diagnostics.meta b/cam_diagnostics/kessler_diagnostics.meta new file mode 100644 index 00000000..bacbaac4 --- /dev/null +++ b/cam_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=* + dimensions = () + intent = out +[ errflg ] + standard_name = ccpp_error_code + units = 1 + type = integer + dimensions = () + intent = out diff --git a/suite_held_suarez_1994.xml b/suite_held_suarez_1994.xml index 315ade58..6a39dca4 100644 --- a/suite_held_suarez_1994.xml +++ b/suite_held_suarez_1994.xml @@ -7,5 +7,9 @@ apply_tendency_of_northward_wind apply_heating_rate geopotential_temp + cam_state_diagnostics + + + cam_tend_diagnostics diff --git a/suite_kessler.xml b/suite_kessler.xml index 20a1bf94..4da34398 100644 --- a/suite_kessler.xml +++ b/suite_kessler.xml @@ -16,5 +16,10 @@ kessler_update qneg geopotential_temp + cam_state_diagnostics + kessler_diagnostics + + + cam_tend_diagnostics diff --git a/suite_tj2016.xml b/suite_tj2016.xml index dcda5bbe..cd85301e 100644 --- a/suite_tj2016.xml +++ b/suite_tj2016.xml @@ -5,6 +5,7 @@ tj2016_precip apply_heating_rate qneg + cam_state_diagnostics tj2016_sfc_pbl_hs @@ -12,6 +13,7 @@ apply_tendency_of_eastward_wind apply_tendency_of_northward_wind qneg + cam_tend_diagnostics From ca7794bd725170b94e979475b678c93830f24112 Mon Sep 17 00:00:00 2001 From: Courtney Peverley Date: Wed, 24 Jul 2024 16:39:33 -0600 Subject: [PATCH 02/10] add scheme diagnostics template --- cam_diagnostics/kessler_diagnostics.F90 | 1 - .../scheme_diagnostics_template.F90 | 78 +++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 cam_diagnostics/scheme_diagnostics_template.F90 diff --git a/cam_diagnostics/kessler_diagnostics.F90 b/cam_diagnostics/kessler_diagnostics.F90 index b74a4b57..1f783005 100644 --- a/cam_diagnostics/kessler_diagnostics.F90 +++ b/cam_diagnostics/kessler_diagnostics.F90 @@ -1,7 +1,6 @@ module kessler_diagnostics use ccpp_kinds, only: kind_phys - use ccpp_constituent_prop_mod, only: ccpp_constituent_prop_ptr_t implicit none private diff --git a/cam_diagnostics/scheme_diagnostics_template.F90 b/cam_diagnostics/scheme_diagnostics_template.F90 new file mode 100644 index 00000000..81e90769 --- /dev/null +++ b/cam_diagnostics/scheme_diagnostics_template.F90 @@ -0,0 +1,78 @@ +module _diagnostics +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! +! THIS IS A TEMPLATE +! 1. copy this file to a new file with the correct name +! (_diagnostics.F90) +! 2. do a search and replace for "" 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 :: _diagnostics_init ! init routine + public :: _diagnostics_run ! main routine + +CONTAINS + + !> \section arg_table__diagnostics_init Argument Table + !! \htmlinclude _diagnostics_init.html + subroutine _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 _diagnostics_init + + !> \section arg_table__diagnostics_run Argument Table + !! \htmlinclude _diagnostics_run.html + subroutine _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=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + errmsg = '' + errflg = 0 + + ! History out field calls + ! Example: + ! call history_out_field('TESTDIAG', of) + + end subroutine _diagnostics_run + + !======================================================================= + +end module _diagnostics From 78b8bfbe93f3c811a13948dce9bf147bdbf98f56 Mon Sep 17 00:00:00 2001 From: Courtney Peverley Date: Wed, 24 Jul 2024 16:40:44 -0600 Subject: [PATCH 03/10] use parsable temp name --- .../scheme_diagnostics_template.F90 | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cam_diagnostics/scheme_diagnostics_template.F90 b/cam_diagnostics/scheme_diagnostics_template.F90 index 81e90769..859bd61c 100644 --- a/cam_diagnostics/scheme_diagnostics_template.F90 +++ b/cam_diagnostics/scheme_diagnostics_template.F90 @@ -1,10 +1,10 @@ -module _diagnostics +module SCHEME_diagnostics !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! THIS IS A TEMPLATE ! 1. copy this file to a new file with the correct name -! (_diagnostics.F90) -! 2. do a search and replace for "" in this file and +! (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 @@ -23,14 +23,14 @@ private save - public :: _diagnostics_init ! init routine - public :: _diagnostics_run ! main routine + public :: SCHEME_diagnostics_init ! init routine + public :: SCHEME_diagnostics_run ! main routine CONTAINS - !> \section arg_table__diagnostics_init Argument Table - !! \htmlinclude _diagnostics_init.html - subroutine _diagnostics_init(errmsg, errflg) + !> \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 @@ -46,11 +46,11 @@ ! Example: ! call history_add_field('TESTDIAG', 'not_a_real_diagnostic_field', horiz_only, 'avg', 'gremlin s-1') - end subroutine _diagnostics_init + end subroutine SCHEME_diagnostics_init - !> \section arg_table__diagnostics_run Argument Table - !! \htmlinclude _diagnostics_run.html - subroutine _diagnostics_run(list, of, fields, errmsg, errflg) + !> \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 !------------------------------------------------ @@ -71,8 +71,8 @@ ! Example: ! call history_out_field('TESTDIAG', of) - end subroutine _diagnostics_run + end subroutine SCHEME_diagnostics_run !======================================================================= -end module _diagnostics +end module SCHEME_diagnostics From 6363a53dd51fd2c65979b65a1f2cfd4788002ff9 Mon Sep 17 00:00:00 2001 From: Courtney Peverley Date: Mon, 29 Jul 2024 10:59:13 -0600 Subject: [PATCH 04/10] consistent error message length --- cam_diagnostics/cam_diagnostics.F90 | 4 ++-- cam_diagnostics/cam_diagnostics.meta | 2 +- cam_diagnostics/kessler_diagnostics.F90 | 4 ++-- cam_diagnostics/kessler_diagnostics.meta | 2 +- cam_diagnostics/scheme_diagnostics_template.F90 | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cam_diagnostics/cam_diagnostics.F90 b/cam_diagnostics/cam_diagnostics.F90 index 054c1d91..98a9dea5 100644 --- a/cam_diagnostics/cam_diagnostics.F90 +++ b/cam_diagnostics/cam_diagnostics.F90 @@ -118,8 +118,8 @@ subroutine cam_state_diagnostics_run(ps, psdry, phis, T, u, v, dse, omega, & real(kind_phys), intent(in) :: const_array(:,:,:) type(ccpp_constituent_prop_ptr_t), intent(in) :: const_props(:) ! CCPP error handling variables - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg character(len=512) :: standard_name integer :: const_idx, name_idx diff --git a/cam_diagnostics/cam_diagnostics.meta b/cam_diagnostics/cam_diagnostics.meta index f59dbfd5..8095e433 100644 --- a/cam_diagnostics/cam_diagnostics.meta +++ b/cam_diagnostics/cam_diagnostics.meta @@ -180,7 +180,7 @@ [ errmsg ] standard_name = ccpp_error_message units = none - type = character | kind = len=* + type = character | kind = len=512 dimensions = () intent = out [ errflg ] diff --git a/cam_diagnostics/kessler_diagnostics.F90 b/cam_diagnostics/kessler_diagnostics.F90 index 1f783005..d319f5a2 100644 --- a/cam_diagnostics/kessler_diagnostics.F90 +++ b/cam_diagnostics/kessler_diagnostics.F90 @@ -40,8 +40,8 @@ subroutine kessler_diagnostics_run(precl, errmsg, errflg) ! State variables real(kind_phys), intent(in) :: precl(:) ! Total precipitation ! CCPP error handling variables - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg errmsg = '' errflg = 0 diff --git a/cam_diagnostics/kessler_diagnostics.meta b/cam_diagnostics/kessler_diagnostics.meta index bacbaac4..63e889ff 100644 --- a/cam_diagnostics/kessler_diagnostics.meta +++ b/cam_diagnostics/kessler_diagnostics.meta @@ -30,7 +30,7 @@ [ errmsg ] standard_name = ccpp_error_message units = none - type = character | kind = len=* + type = character | kind = len=512 dimensions = () intent = out [ errflg ] diff --git a/cam_diagnostics/scheme_diagnostics_template.F90 b/cam_diagnostics/scheme_diagnostics_template.F90 index 859bd61c..a00a2d86 100644 --- a/cam_diagnostics/scheme_diagnostics_template.F90 +++ b/cam_diagnostics/scheme_diagnostics_template.F90 @@ -61,8 +61,8 @@ subroutine SCHEME_diagnostics_run(list, of, fields, errmsg, errflg) real(kind_phys), intent(in) :: of(:) real(kind_phys), intent(in) :: fields(:,:) ! CCPP error handling variables - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + character(len=512), intent(out) :: errmsg + integer, intent(out) :: errflg errmsg = '' errflg = 0 From 8d44484f601371a174de3bcb506c2d77ab7cbea8 Mon Sep 17 00:00:00 2001 From: Courtney Peverley Date: Mon, 16 Sep 2024 15:54:31 -0600 Subject: [PATCH 05/10] address review comments --- cam_diagnostics/cam_diagnostics.F90 | 68 +++++++++++++++---------- cam_diagnostics/cam_diagnostics.meta | 2 +- cam_diagnostics/kessler_diagnostics.F90 | 3 ++ suite_cam7.xml | 4 ++ 4 files changed, 48 insertions(+), 29 deletions(-) diff --git a/cam_diagnostics/cam_diagnostics.F90 b/cam_diagnostics/cam_diagnostics.F90 index 98a9dea5..8a6b909c 100644 --- a/cam_diagnostics/cam_diagnostics.F90 +++ b/cam_diagnostics/cam_diagnostics.F90 @@ -38,43 +38,49 @@ subroutine cam_state_diagnostics_init(const_props, errmsg, 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', 'inverse_exner_function_wrt_surface_pressure', 'lev', 'avg', '1') - call history_add_field('ZM', 'geopotential_height_wrt_surface', 'lev', 'avg', 'm') - call history_add_field('PINT', 'air_pressure_at_interface', 'ilev', 'avg', 'Pa') - call history_add_field('PINTDRY', 'air_pressure_of_dry_air_at_interface', 'ilev', 'avg', 'Pa') - call history_add_field('LNPINT', 'ln_air_pressure_at_interface', 'ilev', 'avg', '1') - call history_add_field('LNPINTDRY', 'ln_air_pressure_of_dry_air_at_interface', 'ilev', 'avg', '1') - call history_add_field('ZI', 'geopotential_heigh_wrt_surface_at_interface', 'ilev', 'avg', 'm') + 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 cam_state_diagnostics_init @@ -109,11 +115,11 @@ subroutine cam_state_diagnostics_run(ps, psdry, phis, T, u, v, dse, omega, & 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 interface - real(kind_phys), intent(in) :: pintdry(:,:) ! air pressure of dry air at interface - real(kind_phys), intent(in) :: lnpint(:,:) ! ln air pressure at interface - real(kind_phys), intent(in) :: lnpintdry(:,:) ! ln air pressure of dry air at interface - real(kind_phys), intent(in) :: zi(:,:) ! geopotential height wrt surface at interface + 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(:) @@ -123,6 +129,7 @@ subroutine cam_state_diagnostics_run(ps, psdry, phis, T, u, v, dse, omega, & character(len=512) :: standard_name integer :: const_idx, name_idx + integer :: const_num_found errmsg = '' errflg = 0 @@ -153,13 +160,18 @@ subroutine cam_state_diagnostics_run(ps, psdry, phis, T, u, v, dse, omega, & 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 cam_state_diagnostics_run diff --git a/cam_diagnostics/cam_diagnostics.meta b/cam_diagnostics/cam_diagnostics.meta index 8095e433..5998c181 100644 --- a/cam_diagnostics/cam_diagnostics.meta +++ b/cam_diagnostics/cam_diagnostics.meta @@ -124,7 +124,7 @@ dimensions = (horizontal_loop_extent, vertical_layer_dimension) intent = in [ inv_exner ] - standard_name = inverse_exner_function_wrt_surface_pressure + 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) diff --git a/cam_diagnostics/kessler_diagnostics.F90 b/cam_diagnostics/kessler_diagnostics.F90 index d319f5a2..2d343ad8 100644 --- a/cam_diagnostics/kessler_diagnostics.F90 +++ b/cam_diagnostics/kessler_diagnostics.F90 @@ -1,4 +1,7 @@ module kessler_diagnostics +! +! Diagnostics for use by the Kessler physics suite only +! use ccpp_kinds, only: kind_phys diff --git a/suite_cam7.xml b/suite_cam7.xml index 1cb64eb3..7a49a6ef 100644 --- a/suite_cam7.xml +++ b/suite_cam7.xml @@ -8,5 +8,9 @@ apply_heating_rate qneg geopotential_temp + cam_state_diagnostics + + + cam_tend_diagnostics From 9b4a79aa00997f735e2b789803463a4329ca1999 Mon Sep 17 00:00:00 2001 From: Courtney Peverley Date: Wed, 25 Sep 2024 14:58:59 -0600 Subject: [PATCH 06/10] fix standard names/ic file names --- cam_diagnostics/cam_diagnostics.F90 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cam_diagnostics/cam_diagnostics.F90 b/cam_diagnostics/cam_diagnostics.F90 index 8a6b909c..7cf641bf 100644 --- a/cam_diagnostics/cam_diagnostics.F90 +++ b/cam_diagnostics/cam_diagnostics.F90 @@ -16,12 +16,16 @@ module cam_diagnostics (/'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 '/) + '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(4) = (/'Q ', & 'CLDLIQ', & + 'RAINQM', & 'CLDICE', & - 'RAINQM'/) + 'SNOWQM', & + 'GRAUQM'/) CONTAINS From 06dee837e7d0f9ed5155b6496d5ccaf6b0d08b04 Mon Sep 17 00:00:00 2001 From: Courtney Peverley Date: Fri, 27 Sep 2024 10:56:15 -0600 Subject: [PATCH 07/10] split diagnostics --- ...gnostics.F90 => cam_state_diagnostics.F90} | 43 +----- ...ostics.meta => cam_state_diagnostics.meta} | 54 -------- cam_diagnostics/cam_tend_diagnostics.F90 | 48 +++++++ cam_diagnostics/cam_tend_diagnostics.meta | 53 ++++++++ doc/NamesNotInDictionary.txt | 125 ++++++++++-------- 5 files changed, 172 insertions(+), 151 deletions(-) rename cam_diagnostics/{cam_diagnostics.F90 => cam_state_diagnostics.F90} (83%) rename cam_diagnostics/{cam_diagnostics.meta => cam_state_diagnostics.meta} (79%) create mode 100644 cam_diagnostics/cam_tend_diagnostics.F90 create mode 100644 cam_diagnostics/cam_tend_diagnostics.meta diff --git a/cam_diagnostics/cam_diagnostics.F90 b/cam_diagnostics/cam_state_diagnostics.F90 similarity index 83% rename from cam_diagnostics/cam_diagnostics.F90 rename to cam_diagnostics/cam_state_diagnostics.F90 index 7cf641bf..fd731f15 100644 --- a/cam_diagnostics/cam_diagnostics.F90 +++ b/cam_diagnostics/cam_state_diagnostics.F90 @@ -1,4 +1,4 @@ -module cam_diagnostics +module cam_state_diagnostics use ccpp_kinds, only: kind_phys use ccpp_constituent_prop_mod, only: ccpp_constituent_prop_ptr_t @@ -9,10 +9,8 @@ module cam_diagnostics public :: cam_state_diagnostics_init ! init routine public :: cam_state_diagnostics_run ! main routine - public :: cam_tend_diagnostics_init ! init routine - public :: cam_tend_diagnostics_run ! main routine - character(len=65) :: const_std_names(4) = & + 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 ', & @@ -20,7 +18,7 @@ module cam_diagnostics '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(4) = (/'Q ', & + character(len=6) :: const_diag_names(6) = (/'Q ', & 'CLDLIQ', & 'RAINQM', & 'CLDICE', & @@ -179,37 +177,4 @@ subroutine cam_state_diagnostics_run(ps, psdry, phis, T, u, v, dse, omega, & end do end subroutine cam_state_diagnostics_run - - !> \section arg_table_cam_tend_diagnostics_init Argument Table - !! \htmlinclude cam_tend_diagnostics_init.html - subroutine cam_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 cam_tend_diagnostics_init - - !> \section arg_table_cam_tend_diagnostics_run Argument Table - !! \htmlinclude cam_tend_diagnostics_run.html - subroutine cam_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 cam_tend_diagnostics_run - !======================================================================= -end module cam_diagnostics +end module cam_state_diagnostics diff --git a/cam_diagnostics/cam_diagnostics.meta b/cam_diagnostics/cam_state_diagnostics.meta similarity index 79% rename from cam_diagnostics/cam_diagnostics.meta rename to cam_diagnostics/cam_state_diagnostics.meta index 5998c181..6ba15ac8 100644 --- a/cam_diagnostics/cam_diagnostics.meta +++ b/cam_diagnostics/cam_state_diagnostics.meta @@ -189,57 +189,3 @@ type = integer dimensions = () intent = out -##################################################################### -[ccpp-table-properties] - name = cam_tend_diagnostics - type = scheme - -[ccpp-arg-table] - name = cam_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 = cam_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/cam_diagnostics/cam_tend_diagnostics.F90 b/cam_diagnostics/cam_tend_diagnostics.F90 new file mode 100644 index 00000000..099c33b3 --- /dev/null +++ b/cam_diagnostics/cam_tend_diagnostics.F90 @@ -0,0 +1,48 @@ +module cam_tend_diagnostics + + use ccpp_kinds, only: kind_phys + use ccpp_constituent_prop_mod, only: ccpp_constituent_prop_ptr_t + + implicit none + private + save + + public :: cam_tend_diagnostics_init ! init routine + public :: cam_tend_diagnostics_run ! main routine + + +CONTAINS + + !> \section arg_table_cam_tend_diagnostics_init Argument Table + !! \htmlinclude cam_tend_diagnostics_init.html + subroutine cam_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 cam_tend_diagnostics_init + + !> \section arg_table_cam_tend_diagnostics_run Argument Table + !! \htmlinclude cam_tend_diagnostics_run.html + subroutine cam_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 cam_tend_diagnostics_run + !======================================================================= +end module cam_tend_diagnostics diff --git a/cam_diagnostics/cam_tend_diagnostics.meta b/cam_diagnostics/cam_tend_diagnostics.meta new file mode 100644 index 00000000..d38f5b6f --- /dev/null +++ b/cam_diagnostics/cam_tend_diagnostics.meta @@ -0,0 +1,53 @@ +[ccpp-table-properties] + name = cam_tend_diagnostics + type = scheme + +[ccpp-arg-table] + name = cam_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 = cam_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/doc/NamesNotInDictionary.txt b/doc/NamesNotInDictionary.txt index bcb6f51d..7418ebc2 100644 --- a/doc/NamesNotInDictionary.txt +++ b/doc/NamesNotInDictionary.txt @@ -1,43 +1,46 @@ ####################### Date/time of when script was run: -2024-07-12 11:08:18.467654 +2024-09-25 16:20:02.082335 ####################### Non-dictionary standard names found in the following metadata files: -------------------------- -atmospheric_physics.jt.062024/utilities/geopotential_temp.meta +atmospheric_physics/cam_diagnostics/cam_diagnostics.meta - 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.jt.062024/zhang_mcfarlane/zm_conv_convtran.meta +atmospheric_physics/dry_adiabatic_adjust/dadadj.meta - - atmosphere_detrainment_convective_mass_flux_for_deep_convection_for_convective_columns - - atmosphere_downdraft_convective_mass_flux_for_deep_convection_for_convective_columns - - atmosphere_downdraft_entrainment_convective_mass_flux_for_deep_convection_for_convective_columns - - atmosphere_updraft_convective_mass_flux_for_deep_convection_for_convective_columns - - atmosphere_updraft_entrainment_convective_mass_flux_for_deep_convection_for_convective_columns - - current_timestep_number - - flag_for_zhang_mcfarlane_deep_convective_transport? - - fraction_of_water_insoluble_convectively_transported_species - - horizontal_index_of_convective_columns_for_deep_convection_for_convective_columns - - maximum_number_of_grid_cells_with_deep_convection? - - minimum_number_of_grid_cells_with_deep_convection? - - pressure_thickness_for_deep_convection_for_convective_columns - - pressure_thickness_for_subcloud_layer_for_deep_convection_for_convective_columns - - pressure_thickness_of_dry_air_for_deep_convection_for_convective_columns? - - tendency_of_ccpp_constituents? - - vertical_index_at_top_of_deep_convection_for_convective_columns - - vertical_index_of_deep_conveciton_launch_level_for_convective_columns + - air_pressure_at_interface + - binary_indicator_for_dry_adiabatic_adjusted_grid_cell + - number_of_iterations_for_dry_adiabatic_adjustment_algorithm_convergence + - number_of_vertical_levels_from_model_top_where_dry_adiabatic_adjustment_occurs + - tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water -------------------------- -atmospheric_physics.jt.062024/zhang_mcfarlane/zm_conv_momtran.meta +atmospheric_physics/dry_adiabatic_adjust/dadadj_apply_qv_tendency.meta + + - tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water + +-------------------------- + +atmospheric_physics/utilities/geopotential_temp.meta + + - air_pressure_at_interface + - ln_air_pressure_at_interface + +-------------------------- + +atmospheric_physics/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 @@ -64,33 +67,7 @@ atmospheric_physics.jt.062024/zhang_mcfarlane/zm_conv_momtran.meta -------------------------- -atmospheric_physics.jt.062024/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.jt.062024/zhang_mcfarlane/zm_convr.meta +atmospheric_physics/zhang_mcfarlane/zm_convr.meta - air_pressure_at_interface - atmosphere_convective_mass_flux_due_to all_convection? @@ -146,23 +123,55 @@ atmospheric_physics.jt.062024/zhang_mcfarlane/zm_convr.meta -------------------------- -atmospheric_physics.jt.062024/dry_adiabatic_adjust/dadadj.meta +atmospheric_physics/zhang_mcfarlane/zm_conv_convtran.meta - - air_pressure_at_interface - - binary_indicator_for_dry_adiabatic_adjusted_grid_cell - - number_of_iterations_for_dry_adiabatic_adjustment_algorithm_convergence - - number_of_vertical_levels_from_model_top_where_dry_adiabatic_adjustment_occurs - - tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water + - atmosphere_detrainment_convective_mass_flux_for_deep_convection_for_convective_columns + - atmosphere_downdraft_convective_mass_flux_for_deep_convection_for_convective_columns + - atmosphere_downdraft_entrainment_convective_mass_flux_for_deep_convection_for_convective_columns + - atmosphere_updraft_convective_mass_flux_for_deep_convection_for_convective_columns + - atmosphere_updraft_entrainment_convective_mass_flux_for_deep_convection_for_convective_columns + - current_timestep_number + - flag_for_zhang_mcfarlane_deep_convective_transport? + - fraction_of_water_insoluble_convectively_transported_species + - horizontal_index_of_convective_columns_for_deep_convection_for_convective_columns + - maximum_number_of_grid_cells_with_deep_convection? + - minimum_number_of_grid_cells_with_deep_convection? + - pressure_thickness_for_deep_convection_for_convective_columns + - pressure_thickness_for_subcloud_layer_for_deep_convection_for_convective_columns + - pressure_thickness_of_dry_air_for_deep_convection_for_convective_columns? + - tendency_of_ccpp_constituents? + - vertical_index_at_top_of_deep_convection_for_convective_columns + - vertical_index_of_deep_conveciton_launch_level_for_convective_columns -------------------------- -atmospheric_physics.jt.062024/dry_adiabatic_adjust/dadadj_apply_qv_tendency.meta +atmospheric_physics/zhang_mcfarlane/zm_conv_evap.meta - - tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water + - + - 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.jt.062024/tj2016/tj2016_precip.meta +atmospheric_physics/tj2016/tj2016_precip.meta - gas_constant_of_water_vapor - lwe_large_scale_precipitation_rate_at_surface @@ -171,7 +180,7 @@ atmospheric_physics.jt.062024/tj2016/tj2016_precip.meta -------------------------- -atmospheric_physics.jt.062024/tj2016/tj2016_sfc_pbl_hs.meta +atmospheric_physics/tj2016/tj2016_sfc_pbl_hs.meta - air_pressure_at_interface - eddy_heat_diffusivity From e89e912c2c4d9dd051584f7cf1a2a6014e84d088 Mon Sep 17 00:00:00 2001 From: Courtney Peverley Date: Wed, 2 Oct 2024 17:16:08 -0600 Subject: [PATCH 08/10] rename cam_diagnostics to sima_diagnostics --- doc/NamesNotInDictionary.txt | 4 ++-- .../kessler_diagnostics.F90 | 0 .../kessler_diagnostics.meta | 0 .../scheme_diagnostics_template.F90 | 0 .../sima_state_diagnostics.F90 | 24 +++++++++---------- .../sima_state_diagnostics.meta | 6 ++--- .../sima_tend_diagnostics.F90 | 24 +++++++++---------- .../sima_tend_diagnostics.meta | 6 ++--- suite_cam7.xml | 4 ++-- suite_held_suarez_1994.xml | 4 ++-- suite_kessler.xml | 4 ++-- suite_tj2016.xml | 4 ++-- 12 files changed, 40 insertions(+), 40 deletions(-) rename {cam_diagnostics => sima_diagnostics}/kessler_diagnostics.F90 (100%) rename {cam_diagnostics => sima_diagnostics}/kessler_diagnostics.meta (100%) rename {cam_diagnostics => sima_diagnostics}/scheme_diagnostics_template.F90 (100%) rename cam_diagnostics/cam_state_diagnostics.F90 => sima_diagnostics/sima_state_diagnostics.F90 (93%) rename cam_diagnostics/cam_state_diagnostics.meta => sima_diagnostics/sima_state_diagnostics.meta (98%) rename cam_diagnostics/cam_tend_diagnostics.F90 => sima_diagnostics/sima_tend_diagnostics.F90 (68%) rename cam_diagnostics/cam_tend_diagnostics.meta => sima_diagnostics/sima_tend_diagnostics.meta (92%) diff --git a/doc/NamesNotInDictionary.txt b/doc/NamesNotInDictionary.txt index 7418ebc2..47669f11 100644 --- a/doc/NamesNotInDictionary.txt +++ b/doc/NamesNotInDictionary.txt @@ -1,14 +1,14 @@ ####################### Date/time of when script was run: -2024-09-25 16:20:02.082335 +2024-10-02 16:46:33.523210 ####################### Non-dictionary standard names found in the following metadata files: -------------------------- -atmospheric_physics/cam_diagnostics/cam_diagnostics.meta +atmospheric_physics/sima_diagnostics/sima_state_diagnostics.meta - air_pressure_at_interface - air_pressure_of_dry_air_at_interface diff --git a/cam_diagnostics/kessler_diagnostics.F90 b/sima_diagnostics/kessler_diagnostics.F90 similarity index 100% rename from cam_diagnostics/kessler_diagnostics.F90 rename to sima_diagnostics/kessler_diagnostics.F90 diff --git a/cam_diagnostics/kessler_diagnostics.meta b/sima_diagnostics/kessler_diagnostics.meta similarity index 100% rename from cam_diagnostics/kessler_diagnostics.meta rename to sima_diagnostics/kessler_diagnostics.meta diff --git a/cam_diagnostics/scheme_diagnostics_template.F90 b/sima_diagnostics/scheme_diagnostics_template.F90 similarity index 100% rename from cam_diagnostics/scheme_diagnostics_template.F90 rename to sima_diagnostics/scheme_diagnostics_template.F90 diff --git a/cam_diagnostics/cam_state_diagnostics.F90 b/sima_diagnostics/sima_state_diagnostics.F90 similarity index 93% rename from cam_diagnostics/cam_state_diagnostics.F90 rename to sima_diagnostics/sima_state_diagnostics.F90 index fd731f15..42786f07 100644 --- a/cam_diagnostics/cam_state_diagnostics.F90 +++ b/sima_diagnostics/sima_state_diagnostics.F90 @@ -1,4 +1,4 @@ -module cam_state_diagnostics +module sima_state_diagnostics use ccpp_kinds, only: kind_phys use ccpp_constituent_prop_mod, only: ccpp_constituent_prop_ptr_t @@ -7,8 +7,8 @@ module cam_state_diagnostics private save - public :: cam_state_diagnostics_init ! init routine - public :: cam_state_diagnostics_run ! main routine + 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 ', & @@ -27,9 +27,9 @@ module cam_state_diagnostics CONTAINS - !> \section arg_table_cam_state_diagnostics_init Argument Table - !! \htmlinclude cam_state_diagnostics_init.html - subroutine cam_state_diagnostics_init(const_props, errmsg, errflg) + !> \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 @@ -85,11 +85,11 @@ subroutine cam_state_diagnostics_init(const_props, errmsg, errflg) end if end do - end subroutine cam_state_diagnostics_init + end subroutine sima_state_diagnostics_init - !> \section arg_table_cam_state_diagnostics_run Argument Table - !! \htmlinclude cam_state_diagnostics_run.html - subroutine cam_state_diagnostics_run(ps, psdry, phis, T, u, v, dse, omega, & + !> \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) @@ -176,5 +176,5 @@ subroutine cam_state_diagnostics_run(ps, psdry, phis, T, u, v, dse, omega, & end if end do - end subroutine cam_state_diagnostics_run -end module cam_state_diagnostics + end subroutine sima_state_diagnostics_run +end module sima_state_diagnostics diff --git a/cam_diagnostics/cam_state_diagnostics.meta b/sima_diagnostics/sima_state_diagnostics.meta similarity index 98% rename from cam_diagnostics/cam_state_diagnostics.meta rename to sima_diagnostics/sima_state_diagnostics.meta index 6ba15ac8..b847f9d8 100644 --- a/cam_diagnostics/cam_state_diagnostics.meta +++ b/sima_diagnostics/sima_state_diagnostics.meta @@ -1,9 +1,9 @@ [ccpp-table-properties] - name = cam_state_diagnostics + name = sima_state_diagnostics type = scheme [ccpp-arg-table] - name = cam_state_diagnostics_init + name = sima_state_diagnostics_init type = scheme [ const_props ] standard_name = ccpp_constituent_properties @@ -25,7 +25,7 @@ intent = out [ccpp-arg-table] - name = cam_state_diagnostics_run + name = sima_state_diagnostics_run type = scheme [ ps ] standard_name = surface_air_pressure diff --git a/cam_diagnostics/cam_tend_diagnostics.F90 b/sima_diagnostics/sima_tend_diagnostics.F90 similarity index 68% rename from cam_diagnostics/cam_tend_diagnostics.F90 rename to sima_diagnostics/sima_tend_diagnostics.F90 index 099c33b3..c5b1d240 100644 --- a/cam_diagnostics/cam_tend_diagnostics.F90 +++ b/sima_diagnostics/sima_tend_diagnostics.F90 @@ -1,4 +1,4 @@ -module cam_tend_diagnostics +module sima_tend_diagnostics use ccpp_kinds, only: kind_phys use ccpp_constituent_prop_mod, only: ccpp_constituent_prop_ptr_t @@ -7,15 +7,15 @@ module cam_tend_diagnostics private save - public :: cam_tend_diagnostics_init ! init routine - public :: cam_tend_diagnostics_run ! main routine + public :: sima_tend_diagnostics_init ! init routine + public :: sima_tend_diagnostics_run ! main routine CONTAINS - !> \section arg_table_cam_tend_diagnostics_init Argument Table - !! \htmlinclude cam_tend_diagnostics_init.html - subroutine cam_tend_diagnostics_init(errmsg, errflg) + !> \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 @@ -25,11 +25,11 @@ subroutine cam_tend_diagnostics_init(errmsg, errflg) 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 cam_tend_diagnostics_init + end subroutine sima_tend_diagnostics_init - !> \section arg_table_cam_tend_diagnostics_run Argument Table - !! \htmlinclude cam_tend_diagnostics_run.html - subroutine cam_tend_diagnostics_run(dTdt_total, dudt_total, dvdt_total, errmsg, errflg) + !> \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 @@ -43,6 +43,6 @@ subroutine cam_tend_diagnostics_run(dTdt_total, dudt_total, dvdt_total, errmsg, call history_out_field('UTEND', dudt_total) call history_out_field('VTEND', dvdt_total) - end subroutine cam_tend_diagnostics_run + end subroutine sima_tend_diagnostics_run !======================================================================= -end module cam_tend_diagnostics +end module sima_tend_diagnostics diff --git a/cam_diagnostics/cam_tend_diagnostics.meta b/sima_diagnostics/sima_tend_diagnostics.meta similarity index 92% rename from cam_diagnostics/cam_tend_diagnostics.meta rename to sima_diagnostics/sima_tend_diagnostics.meta index d38f5b6f..8d52f565 100644 --- a/cam_diagnostics/cam_tend_diagnostics.meta +++ b/sima_diagnostics/sima_tend_diagnostics.meta @@ -1,9 +1,9 @@ [ccpp-table-properties] - name = cam_tend_diagnostics + name = sima_tend_diagnostics type = scheme [ccpp-arg-table] - name = cam_tend_diagnostics_init + name = sima_tend_diagnostics_init type = scheme [ errmsg ] standard_name = ccpp_error_message @@ -19,7 +19,7 @@ intent = out [ccpp-arg-table] - name = cam_tend_diagnostics_run + name = sima_tend_diagnostics_run type = scheme [ dTdt_total ] standard_name = tendency_of_air_temperature_due_to_model_physics diff --git a/suite_cam7.xml b/suite_cam7.xml index 7a49a6ef..4c5ebb4b 100644 --- a/suite_cam7.xml +++ b/suite_cam7.xml @@ -8,9 +8,9 @@ apply_heating_rate qneg geopotential_temp - cam_state_diagnostics + sima_state_diagnostics - cam_tend_diagnostics + sima_tend_diagnostics diff --git a/suite_held_suarez_1994.xml b/suite_held_suarez_1994.xml index 6a39dca4..83d3d63a 100644 --- a/suite_held_suarez_1994.xml +++ b/suite_held_suarez_1994.xml @@ -7,9 +7,9 @@ apply_tendency_of_northward_wind apply_heating_rate geopotential_temp - cam_state_diagnostics + sima_state_diagnostics - cam_tend_diagnostics + sima_tend_diagnostics diff --git a/suite_kessler.xml b/suite_kessler.xml index 4da34398..d8d58adb 100644 --- a/suite_kessler.xml +++ b/suite_kessler.xml @@ -16,10 +16,10 @@ kessler_update qneg geopotential_temp - cam_state_diagnostics + sima_state_diagnostics kessler_diagnostics - cam_tend_diagnostics + sima_tend_diagnostics diff --git a/suite_tj2016.xml b/suite_tj2016.xml index cd85301e..8aa50be6 100644 --- a/suite_tj2016.xml +++ b/suite_tj2016.xml @@ -5,7 +5,7 @@ tj2016_precip apply_heating_rate qneg - cam_state_diagnostics + sima_state_diagnostics tj2016_sfc_pbl_hs @@ -13,7 +13,7 @@ apply_tendency_of_eastward_wind apply_tendency_of_northward_wind qneg - cam_tend_diagnostics + sima_tend_diagnostics From a3ee11b798aa033dde0ed18df6e511a28e225923 Mon Sep 17 00:00:00 2001 From: Courtney Peverley Date: Thu, 10 Oct 2024 14:06:11 -0600 Subject: [PATCH 09/10] fix cam7 sdf --- suite_cam7.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/suite_cam7.xml b/suite_cam7.xml index 24d096e6..1bacbe94 100644 --- a/suite_cam7.xml +++ b/suite_cam7.xml @@ -8,16 +8,16 @@ apply_heating_rate qneg geopotential_temp + sima_state_diagnostics - - sima_tend_diagnostics - tropopause_find tropopause_diagnostics + + sima_tend_diagnostics From 17d44659b528df67dd6a5d47537f353fe43d8a10 Mon Sep 17 00:00:00 2001 From: Courtney Peverley Date: Thu, 10 Oct 2024 14:19:02 -0600 Subject: [PATCH 10/10] update NamesNotInDictionary to reflect new directory structure --- doc/NamesNotInDictionary.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/NamesNotInDictionary.txt b/doc/NamesNotInDictionary.txt index 1a3685c5..c934e247 100644 --- a/doc/NamesNotInDictionary.txt +++ b/doc/NamesNotInDictionary.txt @@ -1,14 +1,14 @@ ####################### Date/time of when script was run: -2024-10-02 17:21:48.293385 +2024-10-10 14:17:36.423628 ####################### Non-dictionary standard names found in the following metadata files: -------------------------- -atmospheric_physics/sima_diagnostics/sima_state_diagnostics.meta +atmospheric_physics/schemes/sima_diagnostics/sima_state_diagnostics.meta - air_pressure_at_interface - air_pressure_of_dry_air_at_interface @@ -17,7 +17,7 @@ atmospheric_physics/sima_diagnostics/sima_state_diagnostics.meta -------------------------- -atmospheric_physics/sima_diagnostics/tropopause_diagnostics.meta +atmospheric_physics/schemes/sima_diagnostics/tropopause_diagnostics.meta - tropopause_air_pressure - tropopause_air_pressure_from_climatological_method @@ -45,7 +45,7 @@ atmospheric_physics/sima_diagnostics/tropopause_diagnostics.meta -------------------------- -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 @@ -55,20 +55,20 @@ 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/utilities/geopotential_temp.meta +atmospheric_physics/schemes/utilities/geopotential_temp.meta - air_pressure_at_interface - ln_air_pressure_at_interface -------------------------- -atmospheric_physics/tropopause_find/tropopause_find.meta +atmospheric_physics/schemes/tropopause_find/tropopause_find.meta - air_pressure_at_interface - fill_value_for_diagnostic_output @@ -107,7 +107,7 @@ atmospheric_physics/tropopause_find/tropopause_find.meta -------------------------- -atmospheric_physics/zhang_mcfarlane/zm_conv_momtran.meta +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 @@ -134,7 +134,7 @@ atmospheric_physics/zhang_mcfarlane/zm_conv_momtran.meta -------------------------- -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? @@ -190,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 @@ -212,7 +212,7 @@ atmospheric_physics/zhang_mcfarlane/zm_conv_convtran.meta -------------------------- -atmospheric_physics/zhang_mcfarlane/zm_conv_evap.meta +atmospheric_physics/schemes/zhang_mcfarlane/zm_conv_evap.meta - - cloud_area_fraction @@ -238,7 +238,7 @@ atmospheric_physics/zhang_mcfarlane/zm_conv_evap.meta -------------------------- -atmospheric_physics/tj2016/tj2016_precip.meta +atmospheric_physics/schemes/tj2016/tj2016_precip.meta - gas_constant_of_water_vapor - lwe_large_scale_precipitation_rate_at_surface @@ -247,7 +247,7 @@ atmospheric_physics/tj2016/tj2016_precip.meta -------------------------- -atmospheric_physics/tj2016/tj2016_sfc_pbl_hs.meta +atmospheric_physics/schemes/tj2016/tj2016_sfc_pbl_hs.meta - air_pressure_at_interface - eddy_heat_diffusivity