Skip to content

Commit

Permalink
Merge branch 'development' into hplin/tropopause_find_stname
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmielin committed Dec 16, 2024
2 parents 027c414 + 37fdbfb commit 8ac1eac
Show file tree
Hide file tree
Showing 28 changed files with 2,070 additions and 356 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[submodule "ncar-physics"]
path = src/physics/ncar_ccpp
url = https://github.com/ESCOMP/atmospheric_physics
fxtag = 0ecfcc155ac0387ef9db3304611c6f3ef055ac1d
fxtag = e7a599f4bb1533f7cdcd8723b1f864e11578e96c
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
[submodule "ccs_config"]
Expand Down
3 changes: 1 addition & 2 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@
<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%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
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 @@ -149,9 +150,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 @@ -167,12 +165,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 @@ -268,6 +274,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 @@ -514,10 +524,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 @@ -540,7 +546,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
4 changes: 3 additions & 1 deletion src/control/cam_control_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ module cam_control_mod
logical, protected :: branch_run ! branch from a previous run; requires a restart file
logical, protected :: post_assim ! We are resuming after a pause

logical, protected :: aqua_planet ! Flag to run model in "aqua planet" mode
logical, protected :: brnch_retain_casename ! true => branch run may use same caseid as
! the run being branched from

!> \section arg_table_cam_control_mod Argument Table
!! \htmlinclude arg_table_cam_control_mod.html
logical, protected :: aqua_planet ! Flag to run model in "aqua planet" mode
real(r8), protected :: eccen ! Earth's eccentricity factor (unitless) (typically 0 to 0.1)
real(r8), protected :: obliqr ! Earth's obliquity in radians
real(r8), protected :: lambm0 ! Mean longitude of perihelion at the
Expand Down
33 changes: 33 additions & 0 deletions src/control/cam_control_mod.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[ccpp-table-properties]
name = cam_control_mod
type = module

[ccpp-arg-table]
name = cam_control_mod
type = module
[ aqua_planet ]
standard_name = is_aqua_planet
units = flag
type = logical
dimensions = ()
[ eccen ]
standard_name = planet_orbital_eccentricity_factor
units = 1
type = real | kind = r8
dimensions = ()
[ obliqr ]
standard_name = planet_obliquity
long_name = planet's axial tilt (obliquity)
units = rad
type = real | kind = r8
dimensions = ()
[ lambm0 ]
standard_name = mean_longitude_of_perihelion_at_vernal_equinox
units = rad
type = real | kind = r8
dimensions = ()
[ mvelpp ]
standard_name = moving_vernal_equinox_longitude_of_perihelion_plus_pi
units = rad
type = real | kind = r8
dimensions = ()
Loading

0 comments on commit 8ac1eac

Please sign in to comment.