source: issm/oecreview/Archive/27230-27343/ISSM-27251-27252.diff@ 27344

Last change on this file since 27344 was 27344, checked in by Mathieu Morlighem, 2 years ago

CHG: added Archive/27230-27343

File size: 6.6 KB
  • ../trunk-jpl/src/m/classes/calvingparameterization.m

     
    1111                alpha = 0;
    1212                xoffset = 0;
    1313                yoffset = 0;
    14                 vel_upperbound = 6000;
     14                vel_upperbound = 8000;
     15                vel_threshold = 6000;
    1516                vel_lowerbound = 0;
    1617        end
    1718        methods
     
    6768                        md = checkfield(md,'fieldname','calving.xoffset','NaN',1,'Inf',1,'numel',1);
    6869                        md = checkfield(md,'fieldname','calving.yoffset','NaN',1,'Inf',1,'numel',1);
    6970                        md = checkfield(md,'fieldname','calving.vel_lowerbound','NaN',1,'Inf',1,'numel',1);
     71                        md = checkfield(md,'fieldname','calving.vel_threshold','NaN',1,'Inf',1,'numel',1);
    7072                        md = checkfield(md,'fieldname','calving.vel_upperbound','NaN',1,'Inf',1,'numel',1);
    7173                end % }}}
    7274                function disp(self) % {{{
     
    7880                        fielddisplay(self,'xoffset','offset in x-axis');
    7981                        fielddisplay(self,'yoffset','offset in y-axis');
    8082                        fielddisplay(self,'vel_lowerbound','lowerbound of ice velocity to reduce the calving rate [m/a]');
     83                        fielddisplay(self,'vel_threshold','threshold of ice velocity to reduce the calving rate [m/a]');
    8184                        fielddisplay(self,'vel_upperbound','upperbound of ice velocity to reduce the calving rate [m/a]');
    8285                end % }}}
    8386                function marshall(self,prefix,md,fid) % {{{
     
    9093                        WriteData(fid,prefix,'object',self,'fieldname','xoffset','format','Double');
    9194                        WriteData(fid,prefix,'object',self,'fieldname','yoffset','format','Double');
    9295                        WriteData(fid,prefix,'object',self,'fieldname','vel_lowerbound','format','Double','scale', 1./yts);
     96                        WriteData(fid,prefix,'object',self,'fieldname','vel_threshold','format','Double','scale', 1./yts);
    9397                        WriteData(fid,prefix,'object',self,'fieldname','vel_upperbound','format','Double','scale', 1./yts);
    9498                end % }}}
    9599        end
  • ../trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp

     
    225225                        parameters->AddObject(iomodel->CopyConstantObject("md.calving.xoffset",CalvingXoffsetEnum));
    226226                        parameters->AddObject(iomodel->CopyConstantObject("md.calving.yoffset",CalvingYoffsetEnum));
    227227                        parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_lowerbound",CalvingVelLowerboundEnum));
     228                        parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_threshold",CalvingVelThresholdEnum));
    228229                        parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_upperbound",CalvingVelUpperboundEnum));
    229230                        break;
    230231                default:
  • ../trunk-jpl/src/c/classes/Elements/Tria.cpp

     
    844844        IssmDouble  arate, rho_ice, rho_water, thickness;
    845845        int                     use_parameter=-1;
    846846        IssmDouble  gamma, theta, alpha, xoffset, yoffset;
    847         IssmDouble  vel_lower, vel_upper, vrate, truncateVrate;
     847        IssmDouble  vel_lower, vel_upper, vel_threshold, vrate, truncateVrate;
    848848
    849849        /* Get node coordinates and dof list: */
    850850        ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
     
    872872        this->FindParam(&yoffset, CalvingYoffsetEnum);
    873873        this->FindParam(&vel_lower, CalvingVelLowerboundEnum);
    874874        this->FindParam(&vel_upper, CalvingVelUpperboundEnum);
     875        this->FindParam(&vel_threshold, CalvingVelThresholdEnum);
    875876
    876877        /* Start looping on the number of vertices: */
    877878        GaussTria* gauss=new GaussTria();
     
    890891                sl_input->GetInputValue(&sealevel,gauss);
    891892                arate_input->GetInputValue(&arate,gauss);
    892893                vrate = 1.0;
    893                 if (vel < vel_upper) vrate = vel / vel_upper;
     894                if (vel < vel_threshold) vrate = vel / vel_threshold;
    894895
    895896                /*Compute strain rate and viscosity: */
    896897                this->StrainRateSSA(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
     
    923924                                break;
    924925                        case 3:
    925926                                /* 3 tanh(normal vel): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
    926                                 _error_("The normalized velocity is not supported yet!");
    927                                 gamma = yoffset -  0.5*theta*tanh(alpha*(vel+xoffset));
     927                                truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / (vel_upper - vel_lower);
     928                                gamma = yoffset -  0.5*theta*tanh(alpha*(truncateVrate+xoffset));
    928929                                break;
    929930                        case 4:
    930                                 /* 4 tanh(truncated vel): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
    931                                 truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / vel_upper;
     931                                /* 4 tanh(normal vel), cross (0,0): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
     932                                truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / (vel_upper - vel_lower);
    932933                                gamma = 0.5*theta*(tanh(alpha*xoffset) - tanh(alpha*(truncateVrate+xoffset)));
    933934                                break;
    934935                        case -1:
     
    945946                if (bed >= sealevel) gamma = 0.0;
    946947
    947948                /*-------------------------------------------*/
    948                 if (use_parameter < 3) {
    949                         calvingrate[iv] = arate*gamma*vrate;
    950                 }
    951                 else {
    952                         calvingrate[iv] = arate*gamma;
    953                 }
     949                calvingrate[iv] = arate*gamma*vrate;
    954950        }
    955951        /*Add input*/
    956952        this->AddInput(CalvingCalvingrateEnum,&calvingrate[0],P1DGEnum);
  • ../trunk-jpl/src/c/cores/movingfront_core.cpp

     
    1919        int  domaintype, num_extrapol_vars, index,reinit_frequency,step;
    2020        int* extrapol_vars=NULL;
    2121        Analysis  *analysis=NULL;
     22        IssmDouble maxVel;
    2223
    2324        /* recover parameters */
    2425        femmodel->parameters->FindParam(&domaintype,DomainTypeEnum);
     
    5051        /* smoothen slope of lsf for computation of normal on ice domain*/
    5152        levelsetfunctionslope_core(femmodel);
    5253
     54        /* compute the maximal velocity over the whole domain */
     55        femmodel->MaxVelx(&maxVel);
     56        femmodel->parameters->SetParam(maxVel, CalvingVelThresholdEnum);
     57
    5358        /* start the work from here */
    5459        if(VerboseSolution()) _printf0_("   computing calving and undercutting\n");
    5560        Calvingx(femmodel);
  • ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h

     
    118118        CalvingXoffsetEnum,
    119119        CalvingYoffsetEnum,
    120120        CalvingVelLowerboundEnum,
     121        CalvingVelThresholdEnum,
    121122        CalvingVelUpperboundEnum,
    122123        ConfigurationTypeEnum,
    123124        ConstantsGEnum,
Note: See TracBrowser for help on using the repository browser.