Skip to content

Commit

Permalink
First batch of updates for review comments, including standard name u…
Browse files Browse the repository at this point in the history
…pdates and revised code comments, cleanup
  • Loading branch information
jimmielin committed Sep 3, 2024
1 parent 2b1d98e commit 4ea57ff
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 167 deletions.
57 changes: 31 additions & 26 deletions cam_diagnostics/tropopause_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,38 +28,43 @@ subroutine tropopause_diagnostics_init(errmsg, errflg)
errflg = 0

! Define the output fields.

! Primary (Lapse rate) + backup (climatology) method
call history_add_field('TROP_P', 'tropopause_air_pressure', horiz_only, 'avg', 'Pa')
call history_add_field('TROP_T', 'tropopause_air_temperature', horiz_only, 'avg', 'K' )
call history_add_field('TROP_Z', 'tropopause_altitude', horiz_only, 'avg', 'm' )
call history_add_field('TROP_DZ', 'tropopause_altitude_relative', 'lev', 'avg', 'm')
call history_add_field('TROP_PD', 'probability_distribution_of_model_level_number_at_tropopause', 'lev', 'avg', 'probability')
call history_add_field('TROP_Z', 'tropopause_geopotential_height_wrt_surface', horiz_only, 'avg', 'm' )
call history_add_field('TROP_DZ', 'geopotential_height_difference_between_atmosphere_layer_and_tropopause', 'lev', 'avg', 'm')
call history_add_field('TROP_PD', 'probability_distribution_of_tropopause_vertical_layer_index', 'lev', 'avg', 'probability')
call history_add_field('TROP_FD', 'tropopause_found', horiz_only, 'avg', 'probability')

call history_add_field('TROPP_P', 'tropopause_air_pressure_assuming_lapse_rate', horiz_only, 'avg', 'Pa')
call history_add_field('TROPP_T', 'tropopause_air_temperature_assuming_lapse_rate', horiz_only, 'avg', 'K' )
call history_add_field('TROPP_Z', 'tropopause_altitude_assuming_lapse_rate', horiz_only, 'avg', 'm' )
call history_add_field('TROPP_DZ', 'tropopause_altitude_relative_assuming_lapse_rate', 'lev', 'avg', 'm')
call history_add_field('TROPP_PD', 'probability_distribution_of_model_level_number_at_tropopause_assuming_lapse_rate', 'lev', 'avg', 'probability')
call history_add_field('TROPP_FD', 'tropopause_found_assuming_lapse_rate', horiz_only, 'avg', 'probability')

call history_add_field('TROPF_P', 'tropopause_air_pressure_assuming_cold_point', horiz_only, 'avg', 'Pa')
call history_add_field('TROPF_T', 'tropopause_air_temperature_assuming_cold_point', horiz_only, 'avg', 'K' )
call history_add_field('TROPF_Z', 'tropopause_altitude_assuming_cold_point', horiz_only, 'avg', 'm' )
call history_add_field('TROPF_DZ', 'tropopause_altitude_relative_assuming_cold_point', 'lev', 'avg', 'm')
call history_add_field('TROPF_PD', 'probability_distribution_of_model_level_number_at_tropopause_assuming_cold_point', 'lev', 'avg', 'probability')
call history_add_field('TROPF_FD', 'tropopause_found_assuming_cold_point', horiz_only, 'avg', 'probability')

call history_add_field('TROPC_P', 'tropopause_air_pressure_assuming_climatology', horiz_only, 'avg', 'Pa')
call history_add_field('TROPC_T', 'tropopause_air_temperature_assuming_climatology', horiz_only, 'avg', 'K' )
call history_add_field('TROPC_Z', 'tropopause_altitude_assuming_climatology', horiz_only, 'avg', 'm' )
call history_add_field('TROPC_DZ', 'tropopause_altitude_relative_assuming_climatology', 'lev', 'avg', 'm')
call history_add_field('TROPC_PD', 'probability_distribution_of_model_level_number_at_tropopause_assuming_climatology', 'lev', 'avg', 'probability')
call history_add_field('TROPC_FD', 'tropopause_found_assuming_cold_point', horiz_only, 'avg', 'probability')
! Primary (Lapse rate) only
call history_add_field('TROPP_P', 'tropopause_air_pressure_from_lapse_rate_method', horiz_only, 'avg', 'Pa')
call history_add_field('TROPP_T', 'tropopause_air_temperature_from_lapse_rate_method', horiz_only, 'avg', 'K' )
call history_add_field('TROPP_Z', 'tropopause_geopotential_height_wrt_surface_from_lapse_rate_method', horiz_only, 'avg', 'm' )
call history_add_field('TROPP_DZ', 'geopotential_height_difference_between_atmosphere_layer_and_tropopause_from_lapse_rate_method', 'lev', 'avg', 'm')
call history_add_field('TROPP_PD', 'probability_distribution_of_tropopause_vertical_layer_index_from_lapse_rate_method', 'lev', 'avg', 'probability')
call history_add_field('TROPP_FD', 'tropopause_found_from_lapse_rate_method', horiz_only, 'avg', 'probability')

