diff --git a/src/biogeochem/CNPhenologyMod.F90 b/src/biogeochem/CNPhenologyMod.F90 index d1024e350f..5ad4fb1157 100644 --- a/src/biogeochem/CNPhenologyMod.F90 +++ b/src/biogeochem/CNPhenologyMod.F90 @@ -392,10 +392,7 @@ subroutine CNPhenology (bounds, num_soilc, filter_soilc, num_soilp, & soilstate_inst, temperature_inst, atm2lnd_inst, wateratm2lndbulk_inst, cnveg_state_inst, & cnveg_carbonstate_inst, cnveg_nitrogenstate_inst, cnveg_carbonflux_inst, cnveg_nitrogenflux_inst) -!KO if (num_pcropp > 0 .and. .not. is_first_step()) then -!KO if (num_pcropp > 0) then -!KO call CropPhenology(num_pcropp, filter_pcropp, & waterdiagnosticbulk_inst, temperature_inst, crop_inst, canopystate_inst, cnveg_state_inst, & cnveg_carbonstate_inst, cnveg_nitrogenstate_inst, cnveg_carbonflux_inst, cnveg_nitrogenflux_inst, & diff --git a/src/biogeochem/CNVegetationFacade.F90 b/src/biogeochem/CNVegetationFacade.F90 index 74a49f16a0..dd20ce50a2 100644 --- a/src/biogeochem/CNVegetationFacade.F90 +++ b/src/biogeochem/CNVegetationFacade.F90 @@ -1285,11 +1285,7 @@ subroutine EndOfTimeStepVegDynamics(this, bounds, num_natvegp, filter_natvegp, & ! Call dv (dynamic vegetation) at last time step of year call t_startf('d2dgvm') -!KO if (is_end_curr_year() .and. .not. is_first_step()) then -!KO - ! is_first_step check no longer necessary since there is no nstep=0 if (is_end_curr_year()) then -!KO ! Get date info. kyr is used in lpj(). At end of first year, kyr = 2. call get_curr_date(yr, mon, day, sec) @@ -1341,11 +1337,7 @@ subroutine WriteHistory(this, bounds) ! Write to CNDV history buffer if appropriate if (use_cndv) then -!KO if (is_end_curr_year() .and. .not. is_first_step()) then -!KO - ! is_first_step check no longer necessary since there is no nstep=0 if (is_end_curr_year()) then -!KO call t_startf('clm_drv_io_hdgvm') call CNDVHist( bounds, this%dgvs_inst ) if (masterproc) write(iulog,*) 'Annual CNDV calculations are complete' diff --git a/src/biogeochem/CropType.F90 b/src/biogeochem/CropType.F90 index 9279347a44..54395c4668 100644 --- a/src/biogeochem/CropType.F90 +++ b/src/biogeochem/CropType.F90 @@ -930,11 +930,7 @@ subroutine CropIncrementYear (this, num_pcropp, filter_pcropp) ! Update nyrs when it's the end of the year (unless it's the very start of the ! run). This assumes that, if this patch is active at the end of the year, then it was ! active for the whole year. -!KO if ((kmo == 1 .and. kda == 1 .and. mcsec == 0) .and. .not. is_first_step()) then -!KO - ! is_first_step check no longer necessary since there is no nstep=0 if ((kmo == 1 .and. kda == 1 .and. mcsec == 0)) then -!KO do fp = 1, num_pcropp p = filter_pcropp(fp) diff --git a/src/biogeochem/dynCNDVMod.F90 b/src/biogeochem/dynCNDVMod.F90 index 57e90d8917..d95313772a 100644 --- a/src/biogeochem/dynCNDVMod.F90 +++ b/src/biogeochem/dynCNDVMod.F90 @@ -99,11 +99,7 @@ subroutine dynCNDV_interp( bounds, dgvs_inst) patch%wtcol(p) = dgvs_inst%fpcgrid_patch(p) + & wt1 * (dgvs_inst%fpcgridold_patch(p) - dgvs_inst%fpcgrid_patch(p)) -!KO ! I don't think this is necessary since there no longer an nstep=0 -!KO if (mon==1 .and. day==1 .and. sec==dtime .and. nstep>0) then -!KO if (mon==1 .and. day==1 .and. sec==dtime) then -!KO dgvs_inst%fpcgridold_patch(p) = dgvs_inst%fpcgrid_patch(p) end if end if diff --git a/src/biogeophys/WaterStateType.F90 b/src/biogeophys/WaterStateType.F90 index 15763c47a7..35441d65d9 100644 --- a/src/biogeophys/WaterStateType.F90 +++ b/src/biogeophys/WaterStateType.F90 @@ -810,7 +810,6 @@ subroutine Restart(this, bounds, ncid, flag, & ! If initial run -- ensure that water is properly bounded (read only) if (flag == 'read' ) then -!KO ! I think leaving this in here is still necessary even though is_first_step is now based on nstep=1 if ( is_first_step() .and. bound_h2osoi) then do c = bounds%begc, bounds%endc l = col%landunit(c) diff --git a/src/main/clm_driver.F90 b/src/main/clm_driver.F90 index e3f57afc8c..f93143d9e3 100644 --- a/src/main/clm_driver.F90 +++ b/src/main/clm_driver.F90 @@ -206,7 +206,6 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate, ro ! are passed to CLM in initialization, then this code block can be removed. ! ======================================================================== -!KO I think leaving this in here is still necessary even though is_first_step is now based on nstep=1 need_glacier_initialization = is_first_step() if (need_glacier_initialization) then @@ -1369,41 +1368,38 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate, ro ! FIX(SPM, 082814) - in the fates branch RF and I commented out the if(.not. ! use_fates) then statement ... double check if this is required and why -! I don't think this is necessary since there no longer an nstep=0 -!KO if (nstep > 0) then - call t_startf('accum') + call t_startf('accum') - call atm2lnd_inst%UpdateAccVars(bounds_proc) + call atm2lnd_inst%UpdateAccVars(bounds_proc) - call temperature_inst%UpdateAccVars(bounds_proc, crop_inst) + call temperature_inst%UpdateAccVars(bounds_proc, crop_inst) - call canopystate_inst%UpdateAccVars(bounds_proc) + call canopystate_inst%UpdateAccVars(bounds_proc) - call water_inst%UpdateAccVars(bounds_proc) + call water_inst%UpdateAccVars(bounds_proc) - call energyflux_inst%UpdateAccVars(bounds_proc) + call energyflux_inst%UpdateAccVars(bounds_proc) - ! COMPILER_BUG(wjs, 2014-11-30, pgi 14.7) For pgi 14.7 to be happy when - ! compiling this threaded, I needed to change the dummy arguments to be - ! pointers, and get rid of the explicit bounds in the subroutine call. - ! call bgc_vegetation_inst%UpdateAccVars(bounds_proc, & - ! t_a10_patch=temperature_inst%t_a10_patch(bounds_proc%begp:bounds_proc%endp), & - ! t_ref2m_patch=temperature_inst%t_ref2m_patch(bounds_proc%begp:bounds_proc%endp)) - call bgc_vegetation_inst%UpdateAccVars(bounds_proc, & - t_a10_patch=temperature_inst%t_a10_patch, & - t_ref2m_patch=temperature_inst%t_ref2m_patch) + ! COMPILER_BUG(wjs, 2014-11-30, pgi 14.7) For pgi 14.7 to be happy when + ! compiling this threaded, I needed to change the dummy arguments to be + ! pointers, and get rid of the explicit bounds in the subroutine call. + ! call bgc_vegetation_inst%UpdateAccVars(bounds_proc, & + ! t_a10_patch=temperature_inst%t_a10_patch(bounds_proc%begp:bounds_proc%endp), & + ! t_ref2m_patch=temperature_inst%t_ref2m_patch(bounds_proc%begp:bounds_proc%endp)) + call bgc_vegetation_inst%UpdateAccVars(bounds_proc, & + t_a10_patch=temperature_inst%t_a10_patch, & + t_ref2m_patch=temperature_inst%t_ref2m_patch) - if (use_crop) then - call crop_inst%CropUpdateAccVars(bounds_proc, & - temperature_inst%t_ref2m_patch, temperature_inst%t_soisno_col) - end if + if (use_crop) then + call crop_inst%CropUpdateAccVars(bounds_proc, & + temperature_inst%t_ref2m_patch, temperature_inst%t_soisno_col) + end if - if(use_fates) then - call clm_fates%UpdateAccVars(bounds_proc) - end if + if(use_fates) then + call clm_fates%UpdateAccVars(bounds_proc) + end if - call t_stopf('accum') -!KO end if + call t_stopf('accum') ! ============================================================================ ! Update history buffer diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index b98847ccc2..b51d98fa20 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -2662,10 +2662,7 @@ subroutine htape_timeconst3D(t, & ! !DESCRIPTION: ! Write time constant 3D variables to history tapes. ! Only write out when this subroutine is called (normally only for -!KO ! primary history files at very first time-step, nstep=0). -!KO ! primary history files at very first time-step, nstep=1). -!KO ! Issue the required netcdf wrapper calls to define the history file ! contents. ! @@ -4140,13 +4137,6 @@ subroutine hist_htapes_wrapup( rstwr, nlend, bounds, & cycle end if -!KO ! Should no longer be needed -!KO ! Skip nstep=0 if monthly average -!KO -!KO if (nstep==0 .and. tape(t)%nhtfrq==0) then -!KO cycle -!KO end if - ! Determine if end of history interval tape(t)%is_endhist = .false. if (tape(t)%nhtfrq==0) then !monthly average diff --git a/src/utils/AnnualFluxDribbler.F90 b/src/utils/AnnualFluxDribbler.F90 index a6a880d16e..8ea854b904 100644 --- a/src/utils/AnnualFluxDribbler.F90 +++ b/src/utils/AnnualFluxDribbler.F90 @@ -258,11 +258,8 @@ subroutine set_curr_delta(this, bounds, delta) do i = beg_index, end_index this%amount_from_this_timestep(i) = delta(i) end do -!KO if (.not. this%allows_non_annual_delta .and. .not. is_first_step()) then -!KO ! is_first_step check no longer necessary since there is no nstep=0 if (.not. this%allows_non_annual_delta) then -!KO do i = beg_index, end_index if (this%amount_from_this_timestep(i) /= 0._r8) then write(iulog,*) subname//' ERROR: found unexpected non-zero delta mid-year' diff --git a/src/utils/clm_time_manager.F90 b/src/utils/clm_time_manager.F90 index 924075937d..ea9d98599d 100644 --- a/src/utils/clm_time_manager.F90 +++ b/src/utils/clm_time_manager.F90 @@ -238,10 +238,8 @@ subroutine timemgr_init( ) tm_perp_date = TimeSetymd( perpetual_ymd, 0, "tm_perp_date" ) end if -!KO - ! Advance time step to start at nstep=1 (instead of nstep=0) + ! Advance time step to start at nstep=1 call advance_timestep() -!KO ! Print configuration summary to log file (stdout). @@ -1750,10 +1748,7 @@ logical function is_first_step() call ESMF_ClockGet( tm_clock, advanceCount=step_no, rc=rc ) call chkrc(rc, sub//': error return from ESMF_ClockGet') nstep = step_no -!KO is_first_step = (nstep == 0) -!KO is_first_step = (nstep == 1) -!KO end function is_first_step !=========================================================================================