Skip to content

Commit 894c353

Browse files
committed
Remove code added by accident during testing.
1 parent 0d7919c commit 894c353

File tree

1 file changed

+35
-20
lines changed

1 file changed

+35
-20
lines changed

src/control/cam_comp.F90

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module cam_comp
1616

1717
use spmd_utils, only: masterproc, mpicom
1818
use cam_control_mod, only: cam_ctrl_init, cam_ctrl_set_orbit
19-
use cam_physics_control, only: cam_ctrl_set_physics_type
19+
use cam_control_mod, only: cam_ctrl_set_physics_type
2020
use cam_control_mod, only: caseid, ctitle
2121
use runtime_opts, only: read_namelist
2222
use runtime_obj, only: cam_runtime_opts
@@ -25,7 +25,8 @@ module cam_comp
2525
use time_manager, only: is_first_step, is_first_restart_step
2626

2727
use camsrfexch, only: cam_out_t, cam_in_t
28-
use physics_types, only: phys_state, phys_tend, dtime_phys
28+
use physics_types, only: phys_state, phys_tend
29+
use physics_types, only: dtime_phys
2930
use dyn_comp, only: dyn_import_t, dyn_export_t
3031

3132
use perf_mod, only: t_barrierf, t_startf, t_stopf
@@ -58,6 +59,7 @@ module cam_comp
5859
! Private interface (here to avoid circular dependency)
5960
private :: cam_register_constituents
6061

62+
6163
!-----------------------------------------------------------------------
6264
CONTAINS
6365
!-----------------------------------------------------------------------
@@ -85,7 +87,7 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
8587
use dyn_comp, only: dyn_init
8688
! use cam_restart, only: cam_read_restart
8789
use camsrfexch, only: hub2atm_alloc, atm2hub_alloc
88-
use cam_history, only: history_init_files
90+
! use cam_history, only: hist_init_files
8991
! use history_scam, only: scm_intht
9092
use cam_pio_utils, only: init_pio_subsystem
9193
use cam_instance, only: inst_suffix
@@ -233,7 +235,9 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
233235
! if (single_column) then
234236
! call scm_intht()
235237
! end if
236-
call history_init_files(model_doi_url, caseid, ctitle)
238+
!!XXgoldyXX: v need to import this
239+
! call hist_init_files(model_doi_url, caseid, ctitle)
240+
!!XXgoldyXX: ^ need to import this
237241

238242
end subroutine cam_init
239243

@@ -392,8 +396,10 @@ subroutine cam_run4(cam_out, cam_in, rstwr, nlend, &
392396
! file output.
393397
!
394398
!-----------------------------------------------------------------------
399+
! use cam_history, only: wshist, wrapup
395400
! use cam_restart, only: cam_write_restart
396401
! use qneg_module, only: qneg_print_summary
402+
use time_manager, only: is_last_step
397403

398404
type(cam_out_t), intent(inout) :: cam_out ! Output from CAM to surface
399405
type(cam_in_t), intent(inout) :: cam_in ! Input from surface to CAM
@@ -404,6 +410,18 @@ subroutine cam_run4(cam_out, cam_in, rstwr, nlend, &
404410
integer, intent(in), optional :: day_spec ! Simulation day
405411
integer, intent(in), optional :: sec_spec ! Secs in current simulation day
406412

413+
!----------------------------------------------------------
414+
! History and restart logic: Write and/or dispose history
415+
! tapes if required
416+
!----------------------------------------------------------
417+
!
418+
!!XXgoldyXX: v need to import this
419+
! call t_barrierf('sync_wshist', mpicom)
420+
! call t_startf('wshist')
421+
! call wshist()
422+
! call t_stopf('wshist')
423+
!!XXgoldyXX: ^ need to import this
424+
407425
!
408426
! Write restart files
409427
!
@@ -423,39 +441,37 @@ subroutine cam_run4(cam_out, cam_in, rstwr, nlend, &
423441
call t_stopf('cam_write_restart')
424442
end if
425443

444+
!!XXgoldyXX: v need to import this
445+
! call t_startf ('cam_run4_wrapup')
446+
! call wrapup(rstwr, nlend)
447+
! call t_stopf ('cam_run4_wrapup')
448+
!!XXgoldyXX: ^ need to import this
449+
450+
call shr_sys_flush(iulog)
451+
426452
end subroutine cam_run4
427453

428454
!
429455
!-----------------------------------------------------------------------
430456
!
431-
subroutine cam_timestep_final(rstwr, nlend, do_ncdata_check)
457+
subroutine cam_timestep_final(do_ncdata_check)
432458
!-----------------------------------------------------------------------
433459
!
434460
! Purpose: Timestep final runs at the end of each timestep
435461
!
436462
!-----------------------------------------------------------------------
437463

438-
use phys_comp, only: phys_timestep_final
439-
use cam_history, only: history_write_files
440-
use cam_history, only: history_wrap_up
441-
logical, intent(in) :: rstwr ! write restart file
442-
logical, intent(in) :: nlend ! this is final timestep
464+
use phys_comp, only: phys_timestep_final
465+
443466
!Flag for whether a snapshot (ncdata) check should be run or not
444-
! - flag is true if this is not the first or last step
445-
logical, intent(in) :: do_ncdata_check
467+
logical, intent(in) :: do_ncdata_check
446468

447-
if (do_ncdata_check .or. get_nstep() == 0) then
448-
call history_write_files()
449-
! peverwhee - todo: handle restarts
450-
call history_wrap_up(rstwr, nlend)
451-
end if
452469
!
453470
!----------------------------------------------------------
454471
! PHYS_TIMESTEP_FINAL Call the Physics package
455472
!----------------------------------------------------------
456473
!
457474
call phys_timestep_final(do_ncdata_check)
458-
call shr_sys_flush(iulog)
459475

460476
end subroutine cam_timestep_final
461477

@@ -526,6 +542,7 @@ subroutine cam_register_constituents(cam_runtime_opts)
526542
! physics suite being invoked during this run.
527543
use cam_abortutils, only: endrun, check_allocate
528544
use runtime_obj, only: runtime_options
545+
use runtime_obj, only: wv_stdname
529546
use phys_comp, only: phys_suite_name
530547
use cam_constituents, only: cam_constituents_init
531548
use cam_constituents, only: const_set_qmin, const_get_index
@@ -535,7 +552,6 @@ subroutine cam_register_constituents(cam_runtime_opts)
535552
use cam_ccpp_cap, only: cam_ccpp_number_constituents
536553
use cam_ccpp_cap, only: cam_model_const_properties
537554
use cam_ccpp_cap, only: cam_ccpp_is_scheme_constituent
538-
use runtime_obj, only: wv_stdname
539555

540556
! Dummy arguments
541557
type(runtime_options), intent(in) :: cam_runtime_opts
@@ -546,7 +562,6 @@ subroutine cam_register_constituents(cam_runtime_opts)
546562
integer :: errflg
547563
character(len=512) :: errmsg
548564
type(ccpp_constituent_prop_ptr_t), pointer :: const_props(:)
549-
type(ccpp_constituent_properties_t), allocatable, target :: dynamic_constituents(:)
550565
character(len=*), parameter :: subname = 'cam_register_constituents: '
551566

552567
! Initalize error flag and message:

0 commit comments

Comments
 (0)