Changeset 27822
- Timestamp:
- 07/11/23 14:05:03 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp
r27361 r27822 435 435 /*First, recover current time from parameters: */ 436 436 bool linear_interp,average,cycle; 437 int timestepping; 437 438 IssmDouble dt; 438 439 this->parameters->FindParam(&linear_interp,TimesteppingInterpForcingEnum); … … 440 441 this->parameters->FindParam(&cycle,TimesteppingCycleForcingEnum); 441 442 this->parameters->FindParam(&dt,TimesteppingTimeStepEnum); /*transient core time step*/ 443 this->parameters->FindParam(×tepping,TimesteppingTypeEnum); 442 444 443 445 if(cycle){ … … 447 449 IssmDouble time1 = this->timesteps[this->numtimesteps - 1]; 448 450 449 /*We need the end time to be the last timestep that would be taken*/ 450 /* i.e., the case where GEMB has time stamps (finer timestep) after the last timestep */ 451 IssmDouble nsteps = reCast<int,IssmDouble>(time1/dt); 452 if (reCast<IssmDouble>(nsteps)<time1/dt) nsteps=nsteps+1; 453 time1 = nsteps*dt; 451 if(timestepping!=AdaptiveTimesteppingEnum){ 452 /*We need the end time to be the last timestep that would be taken*/ 453 /* i.e., the case where GEMB has time stamps (finer timestep) after the last timestep */ 454 /* warning: this assumes dt = constant!!*/ 455 IssmDouble nsteps = reCast<int,IssmDouble>(time1/dt); 456 if (reCast<IssmDouble>(nsteps)<time1/dt) nsteps=nsteps+1; 457 time1 = nsteps*dt; 458 } 454 459 455 460 /*See by how many intervals we have to offset time*/
Note:
See TracChangeset
for help on using the changeset viewer.