Changeset 27252


Ignore:
Timestamp:
08/31/22 12:50:05 (3 years ago)
Author:
Cheng Gong
Message:

CHG: use max Vel to normalize the parameterization of the frontal ablation rate

Location:
issm/trunk-jpl/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp

    r27250 r27252  
    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;
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r27226 r27252  
    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: */
     
    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: */
     
    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: */
     
    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;
     
    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*/
  • issm/trunk-jpl/src/c/cores/movingfront_core.cpp

    r27017 r27252  
    2020        int* extrapol_vars=NULL;
    2121        Analysis  *analysis=NULL;
     22        IssmDouble maxVel;
    2223
    2324        /* recover parameters */
     
    5051        /* smoothen slope of lsf for computation of normal on ice domain*/
    5152        levelsetfunctionslope_core(femmodel);
     53
     54        /* compute the maximal velocity over the whole domain */
     55        femmodel->MaxVelx(&maxVel);
     56        femmodel->parameters->SetParam(maxVel, CalvingVelThresholdEnum);
    5257
    5358        /* start the work from here */
  • issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h

    r27250 r27252  
    119119        CalvingYoffsetEnum,
    120120        CalvingVelLowerboundEnum,
     121        CalvingVelThresholdEnum,
    121122        CalvingVelUpperboundEnum,
    122123        ConfigurationTypeEnum,
  • issm/trunk-jpl/src/m/classes/calvingparameterization.m

    r27226 r27252  
    1212                xoffset = 0;
    1313                yoffset = 0;
    14                 vel_upperbound = 6000;
     14                vel_upperbound = 8000;
     15                vel_threshold = 6000;
    1516                vel_lowerbound = 0;
    1617        end
     
    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 % }}}
     
    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 % }}}
     
    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 % }}}
Note: See TracChangeset for help on using the changeset viewer.