Changeset 27203
- Timestamp:
- 08/16/22 11:38:38 (3 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp
r27121 r27203 225 225 parameters->AddObject(iomodel->CopyConstantObject("md.calving.xoffset",CalvingXoffsetEnum)); 226 226 parameters->AddObject(iomodel->CopyConstantObject("md.calving.yoffset",CalvingYoffsetEnum)); 227 parameters->AddObject(iomodel->CopyConstantObject("md.calving.vel_threshold",CalvingVelThresholdEnum)); 227 228 break; 228 229 default: -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r27131 r27203 844 844 IssmDouble arate, rho_ice, rho_water, thickness; 845 845 int use_parameter=-1; 846 IssmDouble gamma, theta, alpha, xoffset, yoffset ;846 IssmDouble gamma, theta, alpha, xoffset, yoffset, vel_threshold, vrate; 847 847 848 848 /* Get node coordinates and dof list: */ … … 870 870 this->FindParam(&xoffset, CalvingXoffsetEnum); 871 871 this->FindParam(&yoffset, CalvingYoffsetEnum); 872 this->FindParam(&vel_threshold, CalvingVelThresholdEnum); 872 873 873 874 /* Start looping on the number of vertices: */ … … 883 884 gr_input->GetInputValue(&groundedice,gauss); 884 885 bs_input->GetInputValue(&bed,gauss); 886 H_input->GetInputValue(&thickness,gauss); 885 887 vel=sqrt(vx*vx+vy*vy)+1.e-14; 886 888 sl_input->GetInputValue(&sealevel,gauss); 887 889 arate_input->GetInputValue(&arate,gauss); 890 vrate = 1.0; 891 if (vel < vel_threshold) vrate = vel / vel_threshold; 888 892 889 893 /*Compute strain rate and viscosity: */ … … 912 916 gamma = yoffset - 0.5*theta*tanh(alpha*(bed+xoffset)); 913 917 break; 918 case 2: 919 /* 2 tanh(thicknes): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */ 920 gamma = yoffset - 0.5*theta*tanh(alpha*(-thickness+xoffset)); 921 break; 914 922 case -1: 915 923 /* nothing, just the arate*/ … … 926 934 927 935 /*-------------------------------------------*/ 928 calvingrate[iv] = arate*gamma ;936 calvingrate[iv] = arate*gamma*vrate; 929 937 } 930 938 -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r27179 r27203 116 116 CalvingXoffsetEnum, 117 117 CalvingYoffsetEnum, 118 CalvingVelThresholdEnum, 118 119 ConfigurationTypeEnum, 119 120 ConstantsGEnum, -
issm/trunk-jpl/src/m/classes/calvingparameterization.m
r27121 r27203 12 12 xoffset = 0; 13 13 yoffset = 0; 14 vel_threshold = 6000; 14 15 end 15 16 methods … … 51 52 % offset in y-axis 52 53 self.yoffset = 0; 54 % velocity threshold to reduce calving rate 55 vel_threshold = 6000; % m/a 53 56 end % }}} 54 57 function md = checkconsistency(self,md,solution,analyses) % {{{ … … 57 60 58 61 md = checkfield(md,'fieldname','calving.min_thickness','>=',0,'NaN',1,'Inf',1,'numel',1); 59 md = checkfield(md,'fieldname','calving.use_param','values',[-1, 0, 1 ]);62 md = checkfield(md,'fieldname','calving.use_param','values',[-1, 0, 1, 2]); 60 63 md = checkfield(md,'fieldname','calving.theta','NaN',1,'Inf',1,'numel',1); 61 64 md = checkfield(md,'fieldname','calving.alpha','NaN',1,'Inf',1,'numel',1); 62 65 md = checkfield(md,'fieldname','calving.xoffset','NaN',1,'Inf',1,'numel',1); 63 66 md = checkfield(md,'fieldname','calving.yoffset','NaN',1,'Inf',1,'numel',1); 67 md = checkfield(md,'fieldname','calving.vel_threshold','NaN',1,'Inf',1,'numel',1); 64 68 end % }}} 65 69 function disp(self) % {{{ 66 70 disp(sprintf(' Calving test parameters:')); 67 71 fielddisplay(self,'min_thickness','minimum thickness below which no ice is allowed [m]'); 68 fielddisplay(self,'use_param','-1 - just use frontal ablation rate, 0 - f(x) = y_{o} + \alpha (x+x_{o}), 1 - f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) ');72 fielddisplay(self,'use_param','-1 - just use frontal ablation rate, 0 - f(x) = y_{o} + \alpha (x+x_{o}), 1 - f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})), 2 - tanh(thickness)'); 69 73 fielddisplay(self,'theta','the amplifier'); 70 74 fielddisplay(self,'alpha','the slope'); 71 75 fielddisplay(self,'xoffset','offset in x-axis'); 72 76 fielddisplay(self,'yoffset','offset in y-axis'); 77 fielddisplay(self,'vel_threshold','threshold of ice velocity to reduce the calving rate'); 73 78 end % }}} 74 79 function marshall(self,prefix,md,fid) % {{{ … … 81 86 WriteData(fid,prefix,'object',self,'fieldname','xoffset','format','Double'); 82 87 WriteData(fid,prefix,'object',self,'fieldname','yoffset','format','Double'); 88 WriteData(fid,prefix,'object',self,'fieldname','vel_threshold','format','Double','scale', 1./yts); 83 89 end % }}} 84 90 end
Note:
See TracChangeset
for help on using the changeset viewer.