Skip to content

Commit 8ac1eac

Browse files
committed
Merge branch 'development' into hplin/tropopause_find_stname
2 parents 027c414 + 37fdbfb commit 8ac1eac

28 files changed

+2070
-356
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[submodule "ncar-physics"]
2121
path = src/physics/ncar_ccpp
2222
url = https://github.com/ESCOMP/atmospheric_physics
23-
fxtag = 0ecfcc155ac0387ef9db3304611c6f3ef055ac1d
23+
fxtag = e7a599f4bb1533f7cdcd8723b1f864e11578e96c
2424
fxrequired = AlwaysRequired
2525
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
2626
[submodule "ccs_config"]

cime_config/config_component.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@
161161
<value compset="_CAM\d0%WX.*%SDYN">-nlev 145</value> -->
162162

163163
<!-- Simple models -->
164-
<!-- <value compset="_CAM%ADIAB">-phys adiabatic</value>
165-
<value compset="_CAM%DABIP04">-phys adiabatic</value> -->
164+
<value compset="_CAM%ADIAB">--physics-suites adiabatic</value>
166165
<value compset="_CAM%TJ16">--physics-suites tj2016 --analytic_ic</value>
167166
<!-- <value compset="_CAM%KESSLER">-phys kessler -chem terminator -analytic_ic</value> -->
168167
<value compset="_CAM%KESSLER">--physics-suites kessler --analytic_ic</value>

src/control/cam_comp.F90

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module cam_comp
2929
use physics_types, only: phys_state, phys_tend
3030
use physics_types, only: dtime_phys
3131
use physics_types, only: calday
32+
use physics_types, only: is_first_timestep, nstep
3233
use dyn_comp, only: dyn_import_t, dyn_export_t
3334

3435
use perf_mod, only: t_barrierf, t_startf, t_stopf
@@ -149,9 +150,6 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
149150
character(len=cx) :: errmsg
150151
!-----------------------------------------------------------------------
151152

152-
dtime_phys = 0.0_r8
153-
call mark_as_initialized('timestep_for_physics')
154-
155153
call init_pio_subsystem()
156154

157155
! Initializations using data passed from coupler.
@@ -167,12 +165,20 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
167165

168166
call cam_ctrl_set_orbit(eccen, obliqr, lambm0, mvelpp)
169167

170-
171168
call timemgr_init( &
172169
dtime, calendar, start_ymd, start_tod, ref_ymd, &
173170
ref_tod, stop_ymd, stop_tod, curr_ymd, curr_tod, &
174171
perpetual_run, perpetual_ymd, initial_run_in)
175172

173+
dtime_phys = 0.0_r8
174+
call mark_as_initialized('timestep_for_physics')
175+
176+
is_first_timestep = .true.
177+
call mark_as_initialized('is_first_timestep')
178+
179+
nstep = get_nstep()
180+
call mark_as_initialized('current_timestep_number')
181+
176182
! Get current fractional calendar day. Needs to be updated at every timestep.
177183
calday = get_curr_calday()
178184
call mark_as_initialized('fractional_calendar_days_on_end_of_current_timestep')
@@ -268,6 +274,10 @@ subroutine cam_timestep_init()
268274
use phys_comp, only: phys_timestep_init
269275
use stepon, only: stepon_timestep_init
270276

277+
! Update timestep flags in physics state
278+
is_first_timestep = is_first_step()
279+
nstep = get_nstep()
280+
271281
!----------------------------------------------------------
272282
! First phase of dynamics (at least couple from dynamics to physics)
273283
! Return time-step for physics from dynamics.
@@ -514,10 +524,6 @@ subroutine cam_final(cam_out, cam_in)
514524
type(cam_out_t), pointer :: cam_out ! Output from CAM to surface
515525
type(cam_in_t), pointer :: cam_in ! Input from merged surface to CAM
516526

517-
!
518-
! Local variable
519-
!
520-
integer :: nstep ! Current timestep number.
521527
!-----------------------------------------------------------------------
522528

523529
call phys_final()
@@ -540,7 +546,6 @@ subroutine cam_final(cam_out, cam_in)
540546
call shr_sys_flush( iulog ) ! Flush all output to the CAM log file
541547

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

src/control/cam_control_mod.F90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ module cam_control_mod
2828
logical, protected :: branch_run ! branch from a previous run; requires a restart file
2929
logical, protected :: post_assim ! We are resuming after a pause
3030

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

34+
!> \section arg_table_cam_control_mod Argument Table
35+
!! \htmlinclude arg_table_cam_control_mod.html
36+
logical, protected :: aqua_planet ! Flag to run model in "aqua planet" mode
3537
real(r8), protected :: eccen ! Earth's eccentricity factor (unitless) (typically 0 to 0.1)
3638
real(r8), protected :: obliqr ! Earth's obliquity in radians
3739
real(r8), protected :: lambm0 ! Mean longitude of perihelion at the

src/control/cam_control_mod.meta

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[ccpp-table-properties]
2+
name = cam_control_mod
3+
type = module
4+
5+
[ccpp-arg-table]
6+
name = cam_control_mod
7+
type = module
8+
[ aqua_planet ]
9+
standard_name = is_aqua_planet
10+
units = flag
11+
type = logical
12+
dimensions = ()
13+
[ eccen ]
14+
standard_name = planet_orbital_eccentricity_factor
15+
units = 1
16+
type = real | kind = r8
17+
dimensions = ()
18+
[ obliqr ]
19+
standard_name = planet_obliquity
20+
long_name = planet's axial tilt (obliquity)
21+
units = rad
22+
type = real | kind = r8
23+
dimensions = ()
24+
[ lambm0 ]
25+
standard_name = mean_longitude_of_perihelion_at_vernal_equinox
26+
units = rad
27+
type = real | kind = r8
28+
dimensions = ()
29+
[ mvelpp ]
30+
standard_name = moving_vernal_equinox_longitude_of_perihelion_plus_pi
31+
units = rad
32+
type = real | kind = r8
33+
dimensions = ()

0 commit comments

Comments
 (0)