set_thermodynamic_energy_formula Subroutine

subroutine set_thermodynamic_energy_formula()

Uses

    • physics_types
    • cam_logfile
    • cam_thermo_formula
  • proc~~set_thermodynamic_energy_formula~~UsesGraph proc~set_thermodynamic_energy_formula set_thermodynamic_energy_formula cam_logfile cam_logfile proc~set_thermodynamic_energy_formula->cam_logfile cam_thermo_formula cam_thermo_formula proc~set_thermodynamic_energy_formula->cam_thermo_formula physics_types physics_types proc~set_thermodynamic_energy_formula->physics_types

Set the thermodynamic energy formula of dynamical core to MPAS. (KCW, 2025-07-17)

Arguments

None

Calls

proc~~set_thermodynamic_energy_formula~~CallsGraph proc~set_thermodynamic_energy_formula set_thermodynamic_energy_formula interface~dyn_debug_print dyn_debug_print proc~set_thermodynamic_energy_formula->interface~dyn_debug_print proc~dyn_debug_print dyn_debug_print interface~dyn_debug_print->proc~dyn_debug_print stringify stringify proc~dyn_debug_print->stringify

Called by

proc~~set_thermodynamic_energy_formula~~CalledByGraph proc~set_thermodynamic_energy_formula set_thermodynamic_energy_formula proc~dyn_init dyn_init proc~dyn_init->proc~set_thermodynamic_energy_formula interface~dyn_init dyn_init interface~dyn_init->proc~dyn_init

Variables

Type Visibility Attributes Name Initial
character(len=*), private, parameter :: subname = 'dyn_comp::set_thermodynamic_energy_formula'

Source Code

    subroutine set_thermodynamic_energy_formula()
        ! Module(s) from CAM-SIMA.
        use cam_logfile, only: debugout_debug
        use cam_thermo_formula, only: energy_formula_dycore, energy_formula_dycore_mpas
        use physics_types, only: dycore_energy_consistency_adjust

        character(*), parameter :: subname = 'dyn_comp::set_thermodynamic_energy_formula'

        call dyn_debug_print(debugout_debug, subname // ' entered')

        ! Set the thermodynamic energy formula of dynamical core to MPAS for use in `cam_thermo`.
        energy_formula_dycore = energy_formula_dycore_mpas

        ! The total energy of dynamical core, which uses "MPAS formula" as set above, is not consistent with
        ! that of CAM physics, which uses "FV formula". Therefore, temperature and temperature tendency adjustments
        ! are needed at the end of each physics time step.
        dycore_energy_consistency_adjust = .true.

        call dyn_debug_print(debugout_debug, subname // ' completed')
    end subroutine set_thermodynamic_energy_formula