-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement thermo_water_update scheme (non-portable wrapper to cam_the…
…rmo_water_update) (#178) Originator(s): @jimmielin Summary (include the keyword ['closes', 'fixes', 'resolves'] and issue number): Closes #177, implementing thermo_water_update scheme to call cam_thermo_water_update. Describe any changes made to the namelist: N/A List all files eliminated and why: N/A List all files added and what they do: Implement thermo_water_update scheme A schemes/thermo_water_update/thermo_water_update.F90 A schemes/thermo_water_update/thermo_water_update.meta List all existing files that have been modified, and describe the changes: (Helpful git command: `git diff --name-status development...<your_branch_name>`) Include thermo_water_update scheme in CAM7 suite and simple physics suites M suites/suite_cam7.xml M suites/suite_kessler.xml M suites/suite_tj2016.xml List any test failures: Is this a science-changing update? New physics package, algorithm change, tuning changes, etc? Yes --------- Co-authored-by: Jesse Nusbaumer <[email protected]>
- Loading branch information
1 parent
61ca4eb
commit c61b5a3
Showing
5 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
! This is a non-portable wrapper subroutine for cam_thermo_water_update | ||
! in the cam_thermo module. | ||
module thermo_water_update | ||
use ccpp_kinds, only: kind_phys | ||
|
||
implicit none | ||
private | ||
|
||
public :: thermo_water_update_run | ||
|
||
contains | ||
|
||
! Update water dependent properties | ||
!> \section arg_table_thermo_water_update_run Argument Table | ||
!! \htmlinclude arg_table_thermo_water_update_run.html | ||
subroutine thermo_water_update_run( & | ||
mmr, & | ||
ncol, pver, & | ||
energy_formula_dycore, & | ||
pdel, pdeldry, & | ||
cp_or_cv_dycore) | ||
|
||
! This scheme is non-portable due to dependencies on cam_thermo | ||
! for the actual logic of cam_thermo_water_update, which depends on air_composition | ||
! and a series of other subroutines/module properties | ||
use cam_thermo, only: cam_thermo_water_update | ||
|
||
! Input arguments | ||
real(kind_phys), intent(in) :: mmr(:,:,:) ! constituent mass mixing ratios [kg kg-1] | ||
integer, intent(in) :: ncol ! number of atmospheric columns | ||
integer, intent(in) :: pver ! number of vertical layers | ||
integer, intent(in) :: energy_formula_dycore ! total energy formulation used by dycore | ||
real(kind_phys), intent(in) :: pdel(:,:) ! layer thickness [Pa] | ||
real(kind_phys), intent(in) :: pdeldry(:,:) ! dry layer thickness [Pa] | ||
|
||
! Output arguments | ||
real(kind_phys), intent(out) :: cp_or_cv_dycore(:,:) ! enthalpy or heat capacity, dycore dependent [J K-1 kg-1] | ||
|
||
call cam_thermo_water_update( & | ||
mmr = mmr, & ! mmr*factor is a dry mixing ratio | ||
ncol = ncol, & | ||
pver = pver, & | ||
energy_formula = energy_formula_dycore, & | ||
cp_or_cv_dycore = cp_or_cv_dycore(:ncol,:), & | ||
to_dry_factor = pdel(:ncol,:)/pdeldry(:ncol,:) & ! factor to convert to dry | ||
) | ||
|
||
end subroutine thermo_water_update_run | ||
|
||
end module thermo_water_update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
[ccpp-table-properties] | ||
name = thermo_water_update | ||
type = scheme | ||
dependencies = ../../../../data/cam_thermo.F90 | ||
|
||
[ccpp-arg-table] | ||
name = thermo_water_update_run | ||
type = scheme | ||
[ mmr ] | ||
standard_name = ccpp_constituents | ||
units = none | ||
type = real | kind = kind_phys | ||
dimensions = (horizontal_loop_extent, vertical_layer_dimension, number_of_ccpp_constituents) | ||
intent = in | ||
[ ncol ] | ||
standard_name = horizontal_loop_extent | ||
units = count | ||
type = integer | ||
dimensions = () | ||
intent = in | ||
[ pver ] | ||
standard_name = vertical_layer_dimension | ||
units = count | ||
type = integer | ||
dimensions = () | ||
intent = in | ||
[ energy_formula_dycore ] | ||
standard_name = total_energy_formula_for_dycore | ||
units = 1 | ||
type = integer | ||
dimensions = () | ||
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 | ||
[ cp_or_cv_dycore ] | ||
standard_name = specific_heat_of_air_used_in_dycore | ||
units = J kg-1 K-1 | ||
type = real | kind = kind_phys | ||
dimensions = (horizontal_loop_extent, vertical_layer_dimension) | ||
intent = out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters