Skip to content

Commit

Permalink
CHG: calving rate in CalvingMIP use normal vector from the levelset
Browse files Browse the repository at this point in the history
  • Loading branch information
enigne committed Jul 22, 2024
1 parent a8e81db commit 8b089ab
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/c/classes/Elements/Tria.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1122,8 +1122,6 @@ void Tria::CalvingRateParameterization(){/*{{{*/
void Tria::CalvingRateCalvingMIP(){/*{{{*/

IssmDouble calvingrate[NUMVERTICES];
IssmDouble calvingratex[NUMVERTICES];
IssmDouble calvingratey[NUMVERTICES];
int experiment = 1; /* exp:1 by default */
int dim, domaintype;
IssmDouble vx, vy, vel, c, wrate;
Expand Down Expand Up @@ -1177,7 +1175,7 @@ void Tria::CalvingRateCalvingMIP(){/*{{{*/
case 4:
/* Exp 4: set c=v-wrate(given), for the first 500 years, then c=0 for the second 500 years*/
if((groundedice<0) && (time<=500.0*yts)) {
// wrate_input->GetInputValue(&wrate,&gauss);
// wrate_input->GetInputValue(&wrate,&gauss);
wrate = -750*sin(2.0*M_PI*time/yts/1000)/yts; // m/a -> m/s
}
else {
Expand All @@ -1190,13 +1188,10 @@ void Tria::CalvingRateCalvingMIP(){/*{{{*/
}

calvingrate[iv] = vel - wrate;
calvingratex[iv] = vx - wrate*vx/vel;
calvingratey[iv] = vy - wrate*vy/vel;
}
/*Add input*/
this->AddInput(CalvingCalvingrateEnum,&calvingrate[0],P1DGEnum);
this->AddInput(CalvingratexEnum,&calvingratex[0],P1DGEnum);
this->AddInput(CalvingrateyEnum,&calvingratey[0],P1DGEnum);
this->CalvingRateToVector();
}
/*}}}*/
IssmDouble Tria::CharacteristicLength(void){/*{{{*/
Expand Down

0 comments on commit 8b089ab

Please sign in to comment.