Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements cam_thermo_water_update and CCPPized check_energy #316

Merged
merged 43 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8648970
Initial implementation of cp_to_cv_dycore/cam_thermo_water_update fro…
jimmielin Sep 12, 2024
333ad4e
Initial port of updates to energy budget (port of CAM #761) into CAM-…
jimmielin Sep 16, 2024
041cdfb
Add is_first_timestep registry
jimmielin Sep 16, 2024
7493a1d
Fix build issues; update factor in get_cp call to 1/dp
jimmielin Sep 16, 2024
4ce8427
Add gmean_mod to src/utils including support infra in physics_grid.F90
jimmielin Sep 20, 2024
2372f7f
Fix for b4b to CAM-SIMA (w/ History); add notes on modifications and/…
jimmielin Oct 2, 2024
c015e28
Update ncar-physics external
jimmielin Oct 15, 2024
e13e7ea
Fix build (part 1); update standard names and atmos_phys external
jimmielin Oct 15, 2024
0d16be9
New const_get_index logic without cam_ccpp_cap dependency
jimmielin Oct 15, 2024
8fca3a4
Update vcoord to energy_formula
jimmielin Oct 22, 2024
38fdbb2
Read cp_or_cv_dycore and identify dycore information from CAM snapshot
jimmielin Oct 24, 2024
240ef54
Set wv_idx in air_composition
jimmielin Oct 24, 2024
bef25fb
Update atmos_phys external
jimmielin Oct 25, 2024
8b8a8e0
Fix merge conflicts
jimmielin Oct 25, 2024
53cba06
Implements CCPPized check_energy in SIMA.
jimmielin Oct 25, 2024
a4d3866
Add adiabatic scheme and check_energy_fix
jimmielin Nov 4, 2024
e0450f9
Fix index underflow in get_hydrostatic_energy; update ncar-physics ex…
jimmielin Nov 4, 2024
6e5873e
Update with ne3np4 inic files
jimmielin Nov 5, 2024
768040e
Now mark energy consistency variables in registry as initialized in d…
jimmielin Nov 5, 2024
03100c1
Fix remaining issues in adiabatic scheme; add teout to registry and i…
jimmielin Nov 5, 2024
e4d387f
Merge branch 'hplin/check_energy' into hplin/check_energy_rebase
jimmielin Nov 7, 2024
3a1a5b9
Update ncar-physics external for dycore_energy_consistency_adjust
jimmielin Nov 8, 2024
7a706da
Update atmospheric_physics external; standard names to address review…
jimmielin Nov 13, 2024
11e9a20
Update nstep from model state; add FADIAB physics-suite
jimmielin Nov 13, 2024
800bf8b
Update standard names from review comments; add flag for energy consi…
jimmielin Nov 14, 2024
916cb9f
rga -> gravit
jimmielin Nov 14, 2024
b7abae1
gmean diagnostic updates
jimmielin Nov 14, 2024
6105ca8
Address review comments (update external)
jimmielin Nov 15, 2024
cca6e42
Merge branch 'development' into hplin/check_energy_rebase
jimmielin Dec 10, 2024
f999707
Address review comments
jimmielin Dec 10, 2024
3d2fd91
Address review comments
jimmielin Dec 12, 2024
fc1789b
Remove mention of check_energy_timestep_init in dp_coupling since it …
jimmielin Dec 12, 2024
58a151a
Fix build
jimmielin Dec 12, 2024
63dff8f
Add pver dim check in cam_thermo_dry_air_update
jimmielin Dec 12, 2024
55ea5b3
Pass cp_or_cv_dycore explicitly to cam_thermo_water_update in prepara…
jimmielin Dec 12, 2024
a8b977b
Fixes for MPAS dynamical core to support cam_thermo_water_update
jimmielin Dec 12, 2024
7448d73
Fix FPHYStest test failure
jimmielin Dec 12, 2024
4bbb920
Address review comments
jimmielin Dec 12, 2024
e28e9b9
Update src/dynamics/mpas/dyn_comp.F90
jimmielin Dec 13, 2024
2769a0d
Update src/dynamics/mpas/dyn_comp.F90
jimmielin Dec 13, 2024
835bfbe
Update src/dynamics/mpas/dyn_comp.F90
jimmielin Dec 13, 2024
1df3251
Update src/dynamics/mpas/dyn_comp.F90
jimmielin Dec 13, 2024
dc50fea
Update list of existing test failures
jimmielin Dec 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
fxDONOTUSEurl = https://github.com/MPAS-Dev/MPAS-Model.git
[submodule "ncar-physics"]
path = src/physics/ncar_ccpp
url = https://github.com/ESCOMP/atmospheric_physics
fxtag = e95c172d7a5a0ebf054f420b08416228e211baa3
url = https://github.com/jimmielin/atmospheric_physics
fxtag = 7b188e35
nusbaume marked this conversation as resolved.
Show resolved Hide resolved
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
[submodule "ccs_config"]
Expand Down
4 changes: 2 additions & 2 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@
<value compset="_CAM\d0%WX.*%SDYN">-nlev 145</value> -->

<!-- Simple models -->
<!-- <value compset="_CAM%ADIAB">-phys adiabatic</value>
<value compset="_CAM%DABIP04">-phys adiabatic</value> -->
<value compset="_CAM%ADIAB">--physics-suites adiabatic</value>
<!-- <value compset="_CAM%DABIP04">-phys adiabatic</value> -->
nusbaume marked this conversation as resolved.
Show resolved Hide resolved
<value compset="_CAM%TJ16">--physics-suites tj2016 --analytic_ic</value>
<!-- <value compset="_CAM%KESSLER">-phys kessler -chem terminator -analytic_ic</value> -->
<value compset="_CAM%KESSLER">--physics-suites kessler --analytic_ic</value>
Expand Down
4 changes: 4 additions & 0 deletions cime_config/namelist_definition_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
<value hgrid="8x16" ic_ymd="10101" nlev="26">${DIN_LOC_ROOT}/atm/cam/inic/gaus/cami_0000-01-01_8x16_L26_c030228.nc</value>
<value hgrid="8x16" ic_ymd="901" nlev="26">${DIN_LOC_ROOT}/atm/cam/inic/gaus/cami_0000-09-01_8x16_L26_c030918.nc</value>
<value hgrid="8x16" ic_ymd="10101" nlev="30">${DIN_LOC_ROOT}/atm/cam/inic/gaus/cami_0000-01-01_8x16_L30_c090102.nc</value>
<value dyn="se" hgrid="ne3np4" ic_ymd="10101" nlev="32">${DIN_LOC_ROOT}/atm/cam/inic/se/cam6_QPC6_topo_ne3pg3_mg37_L32_01-01-31_c221214.nc</value>
<value dyn="se" hgrid="ne3np4" ic_ymd="901" nlev="32">${DIN_LOC_ROOT}/atm/cam/inic/se/CESM2.F2000climo.ne3np4.cam.i.0003-09-01-00000.nc</value>
<value dyn="se" hgrid="ne3np4" ic_ymd="10101" nlev="30">${DIN_LOC_ROOT}/atm/cam/inic/se/cami_0000-01-01_ne3np4_L30_c120315.nc</value>
<value dyn="se" hgrid="ne3np4" ic_ymd="10101" nlev="26">${DIN_LOC_ROOT}/atm/cam/inic/se/cami_0000-01-01_ne3np4_L26_c120525.nc</value>
<value dyn="se" hgrid="ne5np4" ic_ymd="10101" nlev="30">${DIN_LOC_ROOT}/atm/cam/inic/homme/cami-mam3_0000-01_ne5np4_L30.140707.nc</value>
<value dyn="se" hgrid="ne16np4" ic_ymd="10101" nlev="26">${DIN_LOC_ROOT}/atm/cam/inic/se/ape_topo_cam4_ne16np4_L26_c171020.nc</value>
<value dyn="se" hgrid="ne16np4" ic_ymd="10101" nlev="30">${DIN_LOC_ROOT}/atm/cam/inic/se/ape_topo_cam4_ne16np4_L30_c171020.nc</value>
Expand Down
23 changes: 14 additions & 9 deletions src/control/cam_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module cam_comp
use physics_types, only: phys_state, phys_tend
use physics_types, only: dtime_phys
use physics_types, only: calday
use physics_types, only: is_first_timestep, nstep
use dyn_comp, only: dyn_import_t, dyn_export_t

use perf_mod, only: t_barrierf, t_startf, t_stopf
Expand Down Expand Up @@ -148,9 +149,6 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
character(len=cx) :: errmsg
!-----------------------------------------------------------------------

dtime_phys = 0.0_r8
call mark_as_initialized('timestep_for_physics')

call init_pio_subsystem()

! Initializations using data passed from coupler.
Expand All @@ -166,12 +164,20 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &

call cam_ctrl_set_orbit(eccen, obliqr, lambm0, mvelpp)


call timemgr_init( &
dtime, calendar, start_ymd, start_tod, ref_ymd, &
ref_tod, stop_ymd, stop_tod, curr_ymd, curr_tod, &
perpetual_run, perpetual_ymd, initial_run_in)

dtime_phys = 0.0_r8
call mark_as_initialized('timestep_for_physics')

is_first_timestep = .true.
call mark_as_initialized('is_first_timestep')

nstep = get_nstep()
call mark_as_initialized('current_timestep_number')

! Get current fractional calendar day. Needs to be updated at every timestep.
calday = get_curr_calday()
call mark_as_initialized('fractional_calendar_days_on_end_of_current_timestep')
Expand Down Expand Up @@ -263,6 +269,10 @@ subroutine cam_timestep_init()
use phys_comp, only: phys_timestep_init
use stepon, only: stepon_timestep_init

! Update timestep flags in physics state
is_first_timestep = is_first_step()
nstep = get_nstep()

!----------------------------------------------------------
! First phase of dynamics (at least couple from dynamics to physics)
! Return time-step for physics from dynamics.
Expand Down Expand Up @@ -509,10 +519,6 @@ subroutine cam_final(cam_out, cam_in)
type(cam_out_t), pointer :: cam_out ! Output from CAM to surface
type(cam_in_t), pointer :: cam_in ! Input from merged surface to CAM

!
! Local variable
!
integer :: nstep ! Current timestep number.
!-----------------------------------------------------------------------

call phys_final()
Expand All @@ -535,7 +541,6 @@ subroutine cam_final(cam_out, cam_in)
call shr_sys_flush( iulog ) ! Flush all output to the CAM log file

if (masterproc) then
nstep = get_nstep()
write(iulog,9300) nstep-1,nstep
9300 format (//'Number of completed timesteps:',i6,/,'Time step ',i6, &
' partially done to provide convectively adjusted and ', &
Expand Down
Loading