Changeset 27342


Ignore:
Timestamp:
10/27/22 10:07:59 (2 years ago)
Author:
vverjans
Message:

BUG: fixing indexing in Armaprocess

Location:
issm/trunk-jpl/src/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Element.cpp

    r27341 r27342  
    130130                        /*Compute polynomial with parameters of indperiod*/
    131131                        if(indperiod==0) telapsed_break = tatstep;
    132                         else             telapsed_break = tatstep-datebreaks_basin[indperiod];
     132                        else             telapsed_break = tatstep-datebreaks_basin[indperiod-1];
    133133                        for(int j=0;j<numparams;j++)   sumpoly[s] = sumpoly[s]+polyparams_basin[indperiod+j*numperiods]*pow(telapsed_break,j);
    134134                }
     
    27672767                /*Compute intercept+trend terms with parameters of indperiod*/
    27682768      if(indperiod==0) telapsed_break = time;
    2769       else             telapsed_break = time-datebreaks_b[indperiod];
     2769      else             telapsed_break = time-datebreaks_b[indperiod-1];
    27702770      piecewiselin = intercepts_b[indperiod]+trends_b[indperiod]*telapsed_break;
    27712771        }
  • issm/trunk-jpl/src/c/modules/FrontalForcingsx/FrontalForcingsx.cpp

    r27335 r27342  
    101101   xDelete<IssmDouble>(polyparams);
    102102   xDelete<IssmDouble>(datebreaks);
     103   xDelete<IssmDouble>(monthdatebreaks);
     104   xDelete<IssmDouble>(monthintercepts);
     105   xDelete<IssmDouble>(monthtrends);
    103106}/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.