Skip to content

Commit 11e9a20

Browse files
committed
Update nstep from model state; add FADIAB physics-suite
1 parent 7a706da commit 11e9a20

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
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/jimmielin/atmospheric_physics
23-
fxtag = 7b46000
23+
fxtag = 1003f81
2424
fxrequired = AlwaysRequired
2525
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
2626
[submodule "ccs_config"]

cime_config/config_component.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@
159159
<value compset="_CAM\d0%WX.*%SDYN">-nlev 145</value> -->
160160

161161
<!-- Simple models -->
162-
<!-- <value compset="_CAM%ADIAB">-phys adiabatic</value>
163-
<value compset="_CAM%DABIP04">-phys adiabatic</value> -->
162+
<value compset="_CAM%ADIAB">--physics-suites adiabatic</value>
163+
<!-- <value compset="_CAM%DABIP04">-phys adiabatic</value> -->
164164
<value compset="_CAM%TJ16">--physics-suites tj2016 --analytic_ic</value>
165165
<!-- <value compset="_CAM%KESSLER">-phys kessler -chem terminator -analytic_ic</value> -->
166166
<value compset="_CAM%KESSLER">--physics-suites kessler --analytic_ic</value>

src/control/cam_comp.F90

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +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
32+
use physics_types, only: is_first_timestep, nstep
3333
use dyn_comp, only: dyn_import_t, dyn_export_t
3434

3535
use perf_mod, only: t_barrierf, t_startf, t_stopf
@@ -149,12 +149,6 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
149149
character(len=cx) :: errmsg
150150
!-----------------------------------------------------------------------
151151

152-
dtime_phys = 0.0_r8
153-
call mark_as_initialized('timestep_for_physics')
154-
155-
is_first_timestep = .true.
156-
call mark_as_initialized('is_first_timestep')
157-
158152
call init_pio_subsystem()
159153

160154
! Initializations using data passed from coupler.
@@ -170,12 +164,20 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
170164

171165
call cam_ctrl_set_orbit(eccen, obliqr, lambm0, mvelpp)
172166

173-
174167
call timemgr_init( &
175168
dtime, calendar, start_ymd, start_tod, ref_ymd, &
176169
ref_tod, stop_ymd, stop_tod, curr_ymd, curr_tod, &
177170
perpetual_run, perpetual_ymd, initial_run_in)
178171

172+
dtime_phys = 0.0_r8
173+
call mark_as_initialized('timestep_for_physics')
174+
175+
is_first_timestep = .true.
176+
call mark_as_initialized('is_first_timestep')
177+
178+
nstep = get_nstep()
179+
call mark_as_initialized('current_timestep_number')
180+
179181
! Get current fractional calendar day. Needs to be updated at every timestep.
180182
calday = get_curr_calday()
181183
call mark_as_initialized('fractional_calendar_days_on_end_of_current_timestep')
@@ -269,6 +271,7 @@ subroutine cam_timestep_init()
269271

270272
! Update timestep flags in physics state
271273
is_first_timestep = is_first_step()
274+
nstep = get_nstep()
272275

273276
!----------------------------------------------------------
274277
! First phase of dynamics (at least couple from dynamics to physics)
@@ -516,10 +519,6 @@ subroutine cam_final(cam_out, cam_in)
516519
type(cam_out_t), pointer :: cam_out ! Output from CAM to surface
517520
type(cam_in_t), pointer :: cam_in ! Input from merged surface to CAM
518521

519-
!
520-
! Local variable
521-
!
522-
integer :: nstep ! Current timestep number.
523522
!-----------------------------------------------------------------------
524523

525524
call phys_final()
@@ -542,7 +541,6 @@ subroutine cam_final(cam_out, cam_in)
542541
call shr_sys_flush( iulog ) ! Flush all output to the CAM log file
543542

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

src/physics/ncar_ccpp

0 commit comments

Comments
 (0)