! Cold point (CPP) only
call history_add_field('TROPF_P', 'tropopause_air_pressure_from_cold_point_method', horiz_only, 'avg', 'Pa')
call history_add_field('TROPF_T', 'tropopause_air_temperature_from_cold_point_method', horiz_only, 'avg', 'K' )
call history_add_field('TROPF_Z', 'tropopause_geopotential_height_wrt_surface_from_cold_point_method', horiz_only, 'avg', 'm' )
call history_add_field('TROPF_DZ', 'geopotential_height_difference_between_atmosphere_layer_and_tropopause_from_cold_point_method', 'lev', 'avg', 'm')
call history_add_field('TROPF_PD', 'probability_distribution_of_tropopause_vertical_layer_index_from_cold_point_method', 'lev', 'avg', 'probability')
call history_add_field('TROPF_FD', 'tropopause_found_from_cold_point_method', horiz_only, 'avg', 'probability')

! Climatology only - will never fail
call history_add_field('TROPC_P', 'tropopause_air_pressure_from_climatological_method', horiz_only, 'avg', 'Pa')
call history_add_field('TROPC_T', 'tropopause_air_temperature_from_climatological_method', horiz_only, 'avg', 'K' )
call history_add_field('TROPC_Z', 'tropopause_geopotential_height_wrt_surface_from_climatological_method', horiz_only, 'avg', 'm' )
call history_add_field('TROPC_DZ', 'geopotential_height_difference_between_atmosphere_layer_and_tropopause_from_climatological_method', 'lev', 'avg', 'm')
call history_add_field('TROPC_PD', 'probability_distribution_of_tropopause_vertical_layer_index_from_climatological_method', 'lev', 'avg', 'probability')
call history_add_field('TROPC_FD', 'tropopause_found_from_climatological_method', horiz_only, 'avg', 'probability')

! Hybridstobie output fields
call history_add_field('hstobie_trop', 'lower_bound_of_model_level_number_for_stratospheric_chemistry', 'lev', 'inst', 'fraction of model time')
call history_add_field('hstobie_linoz', 'lower_bound_of_model_level_number_for_linoz_chemistry', 'lev', 'inst', 'fraction of model time')
call history_add_field('hstobie_tropop', 'model_level_number_at_tropopause_for_chemistry', 'lev', 'inst', 'fraction of model time')
call history_add_field('hstobie_trop', 'vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_stratospheric_chemistry', 'lev', 'inst', 'fraction of model time')
call history_add_field('hstobie_linoz', 'vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_linearized_ozone_chemistry', 'lev', 'inst', 'fraction of model time')
call history_add_field('hstobie_tropop', 'tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method_for_chemistry', 'lev', 'inst', 'fraction of model time')

end subroutine tropopause_diagnostics_init

