Changeset 27361


Ignore:
Timestamp:
11/08/22 12:43:35 (2 years ago)
Author:
Mathieu Morlighem
Message:

CHG: moving code to if(cycle)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp

    r27185 r27361  
    441441        this->parameters->FindParam(&dt,TimesteppingTimeStepEnum);          /*transient core time step*/
    442442
    443         /*Change input time if we cycle through the forcing*/
    444         IssmDouble time0 = this->timesteps[0];
    445         IssmDouble time1 = this->timesteps[this->numtimesteps - 1];
    446 
    447         /*We need the end time to be the last timestep that would be taken*/
    448         /* i.e., the case where GEMB has time stamps (finer timestep) after the last timestep */
    449         IssmDouble nsteps = reCast<int,IssmDouble>(time1/dt);
    450         if (reCast<IssmDouble>(nsteps)<time1/dt) nsteps=nsteps+1;
    451         time1 = nsteps*dt;
    452 
    453443        if(cycle){
     444
     445                /*Change input time if we cycle through the forcing*/
     446                IssmDouble time0 = this->timesteps[0];
     447                IssmDouble time1 = this->timesteps[this->numtimesteps - 1];
     448
     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;
    454454
    455455                /*See by how many intervals we have to offset time*/
Note: See TracChangeset for help on using the changeset viewer.