Skip to content

Commit

Permalink
Remove code added by accident during testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
nusbaume committed Sep 10, 2024
1 parent 0d7919c commit 894c353
Showing 1 changed file with 35 additions and 20 deletions.
55 changes: 35 additions & 20 deletions src/control/cam_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module cam_comp

use spmd_utils, only: masterproc, mpicom
use cam_control_mod, only: cam_ctrl_init, cam_ctrl_set_orbit
use cam_physics_control, only: cam_ctrl_set_physics_type
use cam_control_mod, only: cam_ctrl_set_physics_type
use cam_control_mod, only: caseid, ctitle
use runtime_opts, only: read_namelist
use runtime_obj, only: cam_runtime_opts
Expand All @@ -25,7 +25,8 @@ module cam_comp
use time_manager, only: is_first_step, is_first_restart_step

use camsrfexch, only: cam_out_t, cam_in_t
use physics_types, only: phys_state, phys_tend, dtime_phys
use physics_types, only: phys_state, phys_tend
use physics_types, only: dtime_phys
use dyn_comp, only: dyn_import_t, dyn_export_t

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


!-----------------------------------------------------------------------
CONTAINS
!-----------------------------------------------------------------------
Expand Down Expand Up @@ -85,7 +87,7 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
use dyn_comp, only: dyn_init
! use cam_restart, only: cam_read_restart
use camsrfexch, only: hub2atm_alloc, atm2hub_alloc
use cam_history, only: history_init_files
! use cam_history, only: hist_init_files
! use history_scam, only: scm_intht
use cam_pio_utils, only: init_pio_subsystem
use cam_instance, only: inst_suffix
Expand Down Expand Up @@ -233,7 +235,9 @@ subroutine cam_init(caseid, ctitle, model_doi_url, &
! if (single_column) then
! call scm_intht()
! end if
call history_init_files(model_doi_url, caseid, ctitle)
!!XXgoldyXX: v need to import this
! call hist_init_files(model_doi_url, caseid, ctitle)
!!XXgoldyXX: ^ need to import this

end subroutine cam_init

Expand Down Expand Up @@ -392,8 +396,10 @@ subroutine cam_run4(cam_out, cam_in, rstwr, nlend, &
! file output.
!
!-----------------------------------------------------------------------
! use cam_history, only: wshist, wrapup
! use cam_restart, only: cam_write_restart
! use qneg_module, only: qneg_print_summary
use time_manager, only: is_last_step

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

!----------------------------------------------------------
! History and restart logic: Write and/or dispose history
! tapes if required
!----------------------------------------------------------
!
!!XXgoldyXX: v need to import this
! call t_barrierf('sync_wshist', mpicom)
! call t_startf('wshist')
! call wshist()
! call t_stopf('wshist')
!!XXgoldyXX: ^ need to import this

!
! Write restart files
!
Expand All @@ -423,39 +441,37 @@ subroutine cam_run4(cam_out, cam_in, rstwr, nlend, &
call t_stopf('cam_write_restart')
end if

!!XXgoldyXX: v need to import this
! call t_startf ('cam_run4_wrapup')
! call wrapup(rstwr, nlend)
! call t_stopf ('cam_run4_wrapup')
!!XXgoldyXX: ^ need to import this

call shr_sys_flush(iulog)

end subroutine cam_run4

!
!-----------------------------------------------------------------------
!
subroutine cam_timestep_final(rstwr, nlend, do_ncdata_check)
subroutine cam_timestep_final(do_ncdata_check)
!-----------------------------------------------------------------------
!
! Purpose: Timestep final runs at the end of each timestep
!
!-----------------------------------------------------------------------

use phys_comp, only: phys_timestep_final
use cam_history, only: history_write_files
use cam_history, only: history_wrap_up
logical, intent(in) :: rstwr ! write restart file
logical, intent(in) :: nlend ! this is final timestep
use phys_comp, only: phys_timestep_final

!Flag for whether a snapshot (ncdata) check should be run or not
! - flag is true if this is not the first or last step
logical, intent(in) :: do_ncdata_check
logical, intent(in) :: do_ncdata_check

if (do_ncdata_check .or. get_nstep() == 0) then
call history_write_files()
! peverwhee - todo: handle restarts
call history_wrap_up(rstwr, nlend)
end if
!
!----------------------------------------------------------
! PHYS_TIMESTEP_FINAL Call the Physics package
!----------------------------------------------------------
!
call phys_timestep_final(do_ncdata_check)
call shr_sys_flush(iulog)

end subroutine cam_timestep_final

Expand Down Expand Up @@ -526,6 +542,7 @@ subroutine cam_register_constituents(cam_runtime_opts)
! physics suite being invoked during this run.
use cam_abortutils, only: endrun, check_allocate
use runtime_obj, only: runtime_options
use runtime_obj, only: wv_stdname
use phys_comp, only: phys_suite_name
use cam_constituents, only: cam_constituents_init
use cam_constituents, only: const_set_qmin, const_get_index
Expand All @@ -535,7 +552,6 @@ subroutine cam_register_constituents(cam_runtime_opts)
use cam_ccpp_cap, only: cam_ccpp_number_constituents
use cam_ccpp_cap, only: cam_model_const_properties
use cam_ccpp_cap, only: cam_ccpp_is_scheme_constituent
use runtime_obj, only: wv_stdname

! Dummy arguments
type(runtime_options), intent(in) :: cam_runtime_opts
Expand All @@ -546,7 +562,6 @@ subroutine cam_register_constituents(cam_runtime_opts)
integer :: errflg
character(len=512) :: errmsg
type(ccpp_constituent_prop_ptr_t), pointer :: const_props(:)
type(ccpp_constituent_properties_t), allocatable, target :: dynamic_constituents(:)
character(len=*), parameter :: subname = 'cam_register_constituents: '

! Initalize error flag and message:
Expand Down

0 comments on commit 894c353

Please sign in to comment.