Expand Down
58 changes: 29 additions & 29 deletions cam_diagnostics/tropopause_diagnostics.meta
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
intent = in
[ tropLev ]
standard_name = model_level_number_at_tropopause
units = 1
standard_name = tropopause_vertical_layer_index
units = index
type = integer
dimensions = (horizontal_loop_extent)
intent = in
Expand All @@ -58,122 +58,122 @@
dimensions = (horizontal_loop_extent)
intent = in
[ tropZ ]
standard_name = tropopause_altitude
standard_name = tropopause_geopotential_height_wrt_surface
units = m
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropLev_twmo ]
standard_name = model_level_number_at_tropopause_assuming_lapse_rate
units = 1
standard_name = tropopause_vertical_layer_index_from_lapse_rate_method
units = index
type = integer
dimensions = (horizontal_loop_extent)
intent = in
[ tropP_twmo ]
standard_name = tropopause_air_pressure_assuming_lapse_rate
standard_name = tropopause_air_pressure_from_lapse_rate_method
units = Pa
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropT_twmo ]
standard_name = tropopause_air_temperature_assuming_lapse_rate
standard_name = tropopause_air_temperature_from_lapse_rate_method
units = K
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropZ_twmo ]
standard_name = tropopause_altitude_assuming_lapse_rate
standard_name = tropopause_geopotential_height_wrt_surface_from_lapse_rate_method
units = m
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropLev_clim ]
standard_name = model_level_number_at_tropopause_assuming_climatology
units = 1
standard_name = tropopause_vertical_layer_index_from_climatological_method
units = index
type = integer
dimensions = (horizontal_loop_extent)
intent = in
[ tropP_clim ]
standard_name = tropopause_air_pressure_assuming_climatology
standard_name = tropopause_air_pressure_from_climatological_method
units = Pa
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropT_clim ]
standard_name = tropopause_air_temperature_assuming_climatology
standard_name = tropopause_air_temperature_from_climatological_method
units = K
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropZ_clim ]
standard_name = tropopause_altitude_assuming_climatology
standard_name = tropopause_geopotential_height_wrt_surface_from_climatological_method
units = m
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropLev_hybstob ]
standard_name = model_level_number_at_tropopause_assuming_hybridstobie_and_climatology
units = 1
standard_name = tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method
units = index
type = integer
dimensions = (horizontal_loop_extent)
intent = in
[ tropP_hybstob ]
standard_name = tropopause_air_pressure_assuming_hybridstobie_and_climatology
standard_name = tropopause_air_pressure_from_hybrid_stobie_linoz_with_climatological_backup_method
units = Pa
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropT_hybstob ]
standard_name = tropopause_air_temperature_assuming_hybridstobie_and_climatology
standard_name = tropopause_air_temperature_from_hybrid_stobie_linoz_with_climatological_backup_method
units = K
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropZ_hybstob ]
standard_name = tropopause_altitude_assuming_hybridstobie_and_climatology
standard_name = tropopause_geopotential_height_wrt_surface_from_hybrid_stobie_linoz_with_climatological_backup_method
units = m
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropLev_cpp ]
standard_name = model_level_number_at_tropopause_assuming_cold_point
units = 1
standard_name = tropopause_vertical_layer_index_from_cold_point_method
units = index
type = integer
dimensions = (horizontal_loop_extent)
intent = in
[ tropP_cpp ]
standard_name = tropopause_air_pressure_assuming_cold_point
standard_name = tropopause_air_pressure_from_cold_point_method
units = Pa
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropT_cpp ]
standard_name = tropopause_air_temperature_assuming_cold_point
standard_name = tropopause_air_temperature_from_cold_point_method
units = K
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ tropZ_cpp ]
standard_name = tropopause_altitude_assuming_cold_point
standard_name = tropopause_geopotential_height_wrt_surface_from_cold_point_method
units = m
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
[ hstobie_trop ]
standard_name = lower_bound_of_model_level_number_for_stratospheric_chemistry
units = 1
standard_name = vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_stratospheric_chemistry
units = index
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
intent = in
[ hstobie_linoz ]
standard_name = lower_bound_of_model_level_number_for_linoz_chemistry
units = 1
standard_name = vertical_layer_index_lower_bound_from_hybrid_stobie_linoz_with_climatological_backup_method_for_linearized_ozone_chemistry
units = index
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
intent = in
[ hstobie_tropop ]
standard_name = model_level_number_at_tropopause_for_chemistry
units = 1
standard_name = tropopause_vertical_layer_index_from_hybrid_stobie_linoz_with_climatological_backup_method_for_chemistry
units = index
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
intent = in
Expand Down
5 changes: 2 additions & 3 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tag name:
Originator(s): jimmielin
Date: August 22, 2024
One-line Summary: tropopause_find CCPP-ization
Github PR URL:
Github PR URL: https://github.com/ESCOMP/atmospheric_physics/pull/112

This PR fixes the following NCAR/atmospheric_physics Github issues:
- Creates the CCPP interface for the tropopause_find routine
Expand Down Expand Up @@ -37,8 +37,7 @@ M doc/NamesNotInDictionary.txt

List and Describe any test failures: N/A

Summarize any changes to answers:
Difference in
Summarize any changes to answers: none

===============================================================

Expand Down
7 changes: 7 additions & 0 deletions suite_cam7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@
<scheme>qneg</scheme>
<scheme>geopotential_temp</scheme>
</group>
<group name="physics_after_coupler">
<!-- Find tropopause -->
<!-- Tropopause find has to make history output at the end of convective adjustment -->
<!-- so supersaturated cells are not written to the tape. -->
<scheme>tropopause_find</scheme>
<scheme>tropopause_diagnostics</scheme>
</group>
</suite>
Loading

0 comments on commit 4ea57ff

Please sign in to comment.