source:
issm/oecreview/Archive/27230-27343/ISSM-27251-27252.diff@
27344
Last change on this file since 27344 was 27344, checked in by , 2 years ago | |
---|---|
File size: 6.6 KB |
-
../trunk-jpl/src/m/classes/calvingparameterization.m
11 11 alpha = 0; 12 12 xoffset = 0; 13 13 yoffset = 0; 14 vel_upperbound = 6000; 14 vel_upperbound = 8000; 15 vel_threshold = 6000; 15 16 vel_lowerbound = 0; 16 17 end 17 18 methods … … 67 68 md = checkfield(md,'fieldname','calving.xoffset','NaN',1,'Inf',1,'numel',1); 68 69 md = checkfield(md,'fieldname','calving.yoffset','NaN',1,'Inf',1,'numel',1); 69 70 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); 70 72 md = checkfield(md,'fieldname','calving.vel_upperbound','NaN',1,'Inf',1,'numel',1); 71 73 end % }}} 72 74 function disp(self) % {{{ … … 78 80 fielddisplay(self,'xoffset','offset in x-axis'); 79 81 fielddisplay(self,'yoffset','offset in y-axis'); 80 82 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]'); 81 84 fielddisplay(self,'vel_upperbound','upperbound of ice velocity to reduce the calving rate [m/a]'); 82 85 end % }}} 83 86 function marshall(self,prefix,md,fid) % {{{ … … 90 93 WriteData(fid,prefix,'object',self,'fieldname','xoffset','format','Double'); 91 94 WriteData(fid,prefix,'object',self,'fieldname','yoffset','format','Double'); 92 95 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); 93 97 WriteData(fid,prefix,'object',self,'fieldname','vel_upperbound','format','Double','scale', 1./yts); 94 98 end % }}} 95 99 end -
../trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp
225 225 parameters->AddObject(iomodel->CopyConstantObject("md.calving.xoffset",CalvingXoffsetEnum)); 226 226 parameters->AddObject(iomodel->CopyConstantObject("md.calving.yoffset",CalvingYoffsetEnum)); 227 227 parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_lowerbound",CalvingVelLowerboundEnum)); 228 parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_threshold",CalvingVelThresholdEnum)); 228 229 parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_upperbound",CalvingVelUpperboundEnum)); 229 230 break; 230 231 default: -
../trunk-jpl/src/c/classes/Elements/Tria.cpp
844 844 IssmDouble arate, rho_ice, rho_water, thickness; 845 845 int use_parameter=-1; 846 846 IssmDouble gamma, theta, alpha, xoffset, yoffset; 847 IssmDouble vel_lower, vel_upper, v rate, truncateVrate;847 IssmDouble vel_lower, vel_upper, vel_threshold, vrate, truncateVrate; 848 848 849 849 /* Get node coordinates and dof list: */ 850 850 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); … … 872 872 this->FindParam(&yoffset, CalvingYoffsetEnum); 873 873 this->FindParam(&vel_lower, CalvingVelLowerboundEnum); 874 874 this->FindParam(&vel_upper, CalvingVelUpperboundEnum); 875 this->FindParam(&vel_threshold, CalvingVelThresholdEnum); 875 876 876 877 /* Start looping on the number of vertices: */ 877 878 GaussTria* gauss=new GaussTria(); … … 890 891 sl_input->GetInputValue(&sealevel,gauss); 891 892 arate_input->GetInputValue(&arate,gauss); 892 893 vrate = 1.0; 893 if (vel < vel_ upper) vrate = vel / vel_upper;894 if (vel < vel_threshold) vrate = vel / vel_threshold; 894 895 895 896 /*Compute strain rate and viscosity: */ 896 897 this->StrainRateSSA(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input); … … 923 924 break; 924 925 case 3: 925 926 /* 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)); 928 929 break; 929 930 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); 932 933 gamma = 0.5*theta*(tanh(alpha*xoffset) - tanh(alpha*(truncateVrate+xoffset))); 933 934 break; 934 935 case -1: … … 945 946 if (bed >= sealevel) gamma = 0.0; 946 947 947 948 /*-------------------------------------------*/ 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; 954 950 } 955 951 /*Add input*/ 956 952 this->AddInput(CalvingCalvingrateEnum,&calvingrate[0],P1DGEnum); -
../trunk-jpl/src/c/cores/movingfront_core.cpp
19 19 int domaintype, num_extrapol_vars, index,reinit_frequency,step; 20 20 int* extrapol_vars=NULL; 21 21 Analysis *analysis=NULL; 22 IssmDouble maxVel; 22 23 23 24 /* recover parameters */ 24 25 femmodel->parameters->FindParam(&domaintype,DomainTypeEnum); … … 50 51 /* smoothen slope of lsf for computation of normal on ice domain*/ 51 52 levelsetfunctionslope_core(femmodel); 52 53 54 /* compute the maximal velocity over the whole domain */ 55 femmodel->MaxVelx(&maxVel); 56 femmodel->parameters->SetParam(maxVel, CalvingVelThresholdEnum); 57 53 58 /* start the work from here */ 54 59 if(VerboseSolution()) _printf0_(" computing calving and undercutting\n"); 55 60 Calvingx(femmodel); -
../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
118 118 CalvingXoffsetEnum, 119 119 CalvingYoffsetEnum, 120 120 CalvingVelLowerboundEnum, 121 CalvingVelThresholdEnum, 121 122 CalvingVelUpperboundEnum, 122 123 ConfigurationTypeEnum, 123 124 ConstantsGEnum,
Note:
See TracBrowser
for help on using the repository browser.