[27344] | 1 | Index: ../trunk-jpl/src/m/classes/calvingparameterization.m
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/m/classes/calvingparameterization.m (revision 27251)
|
---|
| 4 | +++ ../trunk-jpl/src/m/classes/calvingparameterization.m (revision 27252)
|
---|
| 5 | @@ -11,7 +11,8 @@
|
---|
| 6 | alpha = 0;
|
---|
| 7 | xoffset = 0;
|
---|
| 8 | yoffset = 0;
|
---|
| 9 | - vel_upperbound = 6000;
|
---|
| 10 | + vel_upperbound = 8000;
|
---|
| 11 | + vel_threshold = 6000;
|
---|
| 12 | vel_lowerbound = 0;
|
---|
| 13 | end
|
---|
| 14 | methods
|
---|
| 15 | @@ -67,6 +68,7 @@
|
---|
| 16 | md = checkfield(md,'fieldname','calving.xoffset','NaN',1,'Inf',1,'numel',1);
|
---|
| 17 | md = checkfield(md,'fieldname','calving.yoffset','NaN',1,'Inf',1,'numel',1);
|
---|
| 18 | md = checkfield(md,'fieldname','calving.vel_lowerbound','NaN',1,'Inf',1,'numel',1);
|
---|
| 19 | + md = checkfield(md,'fieldname','calving.vel_threshold','NaN',1,'Inf',1,'numel',1);
|
---|
| 20 | md = checkfield(md,'fieldname','calving.vel_upperbound','NaN',1,'Inf',1,'numel',1);
|
---|
| 21 | end % }}}
|
---|
| 22 | function disp(self) % {{{
|
---|
| 23 | @@ -78,6 +80,7 @@
|
---|
| 24 | fielddisplay(self,'xoffset','offset in x-axis');
|
---|
| 25 | fielddisplay(self,'yoffset','offset in y-axis');
|
---|
| 26 | fielddisplay(self,'vel_lowerbound','lowerbound of ice velocity to reduce the calving rate [m/a]');
|
---|
| 27 | + fielddisplay(self,'vel_threshold','threshold of ice velocity to reduce the calving rate [m/a]');
|
---|
| 28 | fielddisplay(self,'vel_upperbound','upperbound of ice velocity to reduce the calving rate [m/a]');
|
---|
| 29 | end % }}}
|
---|
| 30 | function marshall(self,prefix,md,fid) % {{{
|
---|
| 31 | @@ -90,6 +93,7 @@
|
---|
| 32 | WriteData(fid,prefix,'object',self,'fieldname','xoffset','format','Double');
|
---|
| 33 | WriteData(fid,prefix,'object',self,'fieldname','yoffset','format','Double');
|
---|
| 34 | WriteData(fid,prefix,'object',self,'fieldname','vel_lowerbound','format','Double','scale', 1./yts);
|
---|
| 35 | + WriteData(fid,prefix,'object',self,'fieldname','vel_threshold','format','Double','scale', 1./yts);
|
---|
| 36 | WriteData(fid,prefix,'object',self,'fieldname','vel_upperbound','format','Double','scale', 1./yts);
|
---|
| 37 | end % }}}
|
---|
| 38 | end
|
---|
| 39 | Index: ../trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp
|
---|
| 40 | ===================================================================
|
---|
| 41 | --- ../trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp (revision 27251)
|
---|
| 42 | +++ ../trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp (revision 27252)
|
---|
| 43 | @@ -225,6 +225,7 @@
|
---|
| 44 | parameters->AddObject(iomodel->CopyConstantObject("md.calving.xoffset",CalvingXoffsetEnum));
|
---|
| 45 | parameters->AddObject(iomodel->CopyConstantObject("md.calving.yoffset",CalvingYoffsetEnum));
|
---|
| 46 | parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_lowerbound",CalvingVelLowerboundEnum));
|
---|
| 47 | + parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_threshold",CalvingVelThresholdEnum));
|
---|
| 48 | parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_upperbound",CalvingVelUpperboundEnum));
|
---|
| 49 | break;
|
---|
| 50 | default:
|
---|
| 51 | Index: ../trunk-jpl/src/c/classes/Elements/Tria.cpp
|
---|
| 52 | ===================================================================
|
---|
| 53 | --- ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 27251)
|
---|
| 54 | +++ ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 27252)
|
---|
| 55 | @@ -844,7 +844,7 @@
|
---|
| 56 | IssmDouble arate, rho_ice, rho_water, thickness;
|
---|
| 57 | int use_parameter=-1;
|
---|
| 58 | IssmDouble gamma, theta, alpha, xoffset, yoffset;
|
---|
| 59 | - IssmDouble vel_lower, vel_upper, vrate, truncateVrate;
|
---|
| 60 | + IssmDouble vel_lower, vel_upper, vel_threshold, vrate, truncateVrate;
|
---|
| 61 |
|
---|
| 62 | /* Get node coordinates and dof list: */
|
---|
| 63 | ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
|
---|
| 64 | @@ -872,6 +872,7 @@
|
---|
| 65 | this->FindParam(&yoffset, CalvingYoffsetEnum);
|
---|
| 66 | this->FindParam(&vel_lower, CalvingVelLowerboundEnum);
|
---|
| 67 | this->FindParam(&vel_upper, CalvingVelUpperboundEnum);
|
---|
| 68 | + this->FindParam(&vel_threshold, CalvingVelThresholdEnum);
|
---|
| 69 |
|
---|
| 70 | /* Start looping on the number of vertices: */
|
---|
| 71 | GaussTria* gauss=new GaussTria();
|
---|
| 72 | @@ -890,7 +891,7 @@
|
---|
| 73 | sl_input->GetInputValue(&sealevel,gauss);
|
---|
| 74 | arate_input->GetInputValue(&arate,gauss);
|
---|
| 75 | vrate = 1.0;
|
---|
| 76 | - if (vel < vel_upper) vrate = vel / vel_upper;
|
---|
| 77 | + if (vel < vel_threshold) vrate = vel / vel_threshold;
|
---|
| 78 |
|
---|
| 79 | /*Compute strain rate and viscosity: */
|
---|
| 80 | this->StrainRateSSA(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
|
---|
| 81 | @@ -923,12 +924,12 @@
|
---|
| 82 | break;
|
---|
| 83 | case 3:
|
---|
| 84 | /* 3 tanh(normal vel): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
|
---|
| 85 | - _error_("The normalized velocity is not supported yet!");
|
---|
| 86 | - gamma = yoffset - 0.5*theta*tanh(alpha*(vel+xoffset));
|
---|
| 87 | + truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / (vel_upper - vel_lower);
|
---|
| 88 | + gamma = yoffset - 0.5*theta*tanh(alpha*(truncateVrate+xoffset));
|
---|
| 89 | break;
|
---|
| 90 | case 4:
|
---|
| 91 | - /* 4 tanh(truncated vel): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
|
---|
| 92 | - truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / vel_upper;
|
---|
| 93 | + /* 4 tanh(normal vel), cross (0,0): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
|
---|
| 94 | + truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / (vel_upper - vel_lower);
|
---|
| 95 | gamma = 0.5*theta*(tanh(alpha*xoffset) - tanh(alpha*(truncateVrate+xoffset)));
|
---|
| 96 | break;
|
---|
| 97 | case -1:
|
---|
| 98 | @@ -945,12 +946,7 @@
|
---|
| 99 | if (bed >= sealevel) gamma = 0.0;
|
---|
| 100 |
|
---|
| 101 | /*-------------------------------------------*/
|
---|
| 102 | - if (use_parameter < 3) {
|
---|
| 103 | - calvingrate[iv] = arate*gamma*vrate;
|
---|
| 104 | - }
|
---|
| 105 | - else {
|
---|
| 106 | - calvingrate[iv] = arate*gamma;
|
---|
| 107 | - }
|
---|
| 108 | + calvingrate[iv] = arate*gamma*vrate;
|
---|
| 109 | }
|
---|
| 110 | /*Add input*/
|
---|
| 111 | this->AddInput(CalvingCalvingrateEnum,&calvingrate[0],P1DGEnum);
|
---|
| 112 | Index: ../trunk-jpl/src/c/cores/movingfront_core.cpp
|
---|
| 113 | ===================================================================
|
---|
| 114 | --- ../trunk-jpl/src/c/cores/movingfront_core.cpp (revision 27251)
|
---|
| 115 | +++ ../trunk-jpl/src/c/cores/movingfront_core.cpp (revision 27252)
|
---|
| 116 | @@ -19,6 +19,7 @@
|
---|
| 117 | int domaintype, num_extrapol_vars, index,reinit_frequency,step;
|
---|
| 118 | int* extrapol_vars=NULL;
|
---|
| 119 | Analysis *analysis=NULL;
|
---|
| 120 | + IssmDouble maxVel;
|
---|
| 121 |
|
---|
| 122 | /* recover parameters */
|
---|
| 123 | femmodel->parameters->FindParam(&domaintype,DomainTypeEnum);
|
---|
| 124 | @@ -50,6 +51,10 @@
|
---|
| 125 | /* smoothen slope of lsf for computation of normal on ice domain*/
|
---|
| 126 | levelsetfunctionslope_core(femmodel);
|
---|
| 127 |
|
---|
| 128 | + /* compute the maximal velocity over the whole domain */
|
---|
| 129 | + femmodel->MaxVelx(&maxVel);
|
---|
| 130 | + femmodel->parameters->SetParam(maxVel, CalvingVelThresholdEnum);
|
---|
| 131 | +
|
---|
| 132 | /* start the work from here */
|
---|
| 133 | if(VerboseSolution()) _printf0_(" computing calving and undercutting\n");
|
---|
| 134 | Calvingx(femmodel);
|
---|
| 135 | Index: ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
|
---|
| 136 | ===================================================================
|
---|
| 137 | --- ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h (revision 27251)
|
---|
| 138 | +++ ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h (revision 27252)
|
---|
| 139 | @@ -118,6 +118,7 @@
|
---|
| 140 | CalvingXoffsetEnum,
|
---|
| 141 | CalvingYoffsetEnum,
|
---|
| 142 | CalvingVelLowerboundEnum,
|
---|
| 143 | + CalvingVelThresholdEnum,
|
---|
| 144 | CalvingVelUpperboundEnum,
|
---|
| 145 | ConfigurationTypeEnum,
|
---|
| 146 | ConstantsGEnum,
|
---|