Skip to content

Commit

Permalink
Upgrading to atmos_phys0_07_001 (#187)
Browse files Browse the repository at this point in the history
Tag name (The PR title should also include the tag name):
`atmos_phys0_07_001`
Originator(s): @jimmielin

List all `development` PR URLs included in this PR and a short
description of each:
* Update extraterrestrial flux in TUV-x prior to calculating rate constants #152 by @boulderdaze
* Simplify deallocation of multiple objects associated with the TUV-x #156 by @boulderdaze
* Fill in errmsg, errflg in check_energy schemes #160 by @jimmielin
* Validates the MUSICA meta data against the CCPP standard names #162 by @boulderdaze
* Add constituent tendency updater #111 by @peverwhee
* Add cloud optical calculations for use in TUV-x #167 by @mattldawson
* Add initialize_constituents scheme #149 by @peverwhee
* Add diagnostics to TJ2016 test schemes #170 by @peverwhee
* update "radians" to "rad" #173 by @peverwhee
* Solar zenith angle and Earth-Sun distance #171 by @mattldawson
* Update standard names for tropopause_find #140 by @jimmielin
* Update surface albedo units #181 by @mattldawson
* don't set water species property for species that air_composition handles #185 by @peverwhee

List all test failures: N/A
  • Loading branch information
jimmielin authored Dec 31, 2024
2 parents e10f811 + 8e3d0bd commit c3de846
Show file tree
Hide file tree
Showing 51 changed files with 1,781 additions and 2,558 deletions.
30 changes: 19 additions & 11 deletions doc/NamesNotInDictionary.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#######################
Date/time of when script was run:
2024-11-18 15:44:54.993446
2024-12-16 11:19:41.130567
#######################

Non-dictionary standard names found in the following metadata files:
Expand Down Expand Up @@ -108,12 +108,6 @@ atmospheric_physics/schemes/dry_adiabatic_adjust/dadadj.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/schemes/zhang_mcfarlane/zm_conv_momtran.meta

- atmosphere_detrainment_convective_mass_flux_for_deep_convection_for_convective_columns
Expand Down Expand Up @@ -252,6 +246,12 @@ atmospheric_physics/schemes/utilities/geopotential_temp.meta

--------------------------

atmospheric_physics/schemes/utilities/physics_tendency_updaters.meta

- ccpp_constituent_tendencies

--------------------------

atmospheric_physics/schemes/check_energy/check_energy_save_teout.meta

- vertically_integrated_total_energy_at_end_of_physics_timestep
Expand Down Expand Up @@ -342,17 +342,17 @@ atmospheric_physics/schemes/tropopause_find/tropopause_find.meta
- 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_pressure_from_tropopause_climatology_dataset
- 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_calendar_days_from_tropopause_climatology
- tropopause_geopotential_height_wrt_surface
- tropopause_geopotential_height_wrt_surface_from_chemical_method
- tropopause_geopotential_height_wrt_surface_from_climatological_method
Expand All @@ -374,10 +374,18 @@ atmospheric_physics/schemes/tropopause_find/tropopause_find.meta
atmospheric_physics/schemes/musica/musica_ccpp.meta

- blackbody_temperature_at_surface
- cloud_area_fraction
- dynamic_constituents_for_musica_ccpp
- micm_solver_type
- number_of_grid_cells
- earth_sun_distance
- extraterrestrial_radiation_flux
- photolysis_wavelength_grid_interfaces
- solar_zenith_angle
- surface_albedo_due_to_UV_and_VIS_direct

--------------------------

atmospheric_physics/test/test_schemes/initialize_constituents.meta

- dynamic_constituents_for_initialize_constituents

#######################
6 changes: 6 additions & 0 deletions schemes/check_energy/check_energy_chng.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ subroutine check_energy_chng_timestep_init( &
character(len=512), intent(out) :: errmsg ! error message
integer, intent(out) :: errflg ! error flag

errmsg = ''
errflg = 0

!------------------------------------------------
! Physics total energy.
!------------------------------------------------
Expand Down Expand Up @@ -276,6 +279,9 @@ subroutine check_energy_chng_run( &

integer :: i

errmsg = ''
errflg = 0

!------------------------------------------------
! Physics total energy.
!------------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion schemes/check_energy/check_energy_fix.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module check_energy_fix
! Add heating rate required for global mean total energy conservation
!> \section arg_table_check_energy_fix_run Argument Table
!! \htmlinclude arg_table_check_energy_fix_run.html
subroutine check_energy_fix_run(ncol, pver, pint, gravit, heat_glob, ptend_s, eshflx, scheme_name)
subroutine check_energy_fix_run(ncol, pver, pint, gravit, heat_glob, ptend_s, eshflx, scheme_name, errmsg, errflg)
! Input arguments
integer, intent(in) :: ncol ! number of atmospheric columns
integer, intent(in) :: pver ! number of vertical layers
Expand All @@ -22,11 +22,17 @@ subroutine check_energy_fix_run(ncol, pver, pint, gravit, heat_glob, ptend_s, es
real(kind_phys), intent(out) :: eshflx(:) ! effective sensible heat flux [W m-2]
! for check_energy_chng

! Output arguments
character(len=64), intent(out) :: scheme_name ! scheme name
character(len=512), intent(out) :: errmsg ! error message
integer, intent(out) :: errflg ! error flag

! Local variables
integer :: i

errmsg = ''
errflg = 0

! Set scheme name for check_energy_chng
scheme_name = "check_energy_fix"

Expand Down
12 changes: 12 additions & 0 deletions schemes/check_energy/check_energy_fix.meta
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,15 @@
type = character | kind = len=64
dimensions = ()
intent = out
[ 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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ subroutine check_energy_gmean_run( &
pint, &
te_ini_dyn, teout, &
tedif_glob, heat_glob, &
teinp_glob, teout_glob, psurf_glob, ptopb_glob)
teinp_glob, teout_glob, psurf_glob, ptopb_glob, &
errmsg, errflg)

! This scheme is non-portable due to dependency: Global mean module gmean from src/utils
use gmean_mod, only: gmean
Expand All @@ -43,10 +44,16 @@ subroutine check_energy_gmean_run( &
real(kind_phys), intent(out) :: psurf_glob ! global mean surface pressure [Pa]
real(kind_phys), intent(out) :: ptopb_glob ! global mean top boundary pressure [Pa]

character(len=512), intent(out) :: errmsg ! error message
integer, intent(out) :: errflg ! error flag

! Local variables
real(kind_phys) :: te(ncol, 4) ! total energy of input/output states (copy)
real(kind_phys) :: te_glob(4) ! global means of total energy

errmsg = ''
errflg = 0

! Copy total energy out of input and output states.
! These four fields will have their global means calculated respectively
te(:ncol, 1) = te_ini_dyn(:ncol) ! Input energy using dycore energy formula [J m-2]
Expand Down
12 changes: 12 additions & 0 deletions schemes/check_energy/check_energy_gmean/check_energy_gmean.meta
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,15 @@
type = real | kind = kind_phys
dimensions = ()
intent = out
[ 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
7 changes: 6 additions & 1 deletion schemes/check_energy/check_energy_save_teout.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ module check_energy_save_teout

!> \section arg_table_check_energy_save_teout_run Argument Table
!! \htmlinclude arg_table_check_energy_save_teout_run.html
subroutine check_energy_save_teout_run(ncol, te_cur_dyn, teout)
subroutine check_energy_save_teout_run(ncol, te_cur_dyn, teout, errmsg, errflg)

! Input arguments
integer, intent(in) :: ncol ! number of atmospheric columns
real(kind_phys), intent(in) :: te_cur_dyn (:) ! dycore formula: current total energy [J m-2]

! Output arguments
real(kind_phys), intent(out) :: teout(:) ! total energy for global fixer in next timestep [J m-2]
character(len=512), intent(out) :: errmsg ! error message
integer, intent(out) :: errflg ! error flag

errmsg = ''
errflg = 0

! nb hplin: note that in physpkg.F90, the pbuf is updated to the previous dyn timestep
! through itim_old. Need to check if we need to replicate such pbuf functionality
Expand Down
12 changes: 12 additions & 0 deletions schemes/check_energy/check_energy_save_teout.meta
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,15 @@
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = out
[ 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
7 changes: 6 additions & 1 deletion schemes/check_energy/check_energy_zero_fluxes.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module check_energy_zero_fluxes

!> \section arg_table_check_energy_zero_fluxes_run Argument Table
!! \htmlinclude arg_table_check_energy_zero_fluxes_run.html
subroutine check_energy_zero_fluxes_run(ncol, name, flx_vap, flx_cnd, flx_ice, flx_sen)
subroutine check_energy_zero_fluxes_run(ncol, name, flx_vap, flx_cnd, flx_ice, flx_sen, errmsg, errflg)
! Input arguments
integer, intent(in) :: ncol ! number of atmospheric columns

Expand All @@ -22,6 +22,11 @@ subroutine check_energy_zero_fluxes_run(ncol, name, flx_vap, flx_cnd, flx_ice, f
real(kind_phys), intent(out) :: flx_cnd(:) ! boundary flux of liquid+ice (precip?) [m s-1]
real(kind_phys), intent(out) :: flx_ice(:) ! boundary flux of ice (snow?) [m s-1]
real(kind_phys), intent(out) :: flx_sen(:) ! boundary flux of sensible heat [W m-2]
character(len=512), intent(out) :: errmsg ! error message
integer, intent(out) :: errflg ! error flag

errmsg = ''
errflg = 0

! reset values to zero
name = ''
Expand Down
12 changes: 12 additions & 0 deletions schemes/check_energy/check_energy_zero_fluxes.meta
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,15 @@
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = out
[ 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
10 changes: 8 additions & 2 deletions schemes/check_energy/dycore_energy_consistency_adjust.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ subroutine dycore_energy_consistency_adjust_run( &
do_consistency_adjust, &
scaling_dycore, &
tend_dTdt, &
tend_dTdt_local)
tend_dTdt_local, &
errmsg, errflg)

! Input arguments
integer, intent(in) :: ncol ! number of atmospheric columns
Expand All @@ -26,7 +27,12 @@ subroutine dycore_energy_consistency_adjust_run( &
real(kind_phys), intent(in) :: tend_dTdt(:,:) ! model physics temperature tendency [K s-1]

! Output arguments
real(kind_phys), intent(out) :: tend_dTdt_local(:,:) ! (scheme) temperature tendency [K s-1]
real(kind_phys), intent(out) :: tend_dTdt_local(:,:) ! (scheme) temperature tendency [K s-1]
character(len=512), intent(out) :: errmsg ! error message
integer, intent(out) :: errflg ! error flag

errmsg = ''
errflg = 0

if (do_consistency_adjust) then
! original formula for scaling of temperature:
Expand Down
12 changes: 12 additions & 0 deletions schemes/check_energy/dycore_energy_consistency_adjust.meta
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,15 @@
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
intent = out
[ 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
1 change: 1 addition & 0 deletions schemes/dry_adiabatic_adjust/dadadj.meta
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
intent = out
constituent = True
[ dadpdf ]
standard_name = binary_indicator_for_dry_adiabatic_adjusted_grid_cell
units = fraction
Expand Down
33 changes: 0 additions & 33 deletions schemes/dry_adiabatic_adjust/dadadj_apply_qv_tendency.F90

This file was deleted.

42 changes: 0 additions & 42 deletions schemes/dry_adiabatic_adjust/dadadj_apply_qv_tendency.meta

This file was deleted.

2 changes: 1 addition & 1 deletion schemes/held_suarez/held_suarez_1994.meta
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
intent = in
[ clat ]
standard_name = latitude
units = radians
units = rad
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent)
intent = in
Expand Down
Loading

0 comments on commit c3de846

Please sign in to comment.