Index: ../trunk-jpl/src/c/classes/Inputs/TransientInput.cpp =================================================================== --- ../trunk-jpl/src/c/classes/Inputs/TransientInput.cpp (revision 26196) +++ ../trunk-jpl/src/c/classes/Inputs/TransientInput.cpp (revision 26197) @@ -419,8 +419,22 @@ this->parameters->FindParam(&linear_interp,TimesteppingInterpForcingsEnum); this->parameters->FindParam(&cycle,TimesteppingCycleForcingEnum); - if(cycle) _error_("not implemented yet"); + /*Change input time if we cycle through the forcing*/ + IssmDouble time0 = this->timesteps[0]; + IssmDouble time1 = this->timesteps[this->numtimesteps - 1]; + if(cycle && (timetime1)){ + /*See by how many intervals we have to offset time*/ + IssmDouble deltat = time1-time0; + + //int num_intervals = floor((time-time0)/deltat); //Cannot do that because of AD! + int num_intervals = reCast(fabs(time-time0)/deltat); + if(timetimesteps,this->numtimesteps)){ @@ -479,7 +493,6 @@ this->current_input->Scale(alpha1); this->current_input->AXPY(input2,alpha2); } - }/*}}}*/ void TransientInput::SetAverageAsCurrentTimeInput(IssmDouble start_time,IssmDouble end_time, int averaging_method){/*{{{*/