Changeset 27852
- Timestamp:
- 07/24/23 23:49:48 (20 months ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/DebrisAnalysis.cpp
r27847 r27852 10 10 11 11 #define FINITEELEMENT P1Enum 12 #define EPS 1e-8 13 #define RHO 2 14 //#define KAPPA 5 12 #define EPS 1e-14 15 13 16 14 /*Model processing*/ … … 117 115 parameters->AddObject(iomodel->CopyConstantObject("md.debris.min_thickness",DebrisMinThicknessEnum)); 118 116 parameters->AddObject(iomodel->CopyConstantObject("md.debris.packingfraction",DebrisPackingFractionEnum)); 119 parameters->AddObject(iomodel->CopyConstantObject("md.debris.max_displacementvelocity",DebrisMaxdisplacementvelocityEnum));120 117 parameters->AddObject(iomodel->CopyConstantObject("md.debris.removal_slope_threshold",DebrisRemovalSlopeThresholdEnum)); 121 118 parameters->AddObject(iomodel->CopyConstantObject("md.debris.removal_stress_threshold",DebrisRemovalStressThresholdEnum)); … … 131 128 void DebrisAnalysis::Core(FemModel* femmodel){/*{{{*/ 132 129 133 PreProcessing(femmodel); 130 //PreProcessing(femmodel); 131 //femmodel->parameters->SetParam(VxDebrisEnum,InputToExtrudeEnum); 132 //extrudefromtop_core(femmodel); 134 133 femmodel->SetCurrentConfiguration(DebrisAnalysisEnum); 135 134 solutionsequence_linear(femmodel); 136 femmodel->inputs->DuplicateInput(DebrisThicknessEnum,DebrisThicknessOldEnum);137 135 PostProcessing(femmodel); 138 136 139 137 }/*}}}*/ 140 138 void DebrisAnalysis::PreCore(FemModel* femmodel){/*{{{*/ … … 199 197 Input* vy_input=NULL; 200 198 if(dim>1){vy_input = topelement->GetInput(VyDebrisEnum); _assert_(vy_input);} 201 Input* slopex_input = topelement->GetInput(SurfaceSlopeXEnum); _assert_(slopex_input);202 Input* slopey_input = topelement->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input);203 Input* thickness_input = topelement->GetInput(DebrisThicknessEnum); _assert_(thickness_input);204 199 h=topelement->CharacteristicLength(); 205 //IssmDouble hx,hy,hz;206 //topelement->ElementSizes(&hx,&hy,&hz);207 //h=sqrt(hx*hx+hy*hy);208 200 209 201 /* Start looping on the number of gaussian points: */ … … 217 209 vx_input->GetInputValue(&vx,gauss); 218 210 if(dim==2) vy_input->GetInputValue(&vy,gauss); 219 211 220 212 D_scalar=gauss->weight*Jdet; 221 213 for(int i=0;i<numnodes;i++) for(int j=0;j<numnodes;j++) Ke->values[i*numnodes+j] += D_scalar*basis[i]*basis[j]; … … 223 215 /*Advection terms*/ 224 216 vx_input->GetInputDerivativeValue(&dvx[0],xyz_list,gauss); 225 dvxdx=dvx[0];226 217 D_scalar=dt*gauss->weight*Jdet; 227 218 if(dim==2){ 228 219 vy_input->GetInputDerivativeValue(&dvy[0],xyz_list,gauss); 220 dvxdx=dvx[0]; 229 221 dvydy=dvy[1]; 230 222 for(int i=0;i<numnodes;i++){ … … 237 229 } 238 230 }else{ 231 dvxdx=dvx[0]; 239 232 for(int i=0;i<numnodes;i++){ 240 233 for(int j=0;j<numnodes;j++){ … … 245 238 } 246 239 247 /*******************************************************************/ 248 /* Diffusion */ 249 bool isdisplacement=false; 250 int step; 251 topelement->FindParam(&step,StepEnum); 252 IssmDouble slope_threshold; 253 topelement->FindParam(&slope_threshold,DebrisRemovalSlopeThresholdEnum); 254 IssmDouble rad2deg=180./M_PI; 255 IssmDouble kappa,f,smb,debristhickness;//,slopex; 256 IssmDouble M=1,C=-0.2,m,alpha_t_deg=25.0; 257 IssmDouble alpha_t_rad=tan(alpha_t_deg/rad2deg); 258 IssmDouble Diff,fraction; 259 Diff=3.2/3e7; 260 //Input* slopex_input=topelement->GetInput(SurfaceSlopeXEnum); _assert_(slopex_input); 261 Input* smb_input=topelement->GetInput(SmbMassBalanceEnum); _assert_(smb_input); 262 Input* debristhickness_input=topelement->GetInput(DebrisThicknessEnum); _assert_(debristhickness_input); 263 264 /*if(isdisplacement){ 265 266 slopex_input->GetInputValue(&slopex, gauss); 267 smb_input->GetInputValue(&smb, gauss); 268 debristhickness_input->GetInputValue(&debristhickness, gauss); 269 if((atan(fabs(slopex))*rad2deg)<alpha_t_deg){ 270 f=0.; 271 }else if((atan(fabs(slopex))*rad2deg)>=alpha_t_deg & fabs(slopex)<=((1-C)/M)){ 272 m=1/(((1-C)/M)-alpha_t_rad); 273 f=m*fabs(slopex)-m*alpha_t_rad; 274 }else{ 275 f=1; 276 } 277 //f=1; 278 //kappa=-5.6e16*smb*debristhickness*f; 279 //kappa=debristhickness/h*4e9*f; 280 //kappa=14.2809e8*f; // 25° 281 kappa=247*f; // 35° 282 if(dim==2){ 283 for(int i=0;i<numnodes;i++){ 284 for(int j=0;j<numnodes;j++){ 285 Ke->values[i*numnodes+j] += D_scalar*kappa*( 286 dbasis[0*numnodes+j]*dbasis[0*numnodes+i] + dbasis[1*numnodes+j]*dbasis[1*numnodes+i] + dbasis[2*numnodes+j]*dbasis[2*numnodes+i] 287 ); 288 } 289 } 290 }else{ 291 for(int i=0;i<numnodes;i++){ 292 for(int j=0;j<numnodes;j++){ 293 Ke->values[i*numnodes+j] += D_scalar*kappa*(dbasis[0*numnodes+j]*dbasis[0*numnodes+i]); 294 } 295 } 296 } 297 } 298 /*******************************************************************/ 299 300 IssmDouble rho,KAPPA,slopex,slopey, thickness; 240 IssmDouble rho; 301 241 if(FINITEELEMENT==P1Enum){ 302 rho= RHO;242 rho=2.; 303 243 }else if(FINITEELEMENT==P2Enum){ 304 rho= RHO*2.;244 rho=4.; 305 245 } 306 246 … … 309 249 /*SSA*/ 310 250 if(dim==1){ 311 //vx_input->GetInputValue(&vx,gauss); 312 vx_input->GetInputAverage(&vx); 251 vx_input->GetInputValue(&vx,gauss); 313 252 D[0]=h/rho*fabs(vx); 314 253 }else{ … … 323 262 if(dim==1){ 324 263 vx_input->GetInputValue(&vx,gauss); 325 //vx_input->GetInputAverage(&vx);326 264 vel=fabs(vx)+EPS; 327 265 D[0] = h/(rho*vel)*vx*vx; 328 266 }else{ 329 267 vx_input->GetInputValue(&vx,gauss); 330 //vx_input->GetInputAverage(&vx);331 268 vy_input->GetInputValue(&vy,gauss); 332 //vy_input->GetInputAverage(&vy);333 269 vel=sqrt(vx*vx+vy*vy)+EPS; 334 270 D[0*dim+0]=h/(rho*vel)*vx*vx; … … 341 277 if(dim==1){ 342 278 vx_input->GetInputValue(&vx,gauss); 343 //vx_input->GetInputAverage(&vx); 344 //tau=h/(rho*max(fabs(vx),EPS)); 345 tau=h/(rho*(fabs(vx)+EPS)); 279 tau=h/(rho*max(fabs(vx),EPS)); 346 280 }else{ 347 281 vx_input->GetInputValue(&vx,gauss); 348 282 vy_input->GetInputValue(&vy,gauss); 349 vx_input->GetInputAverage(&vx); 350 vy_input->GetInputAverage(&vy); 351 vel=sqrt(vx*vx+vy*vy)+EPS; 352 353 KAPPA=vel; 354 // adapt diffusion coefficient from here: http://websrv.cs.umt.edu/isis/index.php/Solving_the_equation_for_thickness_evolution 355 slopex_input->GetInputValue(&slopex,gauss); 356 slopey_input->GetInputValue(&slopey,gauss); 357 thickness_input->GetInputValue(&thickness,gauss); 358 //KAPPA=vel*thickness/(pow(pow(slopex,2)+pow(slopey,2),0.5)+EPS); 359 tau=h/(rho*vel)*(cosh(vel*h/2/KAPPA)/sinh(vel*h/2/KAPPA)-1./(vel*h/2/KAPPA)); 360 361 /*kappa=KAPPA/yts; 362 if(vel*h/(3*2*kappa)<1){ 363 tau=pow(h,2)/(3*2*2*kappa); 364 } 365 else tau=h/(2*vel);*/ 366 //tau=dt*3; 283 tau=h/(rho*sqrt(vx*vx+vy*vy)+EPS); 367 284 } 368 285 } … … 410 327 } 411 328 329 412 330 /*Advection matrix - part 2, B*/ 413 331 for(int i=0;i<numnodes;i++){ … … 420 338 for(int i=0;i<numnodes;i++){ 421 339 for(int j=0;j<numnodes;j++){ 422 Ke->values[i*numnodes+j]+=dt*gauss->weight*Jdet*tau*(basis[j]*dvxdx)*(basis[i]*dvxdx); 340 Ke->values[i*numnodes+j]+=dt*gauss->weight*Jdet*tau*(basis[j]*dvxdx)*(basis[i]*dvxdx);; 423 341 } 424 342 } … … 524 442 Input* smb_input = topelement->GetInput(SmbMassBalanceEnum); _assert_(smb_input); 525 443 Input* thickness_input = topelement->GetInput(DebrisThicknessEnum); _assert_(thickness_input); 526 Input* slopex_input = topelement->GetInput(SurfaceSlopeXEnum); _assert_(slopex_input);527 Input* slopey_input = topelement->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input);528 444 Input* vx_input = topelement->GetInput(VxDebrisEnum); _assert_(vx_input); 529 445 Input* vy_input=NULL; … … 532 448 } 533 449 h=topelement->CharacteristicLength(); 534 //IssmDouble hx,hy,hz; 535 //topelement->ElementSizes(&hx,&hy,&hz); 536 //h=sqrt(hx*hx+hy*hy); 537 538 IssmDouble rho,KAPPA,slopex,slopey; 450 451 IssmDouble rho; 539 452 if(FINITEELEMENT==P1Enum){ 540 rho= RHO;453 rho=2.; 541 454 }else if(FINITEELEMENT==P2Enum){ 542 rho= RHO*2.;455 rho=4.; 543 456 } 544 457 … … 553 466 thickness_input->GetInputValue(&thickness,gauss); 554 467 if(smb>0.){ 555 psi=thickness-0 *dt*smb*pf;468 psi=thickness-0.*dt*smb*pf; 556 469 }else{ 557 470 psi=thickness-dt*smb*pf; 558 471 } 559 //psi=thickness-dt*smb*pf; 472 560 473 for(int i=0;i<numnodes;i++) pe->values[i]+=Jdet*gauss->weight*psi*basis[i]; 561 474 … … 567 480 if(dim==1){ 568 481 vx_input->GetInputValue(&vx,gauss); 569 //vx_input->GetInputAverage(&vx); 570 //tau=h/(rho*max(fabs(vx),EPS)); 571 tau=h/(rho*(fabs(vx)+EPS)); 482 tau=h/(rho*max(fabs(vx),EPS)); 572 483 573 484 /*Force vector - part 2*/ … … 583 494 vx_input->GetInputValue(&vx,gauss); 584 495 vy_input->GetInputValue(&vy,gauss); 585 vx_input->GetInputAverage(&vx);586 vy_input->GetInputAverage(&vy);587 496 vy_input->GetInputDerivativeValue(&dvy[0],xyz_list,gauss); 588 dvydy=dvy[1]; 589 590 vel=sqrt(vx*vx+vy*vy)+EPS; 591 // tuned value 592 KAPPA=vel; 593 // adapt diffusion coefficient from here: http://websrv.cs.umt.edu/isis/index.php/Solving_the_equation_for_thickness_evolution 594 slopex_input->GetInputValue(&slopex,gauss); 595 slopey_input->GetInputValue(&slopey,gauss); 596 //KAPPA=vel*thickness/(pow(pow(slopex,2)+pow(slopey,2),0.5)+EPS); 597 tau=h/(rho*vel)*(cosh(vel*h/2/KAPPA)/sinh(vel*h/2/KAPPA)-1./(vel*h/2/KAPPA)); 598 599 /*kappa=KAPPA/yts; 600 if(vel*h/(3*2*kappa)<1){ 601 tau=pow(h,2)/(3*2*2*kappa); 602 } 603 else tau=h/(2*vel);*/ 604 //tau=dt*3; 497 vel=sqrt(vx*vx+vy*vy); 498 dvydy=dvy[1]; 499 tau=h/(rho*vel+EPS); 605 500 606 501 /*Force vector - part 2*/ … … 636 531 int numnodes = element->GetNumberOfNodes(); 637 532 IssmDouble* newthickness = xNew<IssmDouble>(numnodes); 638 IssmDouble* icethickness = xNew<IssmDouble>(numnodes);639 640 533 641 534 /*Use the dof list to index into the solution vector: */ 642 535 IssmDouble minthickness = element->FindParam(DebrisMinThicknessEnum); 643 536 element->GetDofListLocal(&ddoflist,NoneApproximationEnum,GsetEnum); 644 element->GetInputListOnVertices(&icethickness[0],ThicknessEnum);645 537 646 538 for(int i=0;i<numnodes;i++){ … … 658 550 // Free resources 659 551 xDelete<IssmDouble>(newthickness); 660 xDelete<IssmDouble>(icethickness);661 552 xDelete<int>(ddoflist); 662 553 //*/ … … 708 599 femmodel->parameters->FindParam(&removalmodel,DebrisRemovalmodelEnum); 709 600 Element* element= NULL; 601 Element* topelement = NULL; 710 602 711 603 if(removalmodel==0){ … … 724 616 IssmDouble* slopey = xNew<IssmDouble>(numnodes); 725 617 IssmDouble* onsurface = xNew<IssmDouble>(numnodes); 726 //IssmDouble* ls_active = xNew<IssmDouble>(numnodes);727 element->GetInputListOnNodes(debristhickness,DebrisThickness OldEnum);618 IssmDouble* ls_active = xNew<IssmDouble>(numnodes); 619 element->GetInputListOnNodes(debristhickness,DebrisThicknessEnum); 728 620 element->GetInputListOnNodes(icethickness,ThicknessEnum); 729 621 element->GetInputListOnNodes(onsurface,MeshVertexonsurfaceEnum); 730 //element->GetInputListOnNodes(ls_active,DebrisMaskNodeActivationEnum);622 element->GetInputListOnNodes(ls_active,DebrisMaskNodeActivationEnum); 731 623 732 624 dim=1; … … 751 643 if(icethickness[k]<=(iceminthickness+0.00001)) kk++; 752 644 } 753 //isminthicknessinelement=true; 754 //if(kk<numnodes && isminthicknessinelement){ 755 if(isminthicknessinelement){ 645 isminthicknessinelement=true; 646 if(kk<numnodes && isminthicknessinelement){ 756 647 for(k=0; k<numnodes;k++){ 757 648 slope=fabs(slopex[k]); … … 768 659 } 769 660 } 770 element->AddInput(DebrisThicknessEnum,debristhickness,P1 DGEnum);661 element->AddInput(DebrisThicknessEnum,debristhickness,P1Enum); 771 662 772 663 xDelete<IssmDouble>(debristhickness); 773 xDelete<IssmDouble>(onsurface);774 664 xDelete<IssmDouble>(icethickness); 775 665 xDelete<IssmDouble>(slopex); 776 666 xDelete<IssmDouble>(slopey); 777 //xDelete<IssmDouble>(ls_active);778 667 break; 779 668 } 780 669 case 2:{ 781 IssmDouble stress_threshold =element->FindParam(DebrisRemovalStressThresholdEnum);782 IssmDouble gravity =element->FindParam(ConstantsGEnum);670 IssmDouble stress_threshold = element->FindParam(DebrisRemovalStressThresholdEnum); 671 IssmDouble gravity = element->FindParam(ConstantsGEnum); 783 672 IssmDouble stress,rhod=1900.; 784 673 int kk=0; … … 787 676 if(icethickness[k]<=(iceminthickness+0.00001)) kk++; 788 677 } 789 //isminthicknessinelement=true; 790 //if(isminthicknessinelement){ 678 isminthicknessinelement=true; 791 679 if(kk<numnodes && isminthicknessinelement){ 680 //stress=0; 681 IssmDouble stress_sum=0.; 792 682 for(k=0; k<numnodes;k++){ 793 683 slope=fabs(slopex[k]); 794 684 if(dim==2) slope=pow(pow(slopex[k],2)+pow(slopey[k],2),0.5); 795 stress=rhod*gravity*debristhickness[k]*slope; 796 // if(stress>stress_threshold) debristhickness[k]=0;685 stress=rhod*gravity*debristhickness[k]*slope;//pow(slope*slope/(slope*slope+1),0.5);//sin(slope/rad2deg); 686 //stress_sum=stress_sum+stress; 797 687 if(stress>stress_threshold) remove_debris=true; 798 } 799 if(remove_debris){ 800 for(k=0; k<numnodes;k++){ 801 debristhickness[k]=0.; 802 } 803 } 688 //if(stress>stress_threshold) debristhickness[k]=0.; 689 } 690 //if((stress_sum/double(kk))>stress_threshold) remove_debris=true; 691 if(remove_debris){ 692 for(k=0; k<numnodes;k++){ 693 debristhickness[k]=0.; 694 } 695 } 804 696 } 805 element->AddInput(DebrisThicknessEnum,debristhickness,P1 DGEnum);697 element->AddInput(DebrisThicknessEnum,debristhickness,P1Enum); 806 698 807 699 xDelete<IssmDouble>(debristhickness); … … 809 701 xDelete<IssmDouble>(slopex); 810 702 xDelete<IssmDouble>(slopey); 703 xDelete<IssmDouble>(ls_active); 811 704 break; 812 705 } … … 821 714 if(VerboseSolution()) _printf0_(" Debris preprocessing\n"); 822 715 823 int removalmodel, displacementmodel;824 femmodel->parameters->FindParam(&removalmodel,DebrisRemovalmodelEnum);825 femmodel->parameters->FindParam(&displacementmodel,DebrisDisplacementmodelEnum);826 827 716 Element* element= NULL; 828 717 for(Object* & object : femmodel->elements->objects){ 829 718 element=xDynamicCast<Element*>(object); 830 719 831 int numvertices=element->GetNumberOfVertices(); 832 int numnodes=element->GetNumberOfNodes(); 833 numvertices=numnodes; 720 int numvertices = element->GetNumberOfVertices(); 834 721 835 722 IssmDouble* vx = xNew<IssmDouble>(numvertices); 836 IssmDouble* vy = xNew<IssmDouble>(numvertices);837 IssmDouble* vx_new = xNew<IssmDouble>(numvertices);838 IssmDouble* vy_new = xNew<IssmDouble>(numvertices);839 723 IssmDouble* debristhickness = xNew<IssmDouble>(numvertices); 840 724 IssmDouble* slopex = xNew<IssmDouble>(numvertices); 841 IssmDouble* slopey = xNew<IssmDouble>(numvertices); 842 IssmDouble* icethickness = xNew<IssmDouble>(numvertices); 843 int dim=1,domaintype; 844 femmodel->parameters->FindParam(&domaintype,DomainTypeEnum); 845 if(domaintype!=Domain2DverticalEnum){ 846 dim=2; 847 } 725 IssmDouble* onsurface = xNew<IssmDouble>(numvertices); 726 IssmDouble* icethickness = xNew<IssmDouble>(numvertices); 727 848 728 element->GetInputListOnVertices(&debristhickness[0],DebrisThicknessEnum); 849 element->GetInputListOnVertices(&vx[0],Vx Enum);729 element->GetInputListOnVertices(&vx[0],VxDebrisEnum); 850 730 element->GetInputListOnVertices(&slopex[0],SurfaceSlopeXEnum); 731 element->GetInputListOnVertices(&onsurface[0],MeshVertexonsurfaceEnum); 851 732 element->GetInputListOnVertices(&icethickness[0],ThicknessEnum); 852 if(dim==2){ 853 element->GetInputListOnVertices(&vy[0],VyEnum); 854 element->GetInputListOnVertices(&slopey[0],SurfaceSlopeYEnum); 855 } 856 857 IssmDouble rad2deg=180./M_PI; //=57.2958 858 IssmDouble vslipx,vslipy,stress,rhod=1900.; 859 IssmDouble taud_plus, taud_minus, taudx, taudy, taud; 733 734 IssmDouble slope,rad2deg=180./M_PI; //=57.2958 735 IssmDouble vslipx,rhod=1900.; 860 736 IssmDouble gravity=element->FindParam(ConstantsGEnum); 861 737 IssmDouble slope_threshold=element->FindParam(DebrisRemovalSlopeThresholdEnum); 862 IssmDouble stress_threshold = element->FindParam(DebrisRemovalStressThresholdEnum);863 IssmDouble maxv = element->FindParam(DebrisMaxdisplacementvelocityEnum);864 738 IssmDouble iceminthickness=element->FindParam(MasstransportMinThicknessEnum); 865 IssmDouble hx,hy,hz;866 element->ElementSizes(&hx,&hy,&hz);867 739 868 740 int step; 869 IssmDouble dt ;741 IssmDouble dt, maxv; 870 742 IssmDouble yts=31536000.; 871 743 femmodel->parameters->FindParam(&step,StepEnum); 872 744 femmodel->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 745 873 746 bool isminthicknessinelement=false; 874 int kk=0; 875 876 if(displacementmodel==1){ 877 747 for(int i=0;i<numvertices;i++){ 748 if(icethickness[i]<=(iceminthickness+0.01)) isminthicknessinelement=true; 749 } 750 if(isminthicknessinelement){ 751 //do nothing 878 752 for(int i=0;i<numvertices;i++){ 879 if(icethickness[i]<=(iceminthickness+0.00001)){ 880 isminthicknessinelement=true; 881 kk++; 882 } 883 } 884 //isminthicknessinelement=true; 753 if(icethickness[i]<=(iceminthickness+0.01)) vx[i]=0.; 754 } 755 }else{ 885 756 for(int i=0;i<numvertices;i++){ 886 //isminthicknessinelement=true; 887 //if(icethickness[i]<=(iceminthickness+0.01)){ 888 //if(kk<numnodes && isminthicknessinelement){ 889 890 /*if(isminthicknessinelement && kk==numvertices){ 891 vx[i]=0.; 892 if(dim==2) vy[i]=0.; 893 }else if(isminthicknessinelement && kk<numvertices){ 894 vx[i]=0.; 895 if(dim==2) vy[i]=0.; 896 }else*/ 897 /*if(isminthicknessinelement){ 898 if(kk==numvertices){ 899 vx[i]=0.; 900 if(dim==2) vy[i]=0.; 901 } 902 }else{*/ 903 if(~isminthicknessinelement){ 904 if(removalmodel==1){ 905 taud_plus=slope_threshold; taud_minus=slope_threshold/2; 906 }else if(removalmodel==2){ 907 taud_plus=stress_threshold; taud_minus=stress_threshold/2; 908 } 909 taudx=rhod*gravity*debristhickness[i]*slopex[i]; // 0.1 910 if(dim==2) taudy=rhod*gravity*debristhickness[i]*slopey[i]; 911 vslipx=-0.1*taudx/yts;//+0./yts*fabs(vx[i])/(vx[i]+1e-10); 912 if(dim==2) vslipy=-0.1*taudy/yts;//+0./yts*fabs(vy[i])/(vy[i]+1e-10); 913 914 if(removalmodel==1){ 915 taud=atan(slopex[i]*slopex[i]+slopey[i]*slopey[i])*rad2deg; 916 }else if(removalmodel==2){ 917 taud=sqrt(taudx*taudx+taudy*taudy); 918 } 919 920 if(taud>=taud_plus){ 921 vx[i]=vx[i]+vslipx; 922 if(dim==2) vy[i]=vy[i]+vslipy; 923 }else if(taud>=taud_minus & taud<taud_plus){ 924 //vx[i]=vx[i]+vslipx*(1-(taud_plus-fabs(taudx))/(taud_plus-taud_minus)); 925 //if(dim==2) vy[i]=vy[i]+vslipy*(1-(taud_plus-fabs(taudy))/(taud_plus-taud_minus)); 926 vx[i]=vx[i]+vslipx*(1+cos(PI*fabs(taudx)/(taud_plus-taud_minus)))/2.; 927 if(dim==2) vy[i]=vy[i]+vslipy*(1+cos(PI*fabs(taudy)/(taud_plus-taud_minus)))/2.; 928 }else if(taud<taud_minus){ 929 vx[i]=vx[i]; 930 if(dim==2) vy[i]=vy[i]; 931 } 932 if(fabs(vx[i])>maxv/yts) vx[i]=maxv/yts*fabs(vx[i])/(vx[i]+1e-10); 933 if(fabs(vy[i])>maxv/yts) vy[i]=maxv/yts*fabs(vy[i])/(vy[i]+1e-10); 934 } 935 } 936 element->AddInput(VxDebrisEnum,vx,P1Enum); 937 if(dim==2) element->AddInput(VyDebrisEnum,vy,P1Enum); 938 } 757 //if(onsurface[i]>.5){ 758 slope=fabs(slopex[i]); 759 //if((atan(slope)*rad2deg)>25.){ 760 //if(debristhickness[i]>0.01){ 761 vslipx=1.0/yts; 762 //maxv=10.0/2./dt; 763 //vslipx=-slope_threshold*rhod*gravity*debristhickness[i]*slopex[i]/yts; 764 vx[i]=vx[i]+vslipx; 765 //debristhickness[i]=debristhickness[i]; 766 //if(vx[i]>maxv) vx[i]=maxv; 767 //} 768 //} 769 //} 770 } 771 } 772 //if(step%100==0) 773 element->AddInput(VxDebrisEnum,vx,P1Enum); 774 939 775 /* Free resources */ 940 776 xDelete<IssmDouble>(debristhickness); 941 777 xDelete<IssmDouble>(icethickness); 942 778 xDelete<IssmDouble>(vx); 943 xDelete<IssmDouble>(vx_new);944 779 xDelete<IssmDouble>(slopex); 945 xDelete<IssmDouble>(vy); 946 xDelete<IssmDouble>(vy_new); 947 xDelete<IssmDouble>(slopey); 948 } 949 }/*}}}*/ 780 xDelete<IssmDouble>(onsurface); 781 } 782 783 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/SmbAnalysis.cpp
r27847 r27852 242 242 } 243 243 break; 244 case SMBdebrisEvattEnum: 245 iomodel->FetchDataToInput(inputs,elements,"md.initialization.debris",DebrisThicknessEnum); 246 iomodel->FetchDataToInput(inputs,elements,"md.smb.s0t",SmbS0tEnum); 247 iomodel->FetchDataToInput(inputs,elements,"md.smb.snowheight",SmbSnowheightEnum); 248 iomodel->FetchDataToDatasetInput(inputs,elements,"md.smb.monthlytemperatures",SmbMonthlytemperaturesEnum); 249 iomodel->FetchDataToDatasetInput(inputs,elements,"md.smb.monthlyprecipitation",SmbPrecipitationEnum); 250 iomodel->FetchDataToDatasetInput(inputs,elements,"md.smb.monthlydsradiation",SmbMonthlydsradiationEnum); 251 iomodel->FetchDataToDatasetInput(inputs,elements,"md.smb.monthlydlradiation",SmbMonthlydlradiationEnum); 252 iomodel->FetchDataToDatasetInput(inputs,elements,"md.smb.monthlywindspeed",SmbMonthlywindspeedEnum); 253 iomodel->FetchDataToDatasetInput(inputs,elements,"md.smb.monthlyairhumidity",SmbMonthlyairhumidityEnum); 254 iomodel->FetchDataToInput(inputs,elements,"md.smb.precipitation_anomaly",SmbPrecipitationsAnomalyEnum); 255 iomodel->FetchDataToInput(inputs,elements,"md.smb.temperature_anomaly",SmbTemperaturesAnomalyEnum); 256 iomodel->FetchDataToInput(inputs,elements,"md.smb.dsradiation_anomaly",SmbDsradiationAnomalyEnum); 257 iomodel->FetchDataToInput(inputs,elements,"md.smb.dlradiation_anomaly",SmbDlradiationAnomalyEnum); 258 iomodel->FetchDataToInput(inputs,elements,"md.smb.windspeed_anomaly",SmbWindspeedAnomalyEnum); 259 iomodel->FetchDataToInput(inputs,elements,"md.smb.airhumidity_anomaly",SmbAirhumidityAnomalyEnum); 260 break; 244 case SMBdebrisMLEnum: 245 iomodel->FetchDataToInput(inputs,elements,"md.initialization.debris",DebrisThicknessEnum); 246 break; 261 247 default: 262 248 _error_("Surface mass balance model "<<EnumToStringx(smb_model)<<" not supported yet"); … … 487 473 /*Nothing to add to parameters*/ 488 474 break; 489 case SMBdebris EvattEnum:490 491 475 case SMBdebrisMLEnum: 476 /*Nothing to add to parameters*/ 477 break; 492 478 default: 493 479 _error_("Surface mass balance model "<<EnumToStringx(smb_model)<<" not supported yet"); … … 587 573 #endif //_HAVE_SEMIC_ 588 574 break; 589 case SMBdebris EvattEnum:590 if(VerboseSolution())_printf0_(" call smb Evatt debrismodule\n");591 SmbDebrisEvattx(femmodel);592 575 case SMBdebrisMLEnum: 576 if(VerboseSolution())_printf0_(" call smb debris Mayer & Liculli module\n"); 577 SmbDebrisMLx(femmodel); 578 break; 593 579 default: 594 580 _error_("Surface mass balance model "<<EnumToStringx(smb_model)<<" not supported yet"); -
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r27847 r27852 23 23 #include "../Inputs/ArrayInput.h" 24 24 #include "../Inputs/IntArrayInput.h" 25 #include <cstdlib>26 25 /*}}}*/ 27 26 #define MAXVERTICES 6 /*Maximum number of vertices per element, currently Penta, to avoid dynamic mem allocation*/ … … 2351 2350 2352 2351 IssmDouble minthickness = this->FindParam(MasstransportMinThicknessEnum); 2353 2352 2354 2353 Input* input=this->GetInput(ThicknessEnum); _assert_(input); 2355 if(input->GetInputM in()<=(minthickness+0.00000001)){2354 if(input->GetInputMax()<=(minthickness+0.00000001)){ 2356 2355 return true; 2357 2356 } … … 3401 3400 monthlytemperatures[iv*12+month]=monthlytemperatures[iv*12+month]-273.15; // conversion from Kelvin to celcius for PDD module 3402 3401 dinput2->GetInputValue(&monthlyprec[iv*12+month],gauss,month); 3403 monthlyprec[iv*12+month]=monthlyprec[iv*12+month] ;//*yts;3402 monthlyprec[iv*12+month]=monthlyprec[iv*12+month]*yts; 3404 3403 } 3405 3404 } … … 3595 3594 Gauss* gauss=this->NewGauss(); 3596 3595 for(int month=0;month<12;month++){ 3596 3597 3597 for(int iv=0;iv<NUM_VERTICES;iv++){ 3598 3598 gauss->GaussVertex(iv); … … 3727 3727 xDelete<IssmDouble>(smbcorr); 3728 3728 xDelete<IssmDouble>(melt_star); 3729 }3730 /*}}}*/3731 void Element::SmbDebrisEvatt(){/*{{{*/3732 3733 const int NUM_VERTICES = this->GetNumberOfVertices();3734 const int NUM_VERTICES_MONTHS_PER_YEAR = NUM_VERTICES * 365;3735 3736 int i,vertexlids[MAXVERTICES];;3737 IssmDouble* smb=xNew<IssmDouble>(NUM_VERTICES); // surface mass balance3738 IssmDouble* melt=xNew<IssmDouble>(NUM_VERTICES); // melting comp. of surface mass balance3739 IssmDouble* summermelt=xNew<IssmDouble>(NUM_VERTICES);3740 IssmDouble* albedo=xNew<IssmDouble>(NUM_VERTICES); // melting comp. of surface mass balance3741 IssmDouble* summeralbedo=xNew<IssmDouble>(NUM_VERTICES);3742 IssmDouble* accu=xNew<IssmDouble>(NUM_VERTICES); // accuumulation comp. of surface mass balance3743 IssmDouble* monthlytemperatures=xNew<IssmDouble>(NUM_VERTICES_MONTHS_PER_YEAR);3744 IssmDouble* monthlyprecip=xNew<IssmDouble>(NUM_VERTICES_MONTHS_PER_YEAR);3745 IssmDouble* monthlylw=xNew<IssmDouble>(NUM_VERTICES_MONTHS_PER_YEAR);3746 IssmDouble* monthlysw=xNew<IssmDouble>(NUM_VERTICES_MONTHS_PER_YEAR);3747 IssmDouble* monthlywind=xNew<IssmDouble>(NUM_VERTICES_MONTHS_PER_YEAR);3748 IssmDouble* monthlyhumidity=xNew<IssmDouble>(NUM_VERTICES_MONTHS_PER_YEAR);3749 IssmDouble* yearlytemperatures=xNew<IssmDouble>(NUM_VERTICES); memset(yearlytemperatures, 0., NUM_VERTICES*sizeof(IssmDouble));3750 IssmDouble* p_ampl=xNew<IssmDouble>(NUM_VERTICES); // precip anomaly3751 IssmDouble* t_ampl=xNew<IssmDouble>(NUM_VERTICES); // temperature anomaly3752 IssmDouble* lw_ampl=xNew<IssmDouble>(NUM_VERTICES);3753 IssmDouble* sw_ampl=xNew<IssmDouble>(NUM_VERTICES);3754 IssmDouble* wind_ampl=xNew<IssmDouble>(NUM_VERTICES);3755 IssmDouble* humidity_ampl=xNew<IssmDouble>(NUM_VERTICES);3756 3757 IssmDouble* surface=xNew<IssmDouble>(NUM_VERTICES); // actual surface height3758 IssmDouble* s0t=xNew<IssmDouble>(NUM_VERTICES); // reference elevation3759 IssmDouble* snowheight=xNew<IssmDouble>(NUM_VERTICES);3760 IssmDouble* debriscover=xNew<IssmDouble>(NUM_VERTICES);3761 IssmDouble rho_water,rho_ice,Tf,debris,debris_here;3762 IssmDouble qlaps,rlaps,dslaps,dllaps,windspeedlaps,humiditylaps,Tm;3763 IssmDouble inv_twelve=1./365.; //factor for monthly average3764 IssmDouble time,yts,time_yr,lambda;3765 IssmDouble MonthlyMelt,CleanIceMonthlyMelt, CumMonthlyMelt=0,CleanIceMelt,CumMonthlySummerMelt=0;3766 IssmDouble MeanAlbedo=0, MeanSummerAlbedo=0;3767 bool isdebris,ismonthly,isAnderson,iscryokarst;3768 this->parameters->FindParam(&isdebris,TransientIsdebrisEnum);3769 this->parameters->FindParam(&ismonthly,SmbDebrisIsMonthlyEnum);3770 this->parameters->FindParam(&isAnderson,SmbDebrisIsAndersonEnum);3771 this->parameters->FindParam(&iscryokarst,SmbDebrisIsCryokarstEnum);3772 IssmDouble PhiD=0.,p;3773 IssmDouble icealbedo=this->FindParam(SmbIcealbedoEnum);3774 IssmDouble snowalbedo=this->FindParam(SmbSnowalbedoEnum);3775 IssmDouble debrisalbedo=this->FindParam(SmbDebrisalbedoEnum);3776 IssmDouble Lm=this->FindParam(MaterialsLatentheatEnum);3777 IssmDouble D0=this->FindParam(SmbDebrisAndersonD0Enum);3778 int step;3779 this->FindParam(&step,StepEnum);3780 3781 // cryokarst3782 int dim=1,domaintype;3783 this->parameters->FindParam(&domaintype,DomainTypeEnum);3784 if(domaintype!=Domain2DverticalEnum) dim=2;3785 IssmDouble taud_plus=110e3, taud_minus=60e3;3786 IssmDouble taud, slope, gravity, taudx, taudy;3787 this->parameters->FindParam(&gravity,ConstantsGEnum);3788 IssmDouble* slopex = xNew<IssmDouble>(NUM_VERTICES);3789 IssmDouble* slopey = xNew<IssmDouble>(NUM_VERTICES);3790 IssmDouble* icethickness = xNew<IssmDouble>(NUM_VERTICES);3791 3792 /*Get material parameters :*/3793 rho_water=this->FindParam(MaterialsRhoSeawaterEnum);3794 rho_ice=this->FindParam(MaterialsRhoIceEnum);3795 IssmDouble sconv=(rho_water/rho_ice);3796 Tf=this->FindParam(MaterialsMeltingpointEnum);3797 3798 /*Get parameters for height corrections*/3799 qlaps=this->FindParam(SmbDesfacEnum); // comment MR; on alpine galciers we dont have the dertification effect3800 rlaps=this->FindParam(SmbRlapsEnum);3801 dslaps=this->FindParam(SmbSWlapsEnum);3802 dllaps=this->FindParam(SmbLWlapsEnum);3803 windspeedlaps=this->FindParam(SmbWindspeedlapsEnum);3804 humiditylaps=this->FindParam(SmbHumiditylapsEnum);3805 3806 /* Get time */3807 this->parameters->FindParam(&time,TimeEnum);3808 this->parameters->FindParam(&yts,ConstantsYtsEnum);3809 time_yr=floor(time/yts)*yts;3810 3811 /*Get inputs*/3812 DatasetInput* tempmonthly =this->GetDatasetInput(SmbMonthlytemperaturesEnum); _assert_(tempmonthly);3813 DatasetInput* precipmonthly =this->GetDatasetInput(SmbPrecipitationEnum); _assert_(precipmonthly);3814 DatasetInput* lwmonthly =this->GetDatasetInput(SmbMonthlydlradiationEnum); _assert_(lwmonthly);3815 DatasetInput* swmonthly =this->GetDatasetInput(SmbMonthlydsradiationEnum); _assert_(swmonthly);3816 DatasetInput* windmonthly =this->GetDatasetInput(SmbMonthlywindspeedEnum); _assert_(windmonthly);3817 DatasetInput* humiditymonthly =this->GetDatasetInput(SmbMonthlyairhumidityEnum); _assert_(humiditymonthly);3818 3819 /*loop over vertices: */3820 Gauss* gauss=this->NewGauss();3821 for(int month=0;month<365;month++){3822 for(int iv=0;iv<NUM_VERTICES;iv++){3823 gauss->GaussVertex(iv);3824 tempmonthly->GetInputValue(&monthlytemperatures[iv*365+month],gauss,month);3825 monthlytemperatures[iv*365+month]=monthlytemperatures[iv*365+month]-Tf; // conversion from Kelvin to celcius for PDD module3826 precipmonthly->GetInputValue(&monthlyprecip[iv*365+month],gauss,month);3827 monthlyprecip[iv*365+month]=monthlyprecip[iv*365+month]*yts; // from m/s to m/a3828 lwmonthly->GetInputValue(&monthlylw[iv*365+month],gauss,month);3829 swmonthly->GetInputValue(&monthlysw[iv*365+month],gauss,month);3830 windmonthly->GetInputValue(&monthlywind[iv*365+month],gauss,month);3831 humiditymonthly->GetInputValue(&monthlyhumidity[iv*365+month],gauss,month);3832 }3833 }3834 3835 /*Recover info at the vertices: */3836 GetInputListOnVertices(&surface[0],SurfaceEnum);3837 GetInputListOnVertices(&s0t[0],SmbS0tEnum);3838 GetInputListOnVertices(&snowheight[0],SmbSnowheightEnum);3839 GetInputListOnVertices(&debriscover[0],DebrisThicknessEnum);3840 GetInputListOnVertices(&t_ampl[0],SmbTemperaturesAnomalyEnum);3841 GetInputListOnVertices(&p_ampl[0],SmbPrecipitationsAnomalyEnum);3842 GetInputListOnVertices(&lw_ampl[0],SmbDsradiationAnomalyEnum);3843 GetInputListOnVertices(&sw_ampl[0],SmbDlradiationAnomalyEnum);3844 GetInputListOnVertices(&wind_ampl[0],SmbWindspeedAnomalyEnum);3845 GetInputListOnVertices(&humidity_ampl[0],SmbAirhumidityAnomalyEnum);3846 if(iscryokarst){3847 GetInputListOnVertices(&slopex[0],SurfaceSlopeXEnum);3848 GetInputListOnVertices(&icethickness[0],ThicknessEnum);3849 if(dim==2){3850 GetInputListOnVertices(&slopey[0],SurfaceSlopeYEnum);3851 }3852 taudx=rho_ice*gravity*icethickness[i]*slopex[i];3853 if(dim==2) taudy=rho_ice*gravity*icethickness[i]*slopey[i];3854 taud=sqrt(taudx*taudx+taudy*taudy);3855 }3856 IssmDouble Alphaeff,Alphaeff_cleanice;3857 3858 /*measure the surface mass balance*/3859 for (int iv = 0; iv<NUM_VERTICES; iv++){3860 3861 IssmDouble st=(surface[iv]-s0t[iv])/1000.;3862 3863 int ismb_end=1;3864 if(isdebris & !isAnderson) ismb_end=2;3865 for (int ismb=0;ismb<ismb_end;ismb++){3866 if(ismb==0){3867 // calc a reference smb to identify accum and melt region; debris only develops in ablation area3868 debris=0.;3869 PhiD=0.;3870 if(isAnderson) debris_here=debriscover[iv]; // store debris for later3871 }else{3872 // debris only develops in ablation area3873 /*if((accu[iv]/yts-CleanIceMelt)<(-1e-2)/yts){3874 debris=debriscover[iv];3875 }else{3876 debris=0.;3877 }*/3878 debris=0.;3879 if(debris<=0.) debris=0.;3880 if(isdebris) PhiD=FindParam(DebrisPackingFractionEnum);3881 CumMonthlyMelt=0;3882 CumMonthlySummerMelt=0;3883 debris_here=debriscover[iv];3884 }3885 3886 /* Now run the debris part */3887 3888 // Climate inputs3889 IssmDouble Tm; // C air temperature3890 IssmDouble In; // Wm^-2 incoming long wave3891 IssmDouble Q; // Wm^-2 incoming short wave3892 IssmDouble Um; // ms^-1 measured wind speed3893 IssmDouble Humidity; // relative humidity3894 IssmDouble P; // precip3895 3896 // other parameters3897 IssmDouble Qh=0.006; // kg m^-3 saturated humidity level // not used3898 IssmDouble Qm=0.8*Qh; // kg m^-3 measured humiditiy level // not used3899 IssmDouble Rhoaa=1.22; // kgm^-3 air densitiy3900 IssmDouble K=0.585; // Wm^-1K^-1 thermal conductivity 0.5853901 IssmDouble Xr=0.01; // ms^-1 surface roughness 0.013902 IssmDouble Ustar=0.16; // ms^-1 friction velocity 0.163903 IssmDouble Ca=1000; // jkg^-1K^-1 specific heat capacity of air3904 IssmDouble Lv=2.50E+06;// jkg^-1K^-1 latent heat of evaporation3905 IssmDouble Eps=0.95; // thermal emissivity3906 IssmDouble Sigma=5.67E-08;// Wm^-2K^-4 Stefan Boltzmann constant3907 IssmDouble Gamma=180.; // m^-1 wind speed attenuation 2343908 3909 // Calculate effective albedo3910 IssmDouble dk=1e-2;3911 IssmDouble n=debris/dk;3912 IssmDouble nmax=(25*25)/2 * 0.02/dk;3913 IssmDouble Alphaeff,Alphaeff_cleanice;3914 IssmDouble mean_ela,delta=2000;3915 3916 // compute cleanice albedo based on previous SMB distribution3917 if(step==1){3918 mean_ela=3000; //FIXME3919 }else{3920 mean_ela=FindParam(SmbMeanElaEnum);3921 }3922 Alphaeff_cleanice=icealbedo+(snowalbedo-icealbedo)*(1+tanh(PI*(surface[iv]-mean_ela)/delta))/2;3923 Alphaeff=Alphaeff_cleanice; // will be updated below3924 3925 yearlytemperatures[iv]=0; // tmp3926 accu[iv]=0.;3927 for (int imonth=0;imonth<365;imonth++) {3928 3929 Tm=monthlytemperatures[iv*365+imonth]-st*rlaps;//+t_ampl[iv];//+(rand()%10-5)/5;3930 In=monthlylw[iv*365+imonth]-st*dllaps+lw_ampl[iv];3931 Q=monthlysw[iv*365+imonth]+st*dslaps+sw_ampl[iv];3932 Humidity=monthlyhumidity[iv*365+imonth]-st*humiditylaps+humidity_ampl[iv];3933 Um=monthlywind[iv*365+imonth]-st*windspeedlaps+wind_ampl[iv];3934 P=(qlaps*st*monthlyprecip[iv*365+imonth]+monthlyprecip[iv*365+imonth]+p_ampl[iv])*sconv/365.; // convert precip from w.e. -> i.e3935 /*Partition of precip in solid and liquid parts */3936 IssmDouble temp_plus=1;3937 IssmDouble temp_minus=-1.;3938 IssmDouble frac_solid;3939 if(Tm>=temp_plus){3940 frac_solid=0;3941 }else if(Tm<=temp_minus){3942 frac_solid=1;3943 }else{3944 frac_solid=1*(1-cos(PI*(temp_plus-Tm)/(temp_plus-temp_minus)))/2;3945 }3946 3947 /*Get yearly temperatures and accumulation */3948 yearlytemperatures[iv]=yearlytemperatures[iv]+((monthlytemperatures[iv*365+imonth]-rlaps*st+Tf+t_ampl[iv]))/365; // Has to be in Kelvin3949 accu[iv]=accu[iv]+P*frac_solid;3950 if(yearlytemperatures[iv]>Tf) yearlytemperatures[iv]=Tf;3951 3952 CleanIceMonthlyMelt=((In-(Eps*Sigma*(Tf*Tf*Tf*Tf))+3953 Q*(1.-Alphaeff)+3954 (Rhoaa*Ca*Ustar*Ustar)/(Um-Ustar*(2.-(exp(Gamma*Xr))))*Tm)/((1-PhiD)*rho_ice*Lm)/(1.+3955 ((Rhoaa*Ca*Ustar*Ustar)/(Um-Ustar*(2.-(exp(Gamma*Xr))))+4.*Eps*Sigma*(Tf*Tf*Tf))/3956 K*debris)-(Lv*Ustar*Ustar*((Humidity))*(exp(-Gamma*Xr)))/((1.-PhiD)*3957 rho_ice*Lm*Ustar)/(((Um3958 -2.*Ustar)*exp(-Gamma*Xr))/Ustar+exp(Gamma*debris)));3959 if(CleanIceMonthlyMelt<0) CleanIceMonthlyMelt=0.;3960 MonthlyMelt=CleanIceMonthlyMelt;3961 3962 if(ismb==1){3963 snowheight[iv]=snowheight[iv]+(P-CleanIceMonthlyMelt*yts/365);3964 if(snowheight[iv]<=0) snowheight[iv]=0.;3965 if(snowheight[iv]<=0.0001){3966 p=debris_here*PhiD/(2*0.2*0.01); //Eq. 51 from Evatt et al 2015 without source term g*t3967 if(p>1.) p=1.;3968 if(p>=0.999){3969 Alphaeff=debrisalbedo;3970 } else {3971 Alphaeff=Alphaeff_cleanice+p*(debrisalbedo-Alphaeff_cleanice);3972 }3973 debris=debris_here;3974 MonthlyMelt=((In-(Eps*Sigma*(Tf*Tf*Tf*Tf))+3975 Q*(1.-Alphaeff)+3976 (Rhoaa*Ca*Ustar*Ustar)/(Um-Ustar*(2.-(exp(Gamma*Xr))))*Tm)/((1-PhiD)*rho_ice*Lm)/(1.+3977 ((Rhoaa*Ca*Ustar*Ustar)/(Um-Ustar*(2.-(exp(Gamma*Xr))))+4.*Eps*Sigma*(Tf*Tf*Tf))/3978 K*debris)-(Lv*Ustar*Ustar*((Humidity))*(exp(-Gamma*Xr)))/((1.-PhiD)*3979 rho_ice*Lm*Ustar)/(((Um-2.*Ustar)*exp(-Gamma*Xr))/Ustar+exp(Gamma*debris)));3980 if(MonthlyMelt<0) MonthlyMelt=0.;3981 MeanSummerAlbedo=MeanSummerAlbedo+Alphaeff;3982 CumMonthlySummerMelt=CumMonthlySummerMelt+MonthlyMelt/365;3983 }3984 }3985 CumMonthlyMelt=CumMonthlyMelt+MonthlyMelt/365;3986 }3987 MeanAlbedo=MeanAlbedo+Alphaeff;3988 if(ismb==0) CleanIceMelt=CumMonthlyMelt;3989 }3990 3991 if(iscryokarst){3992 if(taud>=taud_plus){3993 lambda=0;3994 }else if(taud>=taud_minus & taud<taud_plus){3995 lambda=0.1*(1-cos(PI*(taud_plus-taud)/(taud_plus-taud_minus)))/2;3996 }else if(taud<taud_minus){3997 lambda=0.1;3998 }3999 }4000 4001 // update values4002 melt[iv]=CumMonthlyMelt; // is already in m/s4003 accu[iv]=accu[iv]/yts;4004 if(isAnderson){4005 smb[iv]=(accu[iv]-melt[iv])*D0/(D0+debris_here);4006 if(iscryokarst){4007 smb[iv]=lambda*(accu[iv]-melt[iv])+(1-lambda)*(accu[iv]-melt[iv])*D0/(D0+debris_here);4008 }else{4009 smb[iv]=(accu[iv]-melt[iv])*D0/(D0+debris_here);4010 }4011 }else{4012 if(iscryokarst){4013 smb[iv]=lambda*(accu[iv]-CleanIceMelt)+(1-lambda)*(accu[iv]-melt[iv]);4014 }else{4015 smb[iv]=(accu[iv]-melt[iv]);4016 }4017 }4018 albedo[iv]=MeanAlbedo;4019 summeralbedo[iv]=MeanSummerAlbedo;4020 summermelt[iv]=CumMonthlySummerMelt;4021 }4022 4023 this->AddInput(SmbMassBalanceEnum,smb,P1Enum);4024 this->AddInput(SmbAccumulationEnum,accu,P1Enum);4025 this->AddInput(SmbMeltEnum,melt,P1Enum);4026 this->AddInput(SmbSummerMeltEnum,summermelt,P1Enum);4027 this->AddInput(SmbSnowheightEnum,snowheight,P1Enum);4028 this->AddInput(SmbAlbedoEnum,albedo,P1Enum);4029 this->AddInput(SmbSummerAlbedoEnum,summeralbedo,P1Enum);4030 this->AddInput(TemperaturePDDEnum,yearlytemperatures,P1Enum); // TemperaturePDD is wrong here, but don't want to create new Enum ...4031 4032 /*clean-up*/4033 xDelete<IssmDouble>(monthlytemperatures);4034 xDelete<IssmDouble>(monthlyprecip);4035 xDelete<IssmDouble>(monthlylw);4036 xDelete<IssmDouble>(monthlysw);4037 xDelete<IssmDouble>(monthlywind);4038 xDelete<IssmDouble>(monthlyhumidity);4039 xDelete<IssmDouble>(smb);4040 xDelete<IssmDouble>(surface);4041 xDelete<IssmDouble>(melt);4042 xDelete<IssmDouble>(summermelt);4043 xDelete<IssmDouble>(albedo);4044 xDelete<IssmDouble>(summeralbedo);4045 xDelete<IssmDouble>(accu);4046 xDelete<IssmDouble>(yearlytemperatures);4047 xDelete<IssmDouble>(s0t);4048 xDelete<IssmDouble>(snowheight);4049 xDelete<IssmDouble>(debriscover);4050 xDelete<IssmDouble>(t_ampl);4051 xDelete<IssmDouble>(p_ampl);4052 xDelete<IssmDouble>(lw_ampl);4053 xDelete<IssmDouble>(sw_ampl);4054 xDelete<IssmDouble>(humidity_ampl);4055 xDelete<IssmDouble>(wind_ampl);4056 xDelete<IssmDouble>(slopex);4057 xDelete<IssmDouble>(slopey);4058 xDelete<IssmDouble>(icethickness);4059 3729 } 4060 3730 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r27850 r27852 177 177 void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm,bool ismungsm,bool issetpddfac); 178 178 void PositiveDegreeDaySicopolis(bool isfirnwarming); 179 void SmbDebrisEvatt();180 179 void RignotMeltParameterization(); 181 180 void ResultInterpolation(int* pinterpolation,int*nodesperelement,int* parray_size, int output_enum); … … 257 256 virtual void ComputeStressTensor(void)=0; 258 257 virtual void ComputeEsaStrainAndVorticity(void)=0; 259 //virtual void ComputeMeanEla(IssmDouble* paltitude,int* pcounter)=0;260 258 virtual void Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters,Inputs* inputsin)=0; 261 259 virtual void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index,int offset,int M,int N,int interp)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r27850 r27852 5283 5283 /*}}}*/ 5284 5284 #endif 5285 //void Penta::ComputeMeanEla(IssmDouble* paltitude, int* pcounter){/*{{{*/5286 //5287 // if(!this->IsOnSurface() & !this->IsIceInElement()) return;5288 // int ipos=0,ineg=0, counter=0;5289 // IssmDouble mean_element_surface=0;5290 5291 /* input */5292 // IssmDouble smb[NUMVERTICES],surface[NUMVERTICES];5293 // Element::GetInputListOnVertices(&smb[0],SmbMassBalanceEnum);5294 // Element::GetInputListOnVertices(&surface[0],SurfaceEnum);5295 5296 // for(int iv=0;iv<NUMVERTICES;iv++){5297 // if(smb[iv]>0) ipos=ipos+1;5298 // if(smb[iv]<0) ineg=ineg+1;5299 // }5300 5301 /* we define ELA if an element has pos and neg smb */5302 // if(ipos>0 & ineg>0){5303 // for(int iv=0;iv<NUMVERTICES;iv++) mean_element_surface=mean_element_surface+surface[iv]/double(NUMVERTICES);5304 // *paltitude+=mean_element_surface;5305 // *pcounter+=counter+1;5306 // }5307 //}5308 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r27850 r27852 50 50 void ComputeSigmaNN(){_error_("not implemented yet");}; 51 51 void ComputeStressTensor(){_error_("not implemented yet");}; 52 //void ComputeMeanEla(IssmDouble* paltitude, int* pcounter){_error_("not implemented yet");};53 52 void Configure(Elements* elements,Loads* loads,Nodes* nodesin,Vertices* verticesin,Materials* materials,Parameters* parameters,Inputs* inputsin){_error_("not implemented yet");}; 54 53 void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index,int offset,int M,int N,int interp){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tetra.h
r27850 r27852 46 46 void ComputeSigmaNN(){_error_("not implemented yet");}; 47 47 void ComputeStressTensor(){_error_("not implemented yet");}; 48 //void ComputeMeanEla(IssmDouble* paltitude, int* pcounter){_error_("not implemented yet");};49 48 void ComputeDeviatoricStressTensor(){_error_("not implemented yet");}; 50 49 void ComputeEsaStrainAndVorticity(){_error_("not implemented yet!");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r27850 r27852 72 72 void ComputeStressTensor(); 73 73 void ComputeSurfaceNormalVelocity(); 74 //void ComputeMeanEla(IssmDouble* paltitude, int* pcounter){_error_("not implemented yet");};75 74 void Configure(Elements* elements,Loads* loads,Nodes* nodesin,Vertices* verticesin,Materials* materials,Parameters* parameters,Inputs* inputsin); 76 75 void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index,int offset,int M,int N,int interp); -
issm/trunk-jpl/src/c/cores/debris_core.cpp
r27848 r27852 27 27 28 28 /*recover parameters: */ 29 femmodel->parameters->FindParam(&domaintype,DomainTypeEnum);30 29 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 31 30 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); … … 44 43 femmodel->inputs->DuplicateInput(VyEnum,VyDebrisEnum); 45 44 } 45 femmodel->parameters->SetParam(VxEnum,InputToDepthaverageInEnum); 46 femmodel->parameters->SetParam(VxAverageEnum,InputToDepthaverageOutEnum); 47 depthaverage_core(femmodel); 48 if(domaintype!=Domain2DverticalEnum){ 49 femmodel->parameters->SetParam(VyEnum,InputToDepthaverageInEnum); 50 femmodel->parameters->SetParam(VyAverageEnum,InputToDepthaverageOutEnum); 51 depthaverage_core(femmodel); 52 } 46 53 47 54 debris_analysis = new DebrisAnalysis(); … … 52 59 extrudefromtop_core(femmodel); 53 60 54 IssmDouble mean_ela;55 //ComputeMeanElax(&mean_ela,femmodel);56 //femmodel->parameters->SetParam(mean_ela,SmbMeanElaEnum);57 _printf_("core ELA: " << mean_ela << "\n");58 59 61 if(save_results) femmodel->RequestedOutputsx(&femmodel->results,requested_outputs,numoutputs); 60 62 if(solution_type==DebrisSolutionEnum)femmodel->RequestedDependentsx(); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r27847 r27852 489 489 parameters->AddObject(iomodel->CopyConstantObject("md.smb.ismethod",SmbSemicMethodEnum)); 490 490 break; 491 case SMBdebrisEvattEnum: 492 parameters->AddObject(iomodel->CopyConstantObject("md.smb.qlaps",SmbDesfacEnum)); 493 parameters->AddObject(iomodel->CopyConstantObject("md.smb.rlaps",SmbRlapsEnum)); 494 parameters->AddObject(iomodel->CopyConstantObject("md.smb.dslaps",SmbSWlapsEnum)); 495 parameters->AddObject(iomodel->CopyConstantObject("md.smb.dllaps",SmbLWlapsEnum)); 496 parameters->AddObject(iomodel->CopyConstantObject("md.smb.windspeedlaps",SmbWindspeedlapsEnum)); 497 parameters->AddObject(iomodel->CopyConstantObject("md.smb.humiditylaps",SmbHumiditylapsEnum)); 498 parameters->AddObject(iomodel->CopyConstantObject("md.smb.icealbedo",SmbIcealbedoEnum)); 499 parameters->AddObject(iomodel->CopyConstantObject("md.smb.snowalbedo",SmbSnowalbedoEnum)); 500 parameters->AddObject(iomodel->CopyConstantObject("md.smb.debrisalbedo",SmbDebrisalbedoEnum)); 501 parameters->AddObject(iomodel->CopyConstantObject("md.smb.ismonthly",SmbDebrisIsMonthlyEnum)); 502 parameters->AddObject(iomodel->CopyConstantObject("md.smb.isAnderson",SmbDebrisIsAndersonEnum)); 503 parameters->AddObject(iomodel->CopyConstantObject("md.smb.iscryokarst",SmbDebrisIsCryokarstEnum)); 504 parameters->AddObject(iomodel->CopyConstantObject("md.smb.AndersonD0",SmbDebrisAndersonD0Enum)); 491 case SMBdebrisMLEnum: 505 492 break; 506 493 default: -
issm/trunk-jpl/src/c/modules/SurfaceMassBalancex/SurfaceMassBalancex.cpp
r27847 r27852 504 504 505 505 }/*}}}*/ 506 void SmbDebrisEvattx(FemModel* femmodel){/*{{{*/ 507 for(Object* & object : femmodel->elements->objects){ 508 Element* element=xDynamicCast<Element*>(object); 509 element->SmbDebrisEvatt(); 510 } 506 void SmbDebrisMLx(FemModel* femmodel){/*{{{*/ 507 508 // The function is based on: 509 // Evatt GW, Abrahams ID, Heil M, Mayer C, Kingslake J, Mitchell SL, et al. Glacial melt under a porous debris layer. Journal of Glaciology 61 (2015) 825–836, doi:10.3189/2 510 // Constants/Values are taken from Mayer, Licciulli (2021): https://www.frontiersin.org/articles/10.3389/feart.2021.710276/full#B7 511 // function taken from https://github.com/carlolic/DebrisExp/blob/main/USFs/USF_DebrisCoverage.f90 512 513 /*Intermediaries*/ 514 // altitude gradients of the crucial parameters (radiation from Marty et al., TaAClimat; 2002) 515 IssmDouble LW=2.9; // W/m^2 /100m 2.9 516 IssmDouble SW=1.3; // W/m^2 /100m 1.3 517 IssmDouble HumidityG=0; // % /100m rough estimate 518 IssmDouble AirTemp=0.7; // C /100m 519 IssmDouble WindSpeed=0.02; // m/s /100m rough estimate 0.2 520 521 // accumulation follows a linear increase above the ELA up to a plateau 522 IssmDouble AccG=0.1; // m w.e. /100m 523 IssmDouble AccMax=1.; // m w.e. 524 IssmDouble ReferenceElevation; 525 IssmDouble AblationDays=120.; // 526 527 IssmDouble In=100.; // Wm^-2 incoming long wave 528 IssmDouble Q=500.; // Wm^-2 incoming short wave 529 IssmDouble K=0.585; // Wm^-1K^-1 thermal conductivity 0.585 530 IssmDouble Qm=0.0012; // kg m^-3 measured humiditiy level 531 IssmDouble Qh=0.006 ; // kg m^-3 saturated humidity level 532 IssmDouble Tm=2.; // C air temperature 533 IssmDouble Rhoaa=1.22; // kgm^-3 air densitiy 534 IssmDouble Um=1.5; // ms^-1 measured wind speed 535 IssmDouble Xm=1.5; // ms^-1 measurement height 536 IssmDouble Xr=0.01; // ms^-1 surface roughness 0.01 537 IssmDouble Alphad=0.07; // debris albedo 0.07 538 IssmDouble Alphai=0.4; // ice ablbedo 539 IssmDouble Alphaeff; 540 IssmDouble Ustar=0.16; // ms^-1 friction velocity 0.16 541 IssmDouble Ca=1000.; // jkg^-1K^-1 specific heat capacity of air 542 IssmDouble Lm;//=3.34E+05; // jkg^-1K^-1 latent heat of ice melt 543 IssmDouble Lv=2.50E+06; // jkg^-1K^-1 latent heat of evaporation 544 IssmDouble Tf=273.; // K water freeezing temperature 545 IssmDouble Eps=0.95; // thermal emissivity 546 IssmDouble Rhoi=900.; // kgm^-3 ice density 547 IssmDouble Sigma=5.67E-08; // Wm^-2K^-4 Stefan Boltzmann constant 548 IssmDouble Kstar=0.4; // von kármán constant 549 IssmDouble Gamma=180.; // m^-1 wind speed attenuation 234 550 IssmDouble PhiD;//=0.005; // debris packing fraction 0.01 551 IssmDouble Humidity=0.2; // relative humidity 552 553 IssmDouble smb,yts,z,debris; 554 IssmDouble MassBalanceCmDayDebris,MassBalanceMYearDebris; 555 bool isdebris; 556 int domaintype; 557 femmodel->parameters->FindParam(&isdebris,TransientIsdebrisEnum); 558 559 /*Get material parameters and constants */ 560 //femmodel->parameters->FindParam(&Rhoi,MaterialsRhoIceEnum); // Note Carlo's model used as benchmark was run with different densities for debris and FS 561 femmodel->parameters->FindParam(&Lm,MaterialsLatentheatEnum); 562 femmodel->parameters->FindParam(&yts,ConstantsYtsEnum); 563 PhiD=0.; 564 if(isdebris) femmodel->parameters->FindParam(&PhiD,DebrisPackingFractionEnum); 565 566 /* Loop over all the elements of this partition */ 567 for(Object* & object : femmodel->elements->objects){ 568 Element* element=xDynamicCast<Element*>(object); 569 570 /* Allocate all arrays */ 571 int numvertices=element->GetNumberOfVertices(); 572 IssmDouble* surfacelist=xNew<IssmDouble>(numvertices); 573 IssmDouble* smb=xNew<IssmDouble>(numvertices); 574 IssmDouble* debriscover=xNew<IssmDouble>(numvertices); 575 element->GetInputListOnVertices(surfacelist,SurfaceEnum); 576 577 /* Get inputs */ 578 element->GetInputListOnVertices(debriscover,DebrisThicknessEnum); 579 element->FindParam(&domaintype,DomainTypeEnum); 580 581 /*Loop over all vertices of element and calculate SMB as function of Debris Cover and z */ 582 for(int v=0;v<numvertices;v++){ 583 584 /*Get vertex elevation */ 585 z=surfacelist[v]; 586 587 /*Get top element*/ 588 //if(domaintype==Domain3DEnum){ 589 590 //}else{ 591 // Alphaeff=Alphad; 592 // ReferenceElevation=2200.; // m M&L 593 //} 594 595 /* compute smb */ 596 for (int ismb=0;ismb<2;ismb++){ 597 if(ismb==0){ 598 // calc a reference smb to identify accum and melt region; debris only develops in ablation area 599 debris=0.; 600 PhiD=0.; 601 }else{ 602 // only in the meltregime debris develops 603 if(-MassBalanceCmDayDebris<1e-14) debris=debriscover[v]; 604 } 605 if(debris<=0.) debris=0.; 606 IssmDouble dk=1e-5; // TODO make Alphad and Alphai a user input 607 IssmDouble n=debris/dk; 608 IssmDouble nmax=1000; 609 IssmDouble Alphaeff; 610 if(n>nmax){ 611 Alphaeff=Alphad; 612 } else { 613 Alphaeff=Alphai+n*(Alphad-Alphai)/nmax; 614 } 615 ReferenceElevation=3200.; // m HEF 616 617 618 Alphaeff=Alphad; 619 ReferenceElevation=2200.; // m M&L 620 621 MassBalanceCmDayDebris=(((In-(z-ReferenceElevation)*LW/100.)-(Eps*Sigma*(Tf*Tf*Tf*Tf))+ 622 (Q+(z-ReferenceElevation)*SW/100.)*(1.-Alphaeff)+ 623 (Rhoaa*Ca*Ustar*Ustar)/((Um-(z-ReferenceElevation)* 624 WindSpeed/100.)-Ustar*(2.-(exp(Gamma*Xr))))*(Tm-(z- 625 ReferenceElevation)*AirTemp/100.))/((1-PhiD)*Rhoi*Lm)/(1.+ 626 ((Rhoaa*Ca*Ustar*Ustar)/((Um-(z-ReferenceElevation)* 627 WindSpeed/100.)-Ustar*(2.-(exp(Gamma*Xr))))+4.*Eps*Sigma*(Tf*Tf*Tf))/ 628 K*debris)-(Lv*Ustar*Ustar*(Qh-(Qh*(Humidity-(z- 629 ReferenceElevation)*HumidityG/100.)))*(exp(-Gamma*Xr)))/((1.-PhiD)* 630 Rhoi*Lm*Ustar)/((((Um-(z-ReferenceElevation)*WindSpeed/100.) 631 -2.*Ustar)*exp(-Gamma*Xr))/Ustar+exp(Gamma*debris)))*100.*24.*60.*60.; 632 } 633 634 /* account form ablation days, and convert to m/s */ 635 MassBalanceMYearDebris=-MassBalanceCmDayDebris/100.*AblationDays/yts; 636 637 /*Update array accordingly*/ 638 smb[v]=MassBalanceMYearDebris; 639 } 640 641 /*Add input to element and Free memory*/ 642 element->AddInput(SmbMassBalanceEnum,smb,P1Enum); 643 xDelete<IssmDouble>(surfacelist); 644 xDelete<IssmDouble>(smb); 645 xDelete<IssmDouble>(debriscover); 646 } 511 647 }/*}}}*/ 512 648 void SmbGradientsComponentsx(FemModel* femmodel){/*{{{*/ -
issm/trunk-jpl/src/c/modules/SurfaceMassBalancex/SurfaceMassBalancex.h
r27847 r27852 23 23 void SmbMeltComponentsx(FemModel* femmodel); 24 24 void SmbGradientsComponentsx(FemModel* femmodel); 25 void SmbDebris Evattx(FemModel* femmodel);25 void SmbDebrisMLx(FemModel* femmodel); 26 26 /* SEMIC: */ 27 27 void SmbSemicx(FemModel* femmodel, int ismethod); -
issm/trunk-jpl/src/c/modules/modules.h
r27849 r27852 86 86 #include "./ResetConstraintsx/ResetConstraintsx.h" 87 87 #include "./ResetFSBasalBoundaryConditionx/ResetFSBasalBoundaryConditionx.h" 88 //#include "./ComputeMeanElax/ComputeMeanElax.h"89 88 #include "./RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.h" 90 89 #include "./RheologyBAbsGradientx/RheologyBAbsGradientx.h" -
issm/trunk-jpl/src/c/shared/Enum/Enum.vim
r27847 r27852 176 176 syn keyword cConstant DebrisRemovalStressThresholdEnum 177 177 syn keyword cConstant DebrisPackingFractionEnum 178 syn keyword cConstant DebrisMaxdisplacementvelocityEnum179 178 syn keyword cConstant DebugProfilingEnum 180 179 syn keyword cConstant DomainDimensionEnum … … 540 539 syn keyword cConstant SmbARMAmaOrderEnum 541 540 syn keyword cConstant SmbAveragingEnum 542 syn keyword cConstant SmbDebrisalbedoEnum543 syn keyword cConstant SmbDebrisIsMonthlyEnum544 syn keyword cConstant SmbDebrisIsAndersonEnum545 syn keyword cConstant SmbDebrisIsCryokarstEnum546 syn keyword cConstant SmbDebrisAndersonD0Enum547 541 syn keyword cConstant SmbDesfacEnum 548 542 syn keyword cConstant SmbDesfacElevEnum … … 558 552 syn keyword cConstant SmbEIdxEnum 559 553 syn keyword cConstant SmbFEnum 560 syn keyword cConstant SmbHumiditylapsEnum561 554 syn keyword cConstant SmbInitDensityScalingEnum 562 syn keyword cConstant SmbIcealbedoEnum563 555 syn keyword cConstant SmbIsaccumulationEnum 564 556 syn keyword cConstant SmbIsalbedoEnum … … 580 572 syn keyword cConstant SmbKEnum 581 573 syn keyword cConstant SmbLapseRatesEnum 582 syn keyword cConstant SmbLWlapsEnum583 syn keyword cConstant SmbSWlapsEnum584 syn keyword cConstant SmbSnowalbedoEnum585 syn keyword cConstant SmbMeanElaEnum586 574 syn keyword cConstant SmbNumBasinsEnum 587 575 syn keyword cConstant SmbNumBreaksEnum … … 624 612 syn keyword cConstant SmbTemperaturesReconstructedYearsEnum 625 613 syn keyword cConstant SmbPrecipitationsReconstructedYearsEnum 626 syn keyword cConstant SmbWindspeedlapsEnum627 614 syn keyword cConstant SmoothThicknessMultiplierEnum 628 615 syn keyword cConstant SolutionTypeEnum … … 792 779 syn keyword cConstant DamageFEnum 793 780 syn keyword cConstant DebrisThicknessEnum 794 syn keyword cConstant DebrisThicknessOldEnum795 781 syn keyword cConstant DegreeOfChannelizationEnum 796 782 syn keyword cConstant DepthBelowSurfaceEnum … … 1121 1107 syn keyword cConstant SmbMeltEnum 1122 1108 syn keyword cConstant SmbMonthlytemperaturesEnum 1123 syn keyword cConstant SmbMonthlydsradiationEnum1124 syn keyword cConstant SmbMonthlydlradiationEnum1125 syn keyword cConstant SmbMonthlywindspeedEnum1126 syn keyword cConstant SmbMonthlyairhumidityEnum1127 1109 syn keyword cConstant SmbMSurfEnum 1128 1110 syn keyword cConstant SmbNetLWEnum … … 1134 1116 syn keyword cConstant SmbPrecipitationEnum 1135 1117 syn keyword cConstant SmbPrecipitationsAnomalyEnum 1136 syn keyword cConstant SmbDsradiationAnomalyEnum1137 syn keyword cConstant SmbDlradiationAnomalyEnum1138 syn keyword cConstant SmbWindspeedAnomalyEnum1139 syn keyword cConstant SmbAirhumidityAnomalyEnum1140 1118 syn keyword cConstant SmbPrecipitationsLgmEnum 1141 1119 syn keyword cConstant SmbPrecipitationsPresentdayEnum … … 1157 1135 syn keyword cConstant SmbSmbrefEnum 1158 1136 syn keyword cConstant SmbSzaValueEnum 1159 syn keyword cConstant SmbSummerMeltEnum1160 syn keyword cConstant SmbSummerAlbedoEnum1161 syn keyword cConstant SmbSnowheightEnum1162 1137 syn keyword cConstant SmbTEnum 1163 1138 syn keyword cConstant SmbTaEnum … … 1679 1654 syn keyword cConstant SMBarmaEnum 1680 1655 syn keyword cConstant SMBcomponentsEnum 1681 syn keyword cConstant SMBdebris EvattEnum1656 syn keyword cConstant SMBdebrisMLEnum 1682 1657 syn keyword cConstant SMBd18opddEnum 1683 1658 syn keyword cConstant SMBforcingEnum … … 1805 1780 syn keyword cType Cfsurfacesquaretransient 1806 1781 syn keyword cType Channel 1807 syn keyword cType classes1808 1782 syn keyword cType Constraint 1809 1783 syn keyword cType Constraints … … 1813 1787 syn keyword cType ControlParam 1814 1788 syn keyword cType Covertree 1789 syn keyword cType DataSetParam 1815 1790 syn keyword cType DatasetInput 1816 syn keyword cType DataSetParam1817 1791 syn keyword cType Definition 1818 1792 syn keyword cType DependentObject … … 1827 1801 syn keyword cType ElementInput 1828 1802 syn keyword cType ElementMatrix 1803 syn keyword cType ElementVector 1829 1804 syn keyword cType Elements 1830 syn keyword cType ElementVector1831 1805 syn keyword cType ExponentialVariogram 1832 1806 syn keyword cType ExternalResult … … 1835 1809 syn keyword cType Friction 1836 1810 syn keyword cType Gauss 1837 syn keyword cType GaussianVariogram1838 syn keyword cType gaussobjects1839 1811 syn keyword cType GaussPenta 1840 1812 syn keyword cType GaussSeg 1841 1813 syn keyword cType GaussTetra 1842 1814 syn keyword cType GaussTria 1815 syn keyword cType GaussianVariogram 1843 1816 syn keyword cType GenericExternalResult 1844 1817 syn keyword cType GenericOption … … 1857 1830 syn keyword cType IssmDirectApplicInterface 1858 1831 syn keyword cType IssmParallelDirectApplicInterface 1859 syn keyword cType krigingobjects1860 1832 syn keyword cType Load 1861 1833 syn keyword cType Loads … … 1868 1840 syn keyword cType Matice 1869 1841 syn keyword cType Matlitho 1870 syn keyword cType matrixobjects1871 1842 syn keyword cType MatrixParam 1872 1843 syn keyword cType Misfit … … 1881 1852 syn keyword cType Observations 1882 1853 syn keyword cType Option 1854 syn keyword cType OptionUtilities 1883 1855 syn keyword cType Options 1884 syn keyword cType OptionUtilities1885 1856 syn keyword cType Param 1886 1857 syn keyword cType Parameters … … 1896 1867 syn keyword cType Regionaloutput 1897 1868 syn keyword cType Results 1869 syn keyword cType RiftStruct 1898 1870 syn keyword cType Riftfront 1899 syn keyword cType RiftStruct1900 1871 syn keyword cType SealevelGeometry 1901 1872 syn keyword cType Seg 1902 1873 syn keyword cType SegInput 1874 syn keyword cType SegRef 1903 1875 syn keyword cType Segment 1904 syn keyword cType SegRef1905 1876 syn keyword cType SpcDynamic 1906 1877 syn keyword cType SpcStatic … … 1921 1892 syn keyword cType Vertex 1922 1893 syn keyword cType Vertices 1894 syn keyword cType classes 1895 syn keyword cType gaussobjects 1896 syn keyword cType krigingobjects 1897 syn keyword cType matrixobjects 1923 1898 syn keyword cType AdjointBalancethickness2Analysis 1924 1899 syn keyword cType AdjointBalancethicknessAnalysis -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r27847 r27852 170 170 DebrisRemovalStressThresholdEnum, 171 171 DebrisPackingFractionEnum, 172 DebrisMaxdisplacementvelocityEnum,173 172 DebugProfilingEnum, 174 173 DomainDimensionEnum, … … 531 530 SmbAlbedoLandEnum, 532 531 SmbARMATimestepEnum, 533 534 532 SmbARMAarOrderEnum, 533 SmbARMAmaOrderEnum, 535 534 SmbAveragingEnum, 536 SmbDebrisalbedoEnum,537 SmbDebrisIsMonthlyEnum,538 SmbDebrisIsAndersonEnum,539 SmbDebrisIsCryokarstEnum,540 SmbDebrisAndersonD0Enum,541 535 SmbDesfacEnum, 542 536 SmbDesfacElevEnum, 543 537 SmbDpermilEnum, 544 538 SmbDsnowIdxEnum, 545 539 SmbElevationBinsEnum, 546 540 SmbCldFracEnum, 547 541 SmbDelta18oEnum, … … 552 546 SmbEIdxEnum, 553 547 SmbFEnum, 554 SmbHumiditylapsEnum,555 548 SmbInitDensityScalingEnum, 556 SmbIcealbedoEnum,557 549 SmbIsaccumulationEnum, 558 550 SmbIsalbedoEnum, … … 573 565 SmbIsturbulentfluxEnum, 574 566 SmbKEnum, 575 SmbLapseRatesEnum, 576 SmbLWlapsEnum, 577 SmbSWlapsEnum, 578 SmbSnowalbedoEnum, 579 SmbMeanElaEnum, 567 SmbLapseRatesEnum, 580 568 SmbNumBasinsEnum, 581 569 SmbNumBreaksEnum, … … 618 606 SmbTemperaturesReconstructedYearsEnum, 619 607 SmbPrecipitationsReconstructedYearsEnum, 620 SmbWindspeedlapsEnum,621 608 SmoothThicknessMultiplierEnum, 622 609 SolutionTypeEnum, … … 788 775 DamageFEnum, 789 776 DebrisThicknessEnum, 790 DebrisThicknessOldEnum,791 777 DegreeOfChannelizationEnum, 792 778 DepthBelowSurfaceEnum, … … 1057 1043 SmbAdiffiniEnum, 1058 1044 SmbAiniEnum, 1059 1045 SmbARMANoiseEnum, 1060 1046 SmbBasinsIdEnum, 1061 1047 SmbBMaxEnum, … … 1118 1104 SmbMInitnum, 1119 1105 SmbMonthlytemperaturesEnum, 1120 SmbMonthlydsradiationEnum,1121 SmbMonthlydlradiationEnum,1122 SmbMonthlywindspeedEnum,1123 SmbMonthlyairhumidityEnum,1124 1106 SmbMSurfEnum, 1125 1107 SmbNetLWEnum, … … 1131 1113 SmbPrecipitationEnum, 1132 1114 SmbPrecipitationsAnomalyEnum, 1133 SmbDsradiationAnomalyEnum,1134 SmbDlradiationAnomalyEnum,1135 SmbWindspeedAnomalyEnum,1136 SmbAirhumidityAnomalyEnum,1137 1115 SmbPrecipitationsLgmEnum, 1138 1116 SmbPrecipitationsPresentdayEnum, … … 1154 1132 SmbSmbrefEnum, 1155 1133 SmbSzaValueEnum, 1156 SmbSummerMeltEnum,1157 SmbSummerAlbedoEnum,1158 SmbSnowheightEnum,1159 1134 SmbTEnum, 1160 1135 SmbTaEnum, … … 1678 1653 SMBarmaEnum, 1679 1654 SMBcomponentsEnum, 1680 SMBdebris EvattEnum,1655 SMBdebrisMLEnum, 1681 1656 SMBd18opddEnum, 1682 1657 SMBforcingEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r27847 r27852 178 178 case DebrisRemovalStressThresholdEnum : return "DebrisRemovalStressThreshold"; 179 179 case DebrisPackingFractionEnum : return "DebrisPackingFraction"; 180 case DebrisMaxdisplacementvelocityEnum : return "DebrisMaxdisplacementvelocity";181 180 case DebugProfilingEnum : return "DebugProfiling"; 182 181 case DomainDimensionEnum : return "DomainDimension"; … … 542 541 case SmbARMAmaOrderEnum : return "SmbARMAmaOrder"; 543 542 case SmbAveragingEnum : return "SmbAveraging"; 544 case SmbDebrisalbedoEnum : return "SmbDebrisalbedo";545 case SmbDebrisIsMonthlyEnum : return "SmbDebrisIsMonthly";546 case SmbDebrisIsAndersonEnum : return "SmbDebrisIsAnderson";547 case SmbDebrisIsCryokarstEnum : return "SmbDebrisIsCryokarst";548 case SmbDebrisAndersonD0Enum : return "SmbDebrisAndersonD0";549 543 case SmbDesfacEnum : return "SmbDesfac"; 550 544 case SmbDesfacElevEnum : return "SmbDesfacElev"; … … 560 554 case SmbEIdxEnum : return "SmbEIdx"; 561 555 case SmbFEnum : return "SmbF"; 562 case SmbHumiditylapsEnum : return "SmbHumiditylaps";563 556 case SmbInitDensityScalingEnum : return "SmbInitDensityScaling"; 564 case SmbIcealbedoEnum : return "SmbIcealbedo";565 557 case SmbIsaccumulationEnum : return "SmbIsaccumulation"; 566 558 case SmbIsalbedoEnum : return "SmbIsalbedo"; … … 582 574 case SmbKEnum : return "SmbK"; 583 575 case SmbLapseRatesEnum : return "SmbLapseRates"; 584 case SmbLWlapsEnum : return "SmbLWlaps";585 case SmbSWlapsEnum : return "SmbSWlaps";586 case SmbSnowalbedoEnum : return "SmbSnowalbedo";587 case SmbMeanElaEnum : return "SmbMeanEla";588 576 case SmbNumBasinsEnum : return "SmbNumBasins"; 589 577 case SmbNumBreaksEnum : return "SmbNumBreaks"; … … 626 614 case SmbTemperaturesReconstructedYearsEnum : return "SmbTemperaturesReconstructedYears"; 627 615 case SmbPrecipitationsReconstructedYearsEnum : return "SmbPrecipitationsReconstructedYears"; 628 case SmbWindspeedlapsEnum : return "SmbWindspeedlaps";629 616 case SmoothThicknessMultiplierEnum : return "SmoothThicknessMultiplier"; 630 617 case SolutionTypeEnum : return "SolutionType"; … … 794 781 case DamageFEnum : return "DamageF"; 795 782 case DebrisThicknessEnum : return "DebrisThickness"; 796 case DebrisThicknessOldEnum : return "DebrisThicknessOld";797 783 case DegreeOfChannelizationEnum : return "DegreeOfChannelization"; 798 784 case DepthBelowSurfaceEnum : return "DepthBelowSurface"; … … 1123 1109 case SmbMeltEnum : return "SmbMelt"; 1124 1110 case SmbMonthlytemperaturesEnum : return "SmbMonthlytemperatures"; 1125 case SmbMonthlydsradiationEnum : return "SmbMonthlydsradiation";1126 case SmbMonthlydlradiationEnum : return "SmbMonthlydlradiation";1127 case SmbMonthlywindspeedEnum : return "SmbMonthlywindspeed";1128 case SmbMonthlyairhumidityEnum : return "SmbMonthlyairhumidity";1129 1111 case SmbMSurfEnum : return "SmbMSurf"; 1130 1112 case SmbNetLWEnum : return "SmbNetLW"; … … 1136 1118 case SmbPrecipitationEnum : return "SmbPrecipitation"; 1137 1119 case SmbPrecipitationsAnomalyEnum : return "SmbPrecipitationsAnomaly"; 1138 case SmbDsradiationAnomalyEnum : return "SmbDsradiationAnomaly";1139 case SmbDlradiationAnomalyEnum : return "SmbDlradiationAnomaly";1140 case SmbWindspeedAnomalyEnum : return "SmbWindspeedAnomaly";1141 case SmbAirhumidityAnomalyEnum : return "SmbAirhumidityAnomaly";1142 1120 case SmbPrecipitationsLgmEnum : return "SmbPrecipitationsLgm"; 1143 1121 case SmbPrecipitationsPresentdayEnum : return "SmbPrecipitationsPresentday"; … … 1159 1137 case SmbSmbrefEnum : return "SmbSmbref"; 1160 1138 case SmbSzaValueEnum : return "SmbSzaValue"; 1161 case SmbSummerMeltEnum : return "SmbSummerMelt";1162 case SmbSummerAlbedoEnum : return "SmbSummerAlbedo";1163 case SmbSnowheightEnum : return "SmbSnowheight";1164 1139 case SmbTEnum : return "SmbT"; 1165 1140 case SmbTaEnum : return "SmbTa"; … … 1681 1656 case SMBarmaEnum : return "SMBarma"; 1682 1657 case SMBcomponentsEnum : return "SMBcomponents"; 1683 case SMBdebris EvattEnum : return "SMBdebrisEvatt";1658 case SMBdebrisMLEnum : return "SMBdebrisML"; 1684 1659 case SMBd18opddEnum : return "SMBd18opdd"; 1685 1660 case SMBforcingEnum : return "SMBforcing"; -
issm/trunk-jpl/src/c/shared/Enum/Enumjl.vim
r27847 r27852 169 169 syn keyword juliaConstC DebrisRemovalStressThresholdEnum 170 170 syn keyword juliaConstC DebrisPackingFractionEnum 171 syn keyword juliaConstC DebrisMaxdisplacementvelocityEnum172 171 syn keyword juliaConstC DebugProfilingEnum 173 172 syn keyword juliaConstC DomainDimensionEnum … … 533 532 syn keyword juliaConstC SmbARMAmaOrderEnum 534 533 syn keyword juliaConstC SmbAveragingEnum 535 syn keyword juliaConstC SmbDebrisalbedoEnum536 syn keyword juliaConstC SmbDebrisIsMonthlyEnum537 syn keyword juliaConstC SmbDebrisIsAndersonEnum538 syn keyword juliaConstC SmbDebrisIsCryokarstEnum539 syn keyword juliaConstC SmbDebrisAndersonD0Enum540 534 syn keyword juliaConstC SmbDesfacEnum 541 535 syn keyword juliaConstC SmbDesfacElevEnum … … 551 545 syn keyword juliaConstC SmbEIdxEnum 552 546 syn keyword juliaConstC SmbFEnum 553 syn keyword juliaConstC SmbHumiditylapsEnum554 547 syn keyword juliaConstC SmbInitDensityScalingEnum 555 syn keyword juliaConstC SmbIcealbedoEnum556 548 syn keyword juliaConstC SmbIsaccumulationEnum 557 549 syn keyword juliaConstC SmbIsalbedoEnum … … 573 565 syn keyword juliaConstC SmbKEnum 574 566 syn keyword juliaConstC SmbLapseRatesEnum 575 syn keyword juliaConstC SmbLWlapsEnum576 syn keyword juliaConstC SmbSWlapsEnum577 syn keyword juliaConstC SmbSnowalbedoEnum578 syn keyword juliaConstC SmbMeanElaEnum579 567 syn keyword juliaConstC SmbNumBasinsEnum 580 568 syn keyword juliaConstC SmbNumBreaksEnum … … 617 605 syn keyword juliaConstC SmbTemperaturesReconstructedYearsEnum 618 606 syn keyword juliaConstC SmbPrecipitationsReconstructedYearsEnum 619 syn keyword juliaConstC SmbWindspeedlapsEnum620 607 syn keyword juliaConstC SmoothThicknessMultiplierEnum 621 608 syn keyword juliaConstC SolutionTypeEnum … … 785 772 syn keyword juliaConstC DamageFEnum 786 773 syn keyword juliaConstC DebrisThicknessEnum 787 syn keyword juliaConstC DebrisThicknessOldEnum788 774 syn keyword juliaConstC DegreeOfChannelizationEnum 789 775 syn keyword juliaConstC DepthBelowSurfaceEnum … … 1114 1100 syn keyword juliaConstC SmbMeltEnum 1115 1101 syn keyword juliaConstC SmbMonthlytemperaturesEnum 1116 syn keyword juliaConstC SmbMonthlydsradiationEnum1117 syn keyword juliaConstC SmbMonthlydlradiationEnum1118 syn keyword juliaConstC SmbMonthlywindspeedEnum1119 syn keyword juliaConstC SmbMonthlyairhumidityEnum1120 1102 syn keyword juliaConstC SmbMSurfEnum 1121 1103 syn keyword juliaConstC SmbNetLWEnum … … 1127 1109 syn keyword juliaConstC SmbPrecipitationEnum 1128 1110 syn keyword juliaConstC SmbPrecipitationsAnomalyEnum 1129 syn keyword juliaConstC SmbDsradiationAnomalyEnum1130 syn keyword juliaConstC SmbDlradiationAnomalyEnum1131 syn keyword juliaConstC SmbWindspeedAnomalyEnum1132 syn keyword juliaConstC SmbAirhumidityAnomalyEnum1133 1111 syn keyword juliaConstC SmbPrecipitationsLgmEnum 1134 1112 syn keyword juliaConstC SmbPrecipitationsPresentdayEnum … … 1150 1128 syn keyword juliaConstC SmbSmbrefEnum 1151 1129 syn keyword juliaConstC SmbSzaValueEnum 1152 syn keyword juliaConstC SmbSummerMeltEnum1153 syn keyword juliaConstC SmbSummerAlbedoEnum1154 syn keyword juliaConstC SmbSnowheightEnum1155 1130 syn keyword juliaConstC SmbTEnum 1156 1131 syn keyword juliaConstC SmbTaEnum … … 1672 1647 syn keyword juliaConstC SMBarmaEnum 1673 1648 syn keyword juliaConstC SMBcomponentsEnum 1674 syn keyword juliaConstC SMBdebris EvattEnum1649 syn keyword juliaConstC SMBdebrisMLEnum 1675 1650 syn keyword juliaConstC SMBd18opddEnum 1676 1651 syn keyword juliaConstC SMBforcingEnum -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r27847 r27852 181 181 else if (strcmp(name,"DebrisRemovalStressThreshold")==0) return DebrisRemovalStressThresholdEnum; 182 182 else if (strcmp(name,"DebrisPackingFraction")==0) return DebrisPackingFractionEnum; 183 else if (strcmp(name,"DebrisMaxdisplacementvelocity")==0) return DebrisMaxdisplacementvelocityEnum;184 183 else if (strcmp(name,"DebugProfiling")==0) return DebugProfilingEnum; 185 184 else if (strcmp(name,"DomainDimension")==0) return DomainDimensionEnum; … … 260 259 else if (strcmp(name,"Hydrologyarmadatebreaks")==0) return HydrologyarmadatebreaksEnum; 261 260 else if (strcmp(name,"Hydrologyarmamalagcoefs")==0) return HydrologyarmamalagcoefsEnum; 261 else if (strcmp(name,"HydrologyarmamaOrder")==0) return HydrologyarmamaOrderEnum; 262 262 else stage=3; 263 263 } 264 264 if(stage==3){ 265 if (strcmp(name,"HydrologyarmamaOrder")==0) return HydrologyarmamaOrderEnum; 266 else if (strcmp(name,"HydrologyarmaMonthlyFactors")==0) return HydrologyarmaMonthlyFactorsEnum; 265 if (strcmp(name,"HydrologyarmaMonthlyFactors")==0) return HydrologyarmaMonthlyFactorsEnum; 267 266 else if (strcmp(name,"HydrologyarmaNumBreaks")==0) return HydrologyarmaNumBreaksEnum; 268 267 else if (strcmp(name,"HydrologyarmaNumParams")==0) return HydrologyarmaNumParamsEnum; … … 383 382 else if (strcmp(name,"MasstransportNumRequestedOutputs")==0) return MasstransportNumRequestedOutputsEnum; 384 383 else if (strcmp(name,"MasstransportPenaltyFactor")==0) return MasstransportPenaltyFactorEnum; 384 else if (strcmp(name,"MasstransportRequestedOutputs")==0) return MasstransportRequestedOutputsEnum; 385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"MasstransportRequestedOutputs")==0) return MasstransportRequestedOutputsEnum; 389 else if (strcmp(name,"MasstransportStabilization")==0) return MasstransportStabilizationEnum; 388 if (strcmp(name,"MasstransportStabilization")==0) return MasstransportStabilizationEnum; 390 389 else if (strcmp(name,"MaterialsBeta")==0) return MaterialsBetaEnum; 391 390 else if (strcmp(name,"MaterialsEarthDensity")==0) return MaterialsEarthDensityEnum; … … 506 505 else if (strcmp(name,"SolidearthSettingsRunFrequency")==0) return SolidearthSettingsRunFrequencyEnum; 507 506 else if (strcmp(name,"SolidearthSettingsTimeAcc")==0) return SolidearthSettingsTimeAccEnum; 507 else if (strcmp(name,"SolidearthSettingsHoriz")==0) return SolidearthSettingsHorizEnum; 508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"SolidearthSettingsHoriz")==0) return SolidearthSettingsHorizEnum; 512 else if (strcmp(name,"SolidearthSettingsMaxiter")==0) return SolidearthSettingsMaxiterEnum; 511 if (strcmp(name,"SolidearthSettingsMaxiter")==0) return SolidearthSettingsMaxiterEnum; 513 512 else if (strcmp(name,"SolidearthSettingsGrdOcean")==0) return SolidearthSettingsGrdOceanEnum; 514 513 else if (strcmp(name,"SolidearthSettingsOceanAreaScaling")==0) return SolidearthSettingsOceanAreaScalingEnum; … … 554 553 else if (strcmp(name,"SmbARMAmaOrder")==0) return SmbARMAmaOrderEnum; 555 554 else if (strcmp(name,"SmbAveraging")==0) return SmbAveragingEnum; 556 else if (strcmp(name,"SmbDebrisalbedo")==0) return SmbDebrisalbedoEnum;557 else if (strcmp(name,"SmbDebrisIsMonthly")==0) return SmbDebrisIsMonthlyEnum;558 else if (strcmp(name,"SmbDebrisIsAnderson")==0) return SmbDebrisIsAndersonEnum;559 else if (strcmp(name,"SmbDebrisIsCryokarst")==0) return SmbDebrisIsCryokarstEnum;560 else if (strcmp(name,"SmbDebrisAndersonD0")==0) return SmbDebrisAndersonD0Enum;561 555 else if (strcmp(name,"SmbDesfac")==0) return SmbDesfacEnum; 562 556 else if (strcmp(name,"SmbDesfacElev")==0) return SmbDesfacElevEnum; … … 572 566 else if (strcmp(name,"SmbEIdx")==0) return SmbEIdxEnum; 573 567 else if (strcmp(name,"SmbF")==0) return SmbFEnum; 574 else if (strcmp(name,"SmbHumiditylaps")==0) return SmbHumiditylapsEnum;575 568 else if (strcmp(name,"SmbInitDensityScaling")==0) return SmbInitDensityScalingEnum; 576 else if (strcmp(name,"SmbIcealbedo")==0) return SmbIcealbedoEnum;577 569 else if (strcmp(name,"SmbIsaccumulation")==0) return SmbIsaccumulationEnum; 578 570 else if (strcmp(name,"SmbIsalbedo")==0) return SmbIsalbedoEnum; … … 594 586 else if (strcmp(name,"SmbK")==0) return SmbKEnum; 595 587 else if (strcmp(name,"SmbLapseRates")==0) return SmbLapseRatesEnum; 596 else if (strcmp(name,"SmbLWlaps")==0) return SmbLWlapsEnum;597 else if (strcmp(name,"SmbSWlaps")==0) return SmbSWlapsEnum;598 else if (strcmp(name,"SmbSnowalbedo")==0) return SmbSnowalbedoEnum;599 else if (strcmp(name,"SmbMeanEla")==0) return SmbMeanElaEnum;600 588 else if (strcmp(name,"SmbNumBasins")==0) return SmbNumBasinsEnum; 601 589 else if (strcmp(name,"SmbNumBreaks")==0) return SmbNumBreaksEnum; … … 629 617 else if (strcmp(name,"SmbSemicTmax")==0) return SmbSemicTmaxEnum; 630 618 else if (strcmp(name,"SmbStepsPerStep")==0) return SmbStepsPerStepEnum; 631 else stage=6; 632 } 633 if(stage==6){ 634 if (strcmp(name,"SmbSwIdx")==0) return SmbSwIdxEnum; 619 else if (strcmp(name,"SmbSwIdx")==0) return SmbSwIdxEnum; 635 620 else if (strcmp(name,"SmbT0dry")==0) return SmbT0dryEnum; 636 621 else if (strcmp(name,"SmbT0wet")==0) return SmbT0wetEnum; … … 641 626 else if (strcmp(name,"SmbTemperaturesReconstructedYears")==0) return SmbTemperaturesReconstructedYearsEnum; 642 627 else if (strcmp(name,"SmbPrecipitationsReconstructedYears")==0) return SmbPrecipitationsReconstructedYearsEnum; 643 else if (strcmp(name,"SmbWindspeedlaps")==0) return SmbWindspeedlapsEnum;644 628 else if (strcmp(name,"SmoothThicknessMultiplier")==0) return SmoothThicknessMultiplierEnum; 645 629 else if (strcmp(name,"SolutionType")==0) return SolutionTypeEnum; 646 630 else if (strcmp(name,"SteadystateMaxiter")==0) return SteadystateMaxiterEnum; 647 else if (strcmp(name,"SteadystateNumRequestedOutputs")==0) return SteadystateNumRequestedOutputsEnum; 631 else stage=6; 632 } 633 if(stage==6){ 634 if (strcmp(name,"SteadystateNumRequestedOutputs")==0) return SteadystateNumRequestedOutputsEnum; 648 635 else if (strcmp(name,"SteadystateReltol")==0) return SteadystateReltolEnum; 649 636 else if (strcmp(name,"SteadystateRequestedOutputs")==0) return SteadystateRequestedOutputsEnum; … … 752 739 else if (strcmp(name,"BasalforcingsSpatialDeepwaterElevation")==0) return BasalforcingsSpatialDeepwaterElevationEnum; 753 740 else if (strcmp(name,"BasalforcingsSpatialDeepwaterMeltingRate")==0) return BasalforcingsSpatialDeepwaterMeltingRateEnum; 754 else stage=7; 755 } 756 if(stage==7){ 757 if (strcmp(name,"BasalforcingsSpatialUpperwaterElevation")==0) return BasalforcingsSpatialUpperwaterElevationEnum; 741 else if (strcmp(name,"BasalforcingsSpatialUpperwaterElevation")==0) return BasalforcingsSpatialUpperwaterElevationEnum; 758 742 else if (strcmp(name,"BasalforcingsSpatialUpperwaterMeltingRate")==0) return BasalforcingsSpatialUpperwaterMeltingRateEnum; 759 743 else if (strcmp(name,"BasalforcingsIsmip6BasinId")==0) return BasalforcingsIsmip6BasinIdEnum; … … 768 752 else if (strcmp(name,"BasalforcingsPicoOverturningCoeff")==0) return BasalforcingsPicoOverturningCoeffEnum; 769 753 else if (strcmp(name,"BasalforcingsPicoSubShelfOceanOverturning")==0) return BasalforcingsPicoSubShelfOceanOverturningEnum; 770 else if (strcmp(name,"BasalforcingsPicoSubShelfOceanSalinity")==0) return BasalforcingsPicoSubShelfOceanSalinityEnum; 754 else stage=7; 755 } 756 if(stage==7){ 757 if (strcmp(name,"BasalforcingsPicoSubShelfOceanSalinity")==0) return BasalforcingsPicoSubShelfOceanSalinityEnum; 771 758 else if (strcmp(name,"BasalforcingsPicoSubShelfOceanTemp")==0) return BasalforcingsPicoSubShelfOceanTempEnum; 772 759 else if (strcmp(name,"BasalStressx")==0) return BasalStressxEnum; … … 812 799 else if (strcmp(name,"DamageF")==0) return DamageFEnum; 813 800 else if (strcmp(name,"DebrisThickness")==0) return DebrisThicknessEnum; 814 else if (strcmp(name,"DebrisThicknessOld")==0) return DebrisThicknessOldEnum;815 801 else if (strcmp(name,"DegreeOfChannelization")==0) return DegreeOfChannelizationEnum; 816 802 else if (strcmp(name,"DepthBelowSurface")==0) return DepthBelowSurfaceEnum; … … 875 861 else if (strcmp(name,"FrictionPressureAdjustedTemperature")==0) return FrictionPressureAdjustedTemperatureEnum; 876 862 else if (strcmp(name,"FrictionQ")==0) return FrictionQEnum; 877 else stage=8; 878 } 879 if(stage==8){ 880 if (strcmp(name,"FrictionSedimentCompressibilityCoefficient")==0) return FrictionSedimentCompressibilityCoefficientEnum; 863 else if (strcmp(name,"FrictionSedimentCompressibilityCoefficient")==0) return FrictionSedimentCompressibilityCoefficientEnum; 881 864 else if (strcmp(name,"FrictionTillFrictionAngle")==0) return FrictionTillFrictionAngleEnum; 882 865 else if (strcmp(name,"FrictionWaterLayer")==0) return FrictionWaterLayerEnum; … … 892 875 else if (strcmp(name,"UGia")==0) return UGiaEnum; 893 876 else if (strcmp(name,"UGiaRate")==0) return UGiaRateEnum; 894 else if (strcmp(name,"Gradient")==0) return GradientEnum; 877 else stage=8; 878 } 879 if(stage==8){ 880 if (strcmp(name,"Gradient")==0) return GradientEnum; 895 881 else if (strcmp(name,"GroundinglineHeight")==0) return GroundinglineHeightEnum; 896 882 else if (strcmp(name,"HydraulicPotential")==0) return HydraulicPotentialEnum; … … 998 984 else if (strcmp(name,"SamplingTau")==0) return SamplingTauEnum; 999 985 else if (strcmp(name,"Sealevel")==0) return SealevelEnum; 1000 else stage=9; 1001 } 1002 if(stage==9){ 1003 if (strcmp(name,"SealevelGRD")==0) return SealevelGRDEnum; 986 else if (strcmp(name,"SealevelGRD")==0) return SealevelGRDEnum; 1004 987 else if (strcmp(name,"SatGraviGRD")==0) return SatGraviGRDEnum; 1005 988 else if (strcmp(name,"SealevelBarystaticMask")==0) return SealevelBarystaticMaskEnum; … … 1015 998 else if (strcmp(name,"SealevelBarystaticHydroLatbar")==0) return SealevelBarystaticHydroLatbarEnum; 1016 999 else if (strcmp(name,"SealevelBarystaticHydroLongbar")==0) return SealevelBarystaticHydroLongbarEnum; 1017 else if (strcmp(name,"SealevelBarystaticHydroLoad")==0) return SealevelBarystaticHydroLoadEnum; 1000 else stage=9; 1001 } 1002 if(stage==9){ 1003 if (strcmp(name,"SealevelBarystaticHydroLoad")==0) return SealevelBarystaticHydroLoadEnum; 1018 1004 else if (strcmp(name,"SealevelBarystaticBpMask")==0) return SealevelBarystaticBpMaskEnum; 1019 1005 else if (strcmp(name,"SealevelBarystaticBpWeights")==0) return SealevelBarystaticBpWeightsEnum; … … 1121 1107 else if (strcmp(name,"SmbECDt")==0) return SmbECDtEnum; 1122 1108 else if (strcmp(name,"SmbECini")==0) return SmbECiniEnum; 1123 else stage=10; 1124 } 1125 if(stage==10){ 1126 if (strcmp(name,"SmbEla")==0) return SmbElaEnum; 1109 else if (strcmp(name,"SmbEla")==0) return SmbElaEnum; 1127 1110 else if (strcmp(name,"SmbEvaporation")==0) return SmbEvaporationEnum; 1128 1111 else if (strcmp(name,"SmbFAC")==0) return SmbFACEnum; … … 1138 1121 else if (strcmp(name,"SmbIsInitialized")==0) return SmbIsInitializedEnum; 1139 1122 else if (strcmp(name,"SmbMAdd")==0) return SmbMAddEnum; 1140 else if (strcmp(name,"SmbMassBalance")==0) return SmbMassBalanceEnum; 1123 else stage=10; 1124 } 1125 if(stage==10){ 1126 if (strcmp(name,"SmbMassBalance")==0) return SmbMassBalanceEnum; 1141 1127 else if (strcmp(name,"SmbMassBalanceSnow")==0) return SmbMassBalanceSnowEnum; 1142 1128 else if (strcmp(name,"SmbMassBalanceIce")==0) return SmbMassBalanceIceEnum; … … 1150 1136 else if (strcmp(name,"SmbMelt")==0) return SmbMeltEnum; 1151 1137 else if (strcmp(name,"SmbMonthlytemperatures")==0) return SmbMonthlytemperaturesEnum; 1152 else if (strcmp(name,"SmbMonthlydsradiation")==0) return SmbMonthlydsradiationEnum;1153 else if (strcmp(name,"SmbMonthlydlradiation")==0) return SmbMonthlydlradiationEnum;1154 else if (strcmp(name,"SmbMonthlywindspeed")==0) return SmbMonthlywindspeedEnum;1155 else if (strcmp(name,"SmbMonthlyairhumidity")==0) return SmbMonthlyairhumidityEnum;1156 1138 else if (strcmp(name,"SmbMSurf")==0) return SmbMSurfEnum; 1157 1139 else if (strcmp(name,"SmbNetLW")==0) return SmbNetLWEnum; … … 1163 1145 else if (strcmp(name,"SmbPrecipitation")==0) return SmbPrecipitationEnum; 1164 1146 else if (strcmp(name,"SmbPrecipitationsAnomaly")==0) return SmbPrecipitationsAnomalyEnum; 1165 else if (strcmp(name,"SmbDsradiationAnomaly")==0) return SmbDsradiationAnomalyEnum;1166 else if (strcmp(name,"SmbDlradiationAnomaly")==0) return SmbDlradiationAnomalyEnum;1167 else if (strcmp(name,"SmbWindspeedAnomaly")==0) return SmbWindspeedAnomalyEnum;1168 else if (strcmp(name,"SmbAirhumidityAnomaly")==0) return SmbAirhumidityAnomalyEnum;1169 1147 else if (strcmp(name,"SmbPrecipitationsLgm")==0) return SmbPrecipitationsLgmEnum; 1170 1148 else if (strcmp(name,"SmbPrecipitationsPresentday")==0) return SmbPrecipitationsPresentdayEnum; … … 1186 1164 else if (strcmp(name,"SmbSmbref")==0) return SmbSmbrefEnum; 1187 1165 else if (strcmp(name,"SmbSzaValue")==0) return SmbSzaValueEnum; 1188 else if (strcmp(name,"SmbSummerMelt")==0) return SmbSummerMeltEnum;1189 else if (strcmp(name,"SmbSummerAlbedo")==0) return SmbSummerAlbedoEnum;1190 else if (strcmp(name,"SmbSnowheight")==0) return SmbSnowheightEnum;1191 1166 else if (strcmp(name,"SmbT")==0) return SmbTEnum; 1192 1167 else if (strcmp(name,"SmbTa")==0) return SmbTaEnum; … … 1244 1219 else if (strcmp(name,"SurfaceCrevasse")==0) return SurfaceCrevasseEnum; 1245 1220 else if (strcmp(name,"Surface")==0) return SurfaceEnum; 1246 else stage=11; 1247 } 1248 if(stage==11){ 1249 if (strcmp(name,"SurfaceOld")==0) return SurfaceOldEnum; 1221 else if (strcmp(name,"SurfaceOld")==0) return SurfaceOldEnum; 1250 1222 else if (strcmp(name,"SurfaceLogVelMisfit")==0) return SurfaceLogVelMisfitEnum; 1251 1223 else if (strcmp(name,"SurfaceLogVxVyMisfit")==0) return SurfaceLogVxVyMisfitEnum; … … 1272 1244 else if (strcmp(name,"ThicknessResidual")==0) return ThicknessResidualEnum; 1273 1245 else if (strcmp(name,"TransientAccumulatedDeltaIceThickness")==0) return TransientAccumulatedDeltaIceThicknessEnum; 1274 else if (strcmp(name,"Vel")==0) return VelEnum; 1246 else stage=11; 1247 } 1248 if(stage==11){ 1249 if (strcmp(name,"Vel")==0) return VelEnum; 1275 1250 else if (strcmp(name,"VxAverage")==0) return VxAverageEnum; 1276 1251 else if (strcmp(name,"VxBase")==0) return VxBaseEnum; … … 1367 1342 else if (strcmp(name,"Outputdefinition5")==0) return Outputdefinition5Enum; 1368 1343 else if (strcmp(name,"Outputdefinition60")==0) return Outputdefinition60Enum; 1369 else stage=12; 1370 } 1371 if(stage==12){ 1372 if (strcmp(name,"Outputdefinition61")==0) return Outputdefinition61Enum; 1344 else if (strcmp(name,"Outputdefinition61")==0) return Outputdefinition61Enum; 1373 1345 else if (strcmp(name,"Outputdefinition62")==0) return Outputdefinition62Enum; 1374 1346 else if (strcmp(name,"Outputdefinition63")==0) return Outputdefinition63Enum; … … 1395 1367 else if (strcmp(name,"Outputdefinition82")==0) return Outputdefinition82Enum; 1396 1368 else if (strcmp(name,"Outputdefinition83")==0) return Outputdefinition83Enum; 1397 else if (strcmp(name,"Outputdefinition84")==0) return Outputdefinition84Enum; 1369 else stage=12; 1370 } 1371 if(stage==12){ 1372 if (strcmp(name,"Outputdefinition84")==0) return Outputdefinition84Enum; 1398 1373 else if (strcmp(name,"Outputdefinition85")==0) return Outputdefinition85Enum; 1399 1374 else if (strcmp(name,"Outputdefinition86")==0) return Outputdefinition86Enum; … … 1490 1465 else if (strcmp(name,"DefaultAnalysis")==0) return DefaultAnalysisEnum; 1491 1466 else if (strcmp(name,"DefaultCalving")==0) return DefaultCalvingEnum; 1492 else stage=13; 1493 } 1494 if(stage==13){ 1495 if (strcmp(name,"Dense")==0) return DenseEnum; 1467 else if (strcmp(name,"Dense")==0) return DenseEnum; 1496 1468 else if (strcmp(name,"DependentObject")==0) return DependentObjectEnum; 1497 1469 else if (strcmp(name,"DepthAverageAnalysis")==0) return DepthAverageAnalysisEnum; … … 1518 1490 else if (strcmp(name,"ExtrapolationAnalysis")==0) return ExtrapolationAnalysisEnum; 1519 1491 else if (strcmp(name,"ExtrudeFromBaseAnalysis")==0) return ExtrudeFromBaseAnalysisEnum; 1520 else if (strcmp(name,"ExtrudeFromTopAnalysis")==0) return ExtrudeFromTopAnalysisEnum; 1492 else stage=13; 1493 } 1494 if(stage==13){ 1495 if (strcmp(name,"ExtrudeFromTopAnalysis")==0) return ExtrudeFromTopAnalysisEnum; 1521 1496 else if (strcmp(name,"FSApproximation")==0) return FSApproximationEnum; 1522 1497 else if (strcmp(name,"FSSolver")==0) return FSSolverEnum; … … 1613 1588 else if (strcmp(name,"LoveKernelsImag")==0) return LoveKernelsImagEnum; 1614 1589 else if (strcmp(name,"LoveKernelsReal")==0) return LoveKernelsRealEnum; 1615 else stage=14; 1616 } 1617 if(stage==14){ 1618 if (strcmp(name,"LoveKf")==0) return LoveKfEnum; 1590 else if (strcmp(name,"LoveKf")==0) return LoveKfEnum; 1619 1591 else if (strcmp(name,"LoveKt")==0) return LoveKtEnum; 1620 1592 else if (strcmp(name,"LoveLf")==0) return LoveLfEnum; … … 1641 1613 else if (strcmp(name,"Materials")==0) return MaterialsEnum; 1642 1614 else if (strcmp(name,"Matestar")==0) return MatestarEnum; 1643 else if (strcmp(name,"Matice")==0) return MaticeEnum; 1615 else stage=14; 1616 } 1617 if(stage==14){ 1618 if (strcmp(name,"Matice")==0) return MaticeEnum; 1644 1619 else if (strcmp(name,"Matlitho")==0) return MatlithoEnum; 1645 1620 else if (strcmp(name,"Mathydro")==0) return MathydroEnum; … … 1720 1695 else if (strcmp(name,"SMBarma")==0) return SMBarmaEnum; 1721 1696 else if (strcmp(name,"SMBcomponents")==0) return SMBcomponentsEnum; 1722 else if (strcmp(name,"SMBdebris Evatt")==0) return SMBdebrisEvattEnum;1697 else if (strcmp(name,"SMBdebrisML")==0) return SMBdebrisMLEnum; 1723 1698 else if (strcmp(name,"SMBd18opdd")==0) return SMBd18opddEnum; 1724 1699 else if (strcmp(name,"SMBforcing")==0) return SMBforcingEnum; … … 1736 1711 else if (strcmp(name,"SSAFSApproximation")==0) return SSAFSApproximationEnum; 1737 1712 else if (strcmp(name,"SSAHOApproximation")==0) return SSAHOApproximationEnum; 1738 else stage=15; 1739 } 1740 if(stage==15){ 1741 if (strcmp(name,"Scaled")==0) return ScaledEnum; 1713 else if (strcmp(name,"Scaled")==0) return ScaledEnum; 1742 1714 else if (strcmp(name,"SealevelAbsolute")==0) return SealevelAbsoluteEnum; 1743 1715 else if (strcmp(name,"SealevelEmotion")==0) return SealevelEmotionEnum; … … 1764 1736 else if (strcmp(name,"SpcTransient")==0) return SpcTransientEnum; 1765 1737 else if (strcmp(name,"Sset")==0) return SsetEnum; 1766 else if (strcmp(name,"StatisticsSolution")==0) return StatisticsSolutionEnum; 1738 else stage=15; 1739 } 1740 if(stage==15){ 1741 if (strcmp(name,"StatisticsSolution")==0) return StatisticsSolutionEnum; 1767 1742 else if (strcmp(name,"SteadystateSolution")==0) return SteadystateSolutionEnum; 1768 1743 else if (strcmp(name,"StressIntensityFactor")==0) return StressIntensityFactorEnum; -
issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.cpp
r27847 r27852 262 262 case 12: return SMBsemicEnum; 263 263 case 13: return SMBarmaEnum; 264 case 14: return SMBdebris EvattEnum;264 case 14: return SMBdebrisMLEnum; 265 265 default: _error_("Marshalled SMB code \""<<enum_in<<"\" not supported yet"); 266 266 } -
issm/trunk-jpl/src/m/classes/debris.m
r27847 r27852 12 12 removalmodel = 0; 13 13 displacementmodel = 0; 14 max_displacementvelocity = 0;15 14 removal_slope_threshold = 0; 16 15 removal_stress_threshold = 0; … … 67 66 function list = defaultoutputs(self,md) % {{{ 68 67 69 list = {'DebrisThickness' ,'DebrisMaskNodeActivation','VxDebris','VyDebris'};68 list = {'DebrisThickness'}; 70 69 71 70 end % }}} … … 93 92 self.removal_stress_threshold=0; 94 93 95 %Max velocity for displacementmodel (1)96 self.max_displacementvelocity=0;97 98 94 %default output 99 95 self.requested_outputs={'default'}; … … 105 101 106 102 md = checkfield(md,'fieldname','debris.spcthickness'); 107 md = checkfield(md,'fieldname','debris.stabilization','values',[0 1 2 3 4 5]);103 md = checkfield(md,'fieldname','debris.stabilization','values',[0 1 2 3]); 108 104 md = checkfield(md,'fieldname','debris.min_thickness','>=',0); 109 105 md = checkfield(md,'fieldname','debris.packingfraction','>=',0); … … 112 108 md = checkfield(md,'fieldname','debris.removal_slope_threshold','>=',0); 113 109 md = checkfield(md,'fieldname','debris.removal_stress_threshold','>=',0); 114 md = checkfield(md,'fieldname','debris.max_displacementvelocity','>=',0);115 110 md = checkfield(md,'fieldname','debris.requested_outputs','stringrow',1); 116 111 if ~any(isnan(md.stressbalance.vertex_pairing)), … … 125 120 fielddisplay(self,'stabilization','0: no stabilization, 1: artificial diffusion, 2: streamline upwinding, 3: streamline upwind Petrov-Galerkin (SUPG)'); 126 121 fielddisplay(self,'removalmodel','frontal removal of debris. 0: no removal, 1: Slope-triggered debris removal, 2: driving-stress triggered debris removal'); 127 fielddisplay(self,'max_displacementvelocity','maximum velocity of debris transport (v_ice + v_displacement) (m/a)'); 128 fielddisplay(self,'displacementmodel','debris displacement. 0: no displacement, 1: additional debris velocity above the critical slope/stress threshold'); 122 fielddisplay(self,'displacementmodel','debris displacement. 0: no displacement, 1: ...'); 129 123 fielddisplay(self,'removal_slope_threshold','critical slope (degrees) for removalmodel (1)'); 130 124 fielddisplay(self,'removal_stress_threshold','critical stress (Pa) for removalmodel (2)'); … … 141 135 WriteData(fid,prefix,'object',self,'fieldname','removalmodel','format','Integer'); 142 136 WriteData(fid,prefix,'object',self,'fieldname','displacementmodel','format','Integer'); 143 WriteData(fid,prefix,'object',self,'fieldname','max_displacementvelocity','format','Double');144 137 WriteData(fid,prefix,'object',self,'fieldname','removal_slope_threshold','format','Double'); 145 138 WriteData(fid,prefix,'object',self,'fieldname','removal_stress_threshold','format','Double'); … … 163 156 writejsdouble(fid,[modelname '.debris.removalmodel'],self.removalmodel); 164 157 writejsdouble(fid,[modelname '.debris.displacementmodel'],self.displacementmodel); 165 writejsdouble(fid,[modelname '.debris.max_displacementvelocity'],self.displacementmodel);166 158 writejsdouble(fid,[modelname '.debris.removal_slope_threshold'],self.removal_slope_threshold); 167 159 writejsdouble(fid,[modelname '.debris.removal_stress_threshold'],self.removal_stress_threshold); -
issm/trunk-jpl/src/m/classes/model.m
r27847 r27852 1289 1289 if isfield(structmd,'cfl_coefficient'), md.timestepping.cfl_coefficient=structmd.cfl_coefficient; end 1290 1290 if isfield(structmd,'spcthickness'), md.masstransport.spcthickness=structmd.spcthickness; end 1291 if isfield(structmd,'spcthickness'), md.debris.spcthickness=structmd.spcthickness; end1292 1291 if isfield(structmd,'artificial_diffusivity'), md.masstransport.stabilization=structmd.artificial_diffusivity; end 1293 1292 if isfield(structmd,'hydrostatic_adjustment'), md.masstransport.hydrostatic_adjustment=structmd.hydrostatic_adjustment; end -
issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m
r27847 r27852 240 240 field = field*yts; 241 241 elseif strcmp(fieldname,'VyAverage'), 242 field = field*yts;243 elseif strcmp(fieldname,'VxDebris'),244 field = field*yts;245 elseif strcmp(fieldname,'VyDebris'),246 242 field = field*yts; 247 243 elseif strcmp(fieldname,'BasalforcingsGroundediceMeltingRate'),
Note:
See TracChangeset
for help on using the changeset viewer.