Changeset 24921
- Timestamp:
- 05/29/20 16:03:44 (5 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/SealevelriseAnalysis.cpp
r24889 r24921 282 282 int dslmodel=0; 283 283 284 bool elastic=false; 284 IssmDouble* G_rigid = NULL; 285 IssmDouble* G_rigid_local = NULL; 285 286 IssmDouble* G_elastic = NULL; 286 287 IssmDouble* G_elastic_local = NULL; … … 338 339 } /*}}}*/ 339 340 /*Deal with elasticity {{{*/ 340 iomodel->FetchData(&elastic,"md.slr.elastic"); 341 if(elastic){ 342 343 /*love numbers: */ 344 iomodel->FetchData(&love_h,&nl,NULL,"md.slr.love_h"); 345 iomodel->FetchData(&love_k,&nl,NULL,"md.slr.love_k"); 346 iomodel->FetchData(&love_l,&nl,NULL,"md.slr.love_l"); 347 348 /*compute elastic green function for a range of angles*/ 349 iomodel->FetchData(°acc,"md.slr.degacc"); 350 M=reCast<int,IssmDouble>(180./degacc+1.); 351 352 // AD performance is sensitive to calls to ensurecontiguous. 353 // // Providing "t" will cause ensurecontiguous to be called. 354 #ifdef _HAVE_AD_ 355 G_elastic=xNew<IssmDouble>(M,"t"); 356 U_elastic=xNew<IssmDouble>(M,"t"); 357 H_elastic=xNew<IssmDouble>(M,"t"); 358 #else 359 G_elastic=xNew<IssmDouble>(M); 360 U_elastic=xNew<IssmDouble>(M); 361 H_elastic=xNew<IssmDouble>(M); 362 #endif 363 364 /*compute combined legendre + love number (elastic green function:*/ 365 m=DetermineLocalSize(M,IssmComm::GetComm()); 366 GetOwnershipBoundariesFromRange(&lower_row,&upper_row,m,IssmComm::GetComm()); 367 // AD performance is sensitive to calls to ensurecontiguous. 368 // // Providing "t" will cause ensurecontiguous to be called. 369 #ifdef _HAVE_AD_ 370 G_elastic_local=xNew<IssmDouble>(m,"t"); 371 U_elastic_local=xNew<IssmDouble>(m,"t"); 372 H_elastic_local=xNew<IssmDouble>(m,"t"); 373 #else 374 G_elastic_local=xNew<IssmDouble>(m); 375 U_elastic_local=xNew<IssmDouble>(m); 376 H_elastic_local=xNew<IssmDouble>(m); 377 #endif 378 379 for(int i=lower_row;i<upper_row;i++){ 380 IssmDouble alpha,x; 381 alpha= reCast<IssmDouble>(i)*degacc * PI / 180.0; 382 383 G_elastic_local[i-lower_row]= (love_k[nl-1]-love_h[nl-1])/2.0/sin(alpha/2.0); 384 U_elastic_local[i-lower_row]= (love_h[nl-1])/2.0/sin(alpha/2.0); 385 H_elastic_local[i-lower_row]= 0; 386 IssmDouble Pn = 0.; 387 IssmDouble Pn1 = 0.; 388 IssmDouble Pn2 = 0.; 389 IssmDouble Pn_p = 0.; 390 IssmDouble Pn_p1 = 0.; 391 IssmDouble Pn_p2 = 0.; 392 393 for (int n=0;n<nl;n++) { 394 IssmDouble deltalove_G; 395 IssmDouble deltalove_U; 396 397 deltalove_G = (love_k[n]-love_k[nl-1]-love_h[n]+love_h[nl-1]); 398 deltalove_U = (love_h[n]-love_h[nl-1]); 399 400 /*compute legendre polynomials: P_n(cos\theta) & d P_n(cos\theta)/ d\theta: */ 401 if(n==0){ 402 Pn=1; 403 Pn_p=0; 404 } 405 else if(n==1){ 406 Pn = cos(alpha); 407 Pn_p = 1; 408 } 409 else{ 410 Pn = ( (2*n-1)*cos(alpha)*Pn1 - (n-1)*Pn2 ) /n; 411 Pn_p = ( (2*n-1)*(Pn1+cos(alpha)*Pn_p1) - (n-1)*Pn_p2 ) /n; 412 } 413 Pn2=Pn1; Pn1=Pn; 414 Pn_p2=Pn_p1; Pn_p1=Pn_p; 415 416 G_elastic_local[i-lower_row] += deltalove_G*Pn; // gravitational potential 417 U_elastic_local[i-lower_row] += deltalove_U*Pn; // vertical (up) displacement 418 H_elastic_local[i-lower_row] += sin(alpha)*love_l[n]*Pn_p; // horizontal displacements 419 } 420 } 421 422 /*merge G_elastic_local into G_elastic; U_elastic_local into U_elastic; H_elastic_local to H_elastic:{{{*/ 423 int* recvcounts=xNew<int>(IssmComm::GetSize()); 424 int* displs=xNew<int>(IssmComm::GetSize()); 425 426 //recvcounts: 427 ISSM_MPI_Allgather(&m,1,ISSM_MPI_INT,recvcounts,1,ISSM_MPI_INT,IssmComm::GetComm()); 428 429 /*displs: */ 430 ISSM_MPI_Allgather(&lower_row,1,ISSM_MPI_INT,displs,1,ISSM_MPI_INT,IssmComm::GetComm()); 431 432 /*All gather:*/ 433 ISSM_MPI_Allgatherv(G_elastic_local, m, ISSM_MPI_DOUBLE, G_elastic, recvcounts, displs, ISSM_MPI_DOUBLE,IssmComm::GetComm()); 434 ISSM_MPI_Allgatherv(U_elastic_local, m, ISSM_MPI_DOUBLE, U_elastic, recvcounts, displs, ISSM_MPI_DOUBLE,IssmComm::GetComm()); 435 ISSM_MPI_Allgatherv(H_elastic_local, m, ISSM_MPI_DOUBLE, H_elastic, recvcounts, displs, ISSM_MPI_DOUBLE,IssmComm::GetComm()); 436 /*free ressources: */ 437 xDelete<int>(recvcounts); 438 xDelete<int>(displs); 439 440 /*}}}*/ 441 442 /*Avoid singularity at 0: */ 443 G_elastic[0]=G_elastic[1]; 444 parameters->AddObject(new DoubleVecParam(SealevelriseGElasticEnum,G_elastic,M)); 445 U_elastic[0]=U_elastic[1]; 446 parameters->AddObject(new DoubleVecParam(SealevelriseUElasticEnum,U_elastic,M)); 447 H_elastic[0]=H_elastic[1]; 448 parameters->AddObject(new DoubleVecParam(SealevelriseHElasticEnum,H_elastic,M)); 449 450 /*free ressources: */ 451 xDelete<IssmDouble>(love_h); 452 xDelete<IssmDouble>(love_k); 453 xDelete<IssmDouble>(love_l); 454 xDelete<IssmDouble>(G_elastic); 455 xDelete<IssmDouble>(G_elastic_local); 456 xDelete<IssmDouble>(U_elastic); 457 xDelete<IssmDouble>(U_elastic_local); 458 xDelete<IssmDouble>(H_elastic); 459 xDelete<IssmDouble>(H_elastic_local); 460 } /*}}}*/ 341 /*love numbers: */ 342 iomodel->FetchData(&love_h,&nl,NULL,"md.slr.love_h"); 343 iomodel->FetchData(&love_k,&nl,NULL,"md.slr.love_k"); 344 iomodel->FetchData(&love_l,&nl,NULL,"md.slr.love_l"); 345 346 /*compute elastic green function for a range of angles*/ 347 iomodel->FetchData(°acc,"md.slr.degacc"); 348 M=reCast<int,IssmDouble>(180./degacc+1.); 349 350 // AD performance is sensitive to calls to ensurecontiguous. 351 // // Providing "t" will cause ensurecontiguous to be called. 352 #ifdef _HAVE_AD_ 353 G_rigid=xNew<IssmDouble>(M,"t"); 354 G_elastic=xNew<IssmDouble>(M,"t"); 355 U_elastic=xNew<IssmDouble>(M,"t"); 356 H_elastic=xNew<IssmDouble>(M,"t"); 357 #else 358 G_rigid=xNew<IssmDouble>(M); 359 G_elastic=xNew<IssmDouble>(M); 360 U_elastic=xNew<IssmDouble>(M); 361 H_elastic=xNew<IssmDouble>(M); 362 #endif 363 364 /*compute combined legendre + love number (elastic green function:*/ 365 m=DetermineLocalSize(M,IssmComm::GetComm()); 366 GetOwnershipBoundariesFromRange(&lower_row,&upper_row,m,IssmComm::GetComm()); 367 // AD performance is sensitive to calls to ensurecontiguous. 368 // // Providing "t" will cause ensurecontiguous to be called. 369 #ifdef _HAVE_AD_ 370 G_elastic_local=xNew<IssmDouble>(m,"t"); 371 G_rigid_local=xNew<IssmDouble>(m,"t"); 372 U_elastic_local=xNew<IssmDouble>(m,"t"); 373 H_elastic_local=xNew<IssmDouble>(m,"t"); 374 #else 375 G_elastic_local=xNew<IssmDouble>(m); 376 G_rigid_local=xNew<IssmDouble>(m); 377 U_elastic_local=xNew<IssmDouble>(m); 378 H_elastic_local=xNew<IssmDouble>(m); 379 #endif 380 381 for(int i=lower_row;i<upper_row;i++){ 382 IssmDouble alpha,x; 383 alpha= reCast<IssmDouble>(i)*degacc * PI / 180.0; 384 385 G_rigid_local[i-lower_row]= .5/sin(alpha/2.0); 386 G_elastic_local[i-lower_row]= (love_k[nl-1]-love_h[nl-1])*G_rigid_local[i-lower_row]; 387 U_elastic_local[i-lower_row]= (love_h[nl-1])*G_rigid_local[i-lower_row]; 388 H_elastic_local[i-lower_row]= 0; 389 IssmDouble Pn = 0.; 390 IssmDouble Pn1 = 0.; 391 IssmDouble Pn2 = 0.; 392 IssmDouble Pn_p = 0.; 393 IssmDouble Pn_p1 = 0.; 394 IssmDouble Pn_p2 = 0.; 395 396 for (int n=0;n<nl;n++) { 397 IssmDouble deltalove_G; 398 IssmDouble deltalove_U; 399 400 deltalove_G = (love_k[n]-love_k[nl-1]-love_h[n]+love_h[nl-1]); 401 deltalove_U = (love_h[n]-love_h[nl-1]); 402 403 /*compute legendre polynomials: P_n(cos\theta) & d P_n(cos\theta)/ d\theta: */ 404 if(n==0){ 405 Pn=1; 406 Pn_p=0; 407 } 408 else if(n==1){ 409 Pn = cos(alpha); 410 Pn_p = 1; 411 } 412 else{ 413 Pn = ( (2*n-1)*cos(alpha)*Pn1 - (n-1)*Pn2 ) /n; 414 Pn_p = ( (2*n-1)*(Pn1+cos(alpha)*Pn_p1) - (n-1)*Pn_p2 ) /n; 415 } 416 Pn2=Pn1; Pn1=Pn; 417 Pn_p2=Pn_p1; Pn_p1=Pn_p; 418 419 G_elastic_local[i-lower_row] += deltalove_G*Pn; // gravitational potential 420 U_elastic_local[i-lower_row] += deltalove_U*Pn; // vertical (up) displacement 421 H_elastic_local[i-lower_row] += sin(alpha)*love_l[n]*Pn_p; // horizontal displacements 422 } 423 } 424 425 /*merge G_elastic_local into G_elastic; U_elastic_local into U_elastic; H_elastic_local to H_elastic:{{{*/ 426 int* recvcounts=xNew<int>(IssmComm::GetSize()); 427 int* displs=xNew<int>(IssmComm::GetSize()); 428 429 //recvcounts: 430 ISSM_MPI_Allgather(&m,1,ISSM_MPI_INT,recvcounts,1,ISSM_MPI_INT,IssmComm::GetComm()); 431 432 /*displs: */ 433 ISSM_MPI_Allgather(&lower_row,1,ISSM_MPI_INT,displs,1,ISSM_MPI_INT,IssmComm::GetComm()); 434 435 /*All gather:*/ 436 ISSM_MPI_Allgatherv(G_rigid_local, m, ISSM_MPI_DOUBLE, G_rigid, recvcounts, displs, ISSM_MPI_DOUBLE,IssmComm::GetComm()); 437 ISSM_MPI_Allgatherv(G_elastic_local, m, ISSM_MPI_DOUBLE, G_elastic, recvcounts, displs, ISSM_MPI_DOUBLE,IssmComm::GetComm()); 438 ISSM_MPI_Allgatherv(U_elastic_local, m, ISSM_MPI_DOUBLE, U_elastic, recvcounts, displs, ISSM_MPI_DOUBLE,IssmComm::GetComm()); 439 ISSM_MPI_Allgatherv(H_elastic_local, m, ISSM_MPI_DOUBLE, H_elastic, recvcounts, displs, ISSM_MPI_DOUBLE,IssmComm::GetComm()); 440 /*free ressources: */ 441 xDelete<int>(recvcounts); 442 xDelete<int>(displs); 443 444 /*}}}*/ 445 446 /*Avoid singularity at 0: */ 447 G_rigid[0]=G_rigid[1]; 448 parameters->AddObject(new DoubleVecParam(SealevelriseGRigidEnum,G_rigid,M)); 449 G_elastic[0]=G_elastic[1]; 450 parameters->AddObject(new DoubleVecParam(SealevelriseGElasticEnum,G_elastic,M)); 451 U_elastic[0]=U_elastic[1]; 452 parameters->AddObject(new DoubleVecParam(SealevelriseUElasticEnum,U_elastic,M)); 453 H_elastic[0]=H_elastic[1]; 454 parameters->AddObject(new DoubleVecParam(SealevelriseHElasticEnum,H_elastic,M)); 455 456 /*free ressources: */ 457 xDelete<IssmDouble>(love_h); 458 xDelete<IssmDouble>(love_k); 459 xDelete<IssmDouble>(love_l); 460 xDelete<IssmDouble>(G_rigid); 461 xDelete<IssmDouble>(G_rigid_local); 462 xDelete<IssmDouble>(G_elastic); 463 xDelete<IssmDouble>(G_elastic_local); 464 xDelete<IssmDouble>(U_elastic); 465 xDelete<IssmDouble>(U_elastic_local); 466 xDelete<IssmDouble>(H_elastic); 467 xDelete<IssmDouble>(H_elastic_local); 468 /*}}}*/ 461 469 /*Transitions:{{{ */ 462 470 iomodel->FetchData(&transitions,&transitions_M,&transitions_N,&ntransitions,"md.slr.transitions"); -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r24915 r24921 5598 5598 5599 5599 /*elastic green function:*/ 5600 int index; 5600 5601 IssmDouble* G_elastic_precomputed=NULL; 5602 IssmDouble* G_rigid_precomputed=NULL; 5601 5603 int M; 5602 5604 … … 5649 5651 5650 5652 /*recover elastic green function:*/ 5653 DoubleVecParam* parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelriseGRigidEnum)); _assert_(parameter); 5654 parameter->GetParameterValueByPointer(&G_rigid_precomputed,&M); 5655 5651 5656 if(computeelastic){ 5652 DoubleVecParam* parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelriseGElasticEnum)); 5653 _assert_(parameter); 5657 parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelriseGElasticEnum)); _assert_(parameter); 5654 5658 parameter->GetParameterValueByPointer(&G_elastic_precomputed,&M); 5655 5659 } … … 5748 5752 for(int i=0;i<gsize;i++){ 5749 5753 5750 IssmDouble G_rigid=0; //do not remove =0!5751 5754 IssmDouble G_elastic=0; //do not remove =0! 5752 5755 5753 /*Compute alpha angle between centroid and current vertex : */5756 /*Compute alpha angle between centroid and current vertex and index into precomputed tables: */ 5754 5757 lati=latitude[i]/180*PI; longi=longitude[i]/180*PI; 5755 5756 5758 delPhi=fabs(lati-late); delLambda=fabs(longi-longe); 5757 5759 alpha=2.*asin(sqrt(pow(sin(delPhi/2),2.0)+cos(lati)*cos(late)*pow(sin(delLambda/2),2))); 5758 5759 //Rigid earth gravitational perturbation: 5760 if(computerigid)G_rigid=1.0/2.0/sin(alpha/2.0); 5760 index=reCast<int,IssmDouble>(alpha/PI*reCast<IssmDouble,int>(M-1)); 5761 5761 5762 5762 //Elastic component (from Eq 17 in Adhikari et al, GMD 2015) 5763 if(computeelastic){ 5764 int index=reCast<int,IssmDouble>(alpha/PI*reCast<IssmDouble,int>(M-1)); 5765 G_elastic += G_elastic_precomputed[index]; 5766 } 5763 if(computeelastic) G_elastic += G_elastic_precomputed[index]; 5767 5764 5768 5765 /*Add all components to the Sgi or Sgo solution vectors:*/ 5769 Sgi[i]+=3*rho_ice/rho_earth*area/eartharea*I*(G_rigid+G_elastic); 5770 5766 Sgi[i]+=3*rho_ice/rho_earth*area/eartharea*I*(G_rigid_precomputed[index]+G_elastic); 5771 5767 } 5772 5768 } … … 5940 5936 5941 5937 /*precomputed elastic green functions:*/ 5938 IssmDouble* G_rigid_precomputed = NULL; 5942 5939 IssmDouble* G_elastic_precomputed = NULL; 5943 5940 int M; 5944 5945 /*computation of Green functions:*/ 5946 IssmDouble* G_elastic= NULL; 5947 IssmDouble* G_rigid= NULL; 5941 int index; 5942 IssmDouble alpha; 5943 IssmDouble delPhi,delLambda; 5948 5944 5949 5945 /*optimization:*/ … … 6020 6016 /*}}}*/ 6021 6017 6018 /*recover rigid and elastic green functions:*/ 6019 DoubleVecParam* parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelriseGRigidEnum)); _assert_(parameter); 6020 parameter->GetParameterValueByPointer(&G_rigid_precomputed,&M); 6021 6022 6022 if(computeelastic){ 6023 6024 6023 /*recover elastic green function:*/ 6025 DoubleVecParam*parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelriseGElasticEnum)); _assert_(parameter);6024 parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelriseGElasticEnum)); _assert_(parameter); 6026 6025 parameter->GetParameterValueByPointer(&G_elastic_precomputed,&M); 6027 6028 /*initialize G_elastic:*/ 6029 G_elastic=xNewZeroInit<IssmDouble>(gsize); 6030 } 6031 if(computerigid) G_rigid=xNewZeroInit<IssmDouble>(gsize); 6032 6033 IssmDouble alpha; 6034 IssmDouble delPhi,delLambda; 6035 6026 } 6027 6028 6036 6029 for(int i=0;i<gsize;i++){ 6037 6030 6038 6031 /*Compute alpha angle between centroid and current vertex : */ 6039 6032 lati=latitude[i]/180*PI; longi=longitude[i]/180*PI; 6040 6041 6033 delPhi=fabs(lati-late); delLambda=fabs(longi-longe); 6042 6034 alpha=2.*asin(sqrt(pow(sin(delPhi/2),2.0)+cos(lati)*cos(late)*pow(sin(delLambda/2),2))); 6035 index=reCast<int,IssmDouble>(alpha/PI*(M-1)); 6043 6036 6044 6037 /*Rigid earth gravitational perturbation: */ 6045 6038 if(computerigid){ 6046 G_rigid[i]=1.0/2.0/sin(alpha/2.0); 6047 //values[i]+=3*rho_water/rho_earth*area/eartharea*S*G_rigid[i]; 6048 Sgo[i]+=3*rho_water/rho_earth*area/eartharea*S*G_rigid[i]; 6039 Sgo[i]+=3*rho_water/rho_earth*area/eartharea*S*G_rigid_precomputed[index]; 6049 6040 } 6050 6041 6051 6042 /*Elastic component (from Eq 17 in Adhikari et al, GMD 2015): */ 6052 6043 if(computeelastic){ 6053 int index=reCast<int,IssmDouble>(alpha/PI*(M-1)); 6054 G_elastic[i] += G_elastic_precomputed[index]; 6055 //values[i]+=3*rho_water/rho_earth*area/eartharea*S*G_elastic[i]; 6056 Sgo[i]+=3*rho_water/rho_earth*area/eartharea*S*G_elastic[i]; 6057 } 6058 } 6059 6060 6061 /*Free ressources:*/ 6062 if(computeelastic) xDelete<IssmDouble>(G_elastic); 6063 if(computerigid) xDelete<IssmDouble>(G_rigid); 6044 Sgo[i]+=3*rho_water/rho_earth*area/eartharea*S*G_elastic_precomputed[index]; 6045 } 6046 } 6047 6064 6048 6065 6049 return; -
issm/trunk-jpl/src/c/shared/Enum/Enum.vim
r24889 r24921 308 308 syn keyword cConstant SealevelriseEquatorialMoiEnum 309 309 syn keyword cConstant SealevelriseFluidLoveEnum 310 syn keyword cConstant SealevelriseGRigidEnum 310 311 syn keyword cConstant SealevelriseGElasticEnum 311 312 syn keyword cConstant SealevelriseGeodeticEnum -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r24889 r24921 302 302 SealevelriseEquatorialMoiEnum, 303 303 SealevelriseFluidLoveEnum, 304 SealevelriseGRigidEnum, 304 305 SealevelriseGElasticEnum, 305 306 SealevelriseGeodeticEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r24889 r24921 310 310 case SealevelriseEquatorialMoiEnum : return "SealevelriseEquatorialMoi"; 311 311 case SealevelriseFluidLoveEnum : return "SealevelriseFluidLove"; 312 case SealevelriseGRigidEnum : return "SealevelriseGRigid"; 312 313 case SealevelriseGElasticEnum : return "SealevelriseGElastic"; 313 314 case SealevelriseGeodeticEnum : return "SealevelriseGeodetic"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r24889 r24921 316 316 else if (strcmp(name,"SealevelriseEquatorialMoi")==0) return SealevelriseEquatorialMoiEnum; 317 317 else if (strcmp(name,"SealevelriseFluidLove")==0) return SealevelriseFluidLoveEnum; 318 else if (strcmp(name,"SealevelriseGRigid")==0) return SealevelriseGRigidEnum; 318 319 else if (strcmp(name,"SealevelriseGElastic")==0) return SealevelriseGElasticEnum; 319 320 else if (strcmp(name,"SealevelriseGeodetic")==0) return SealevelriseGeodeticEnum; … … 382 383 else if (strcmp(name,"SmbPfac")==0) return SmbPfacEnum; 383 384 else if (strcmp(name,"SmbRdl")==0) return SmbRdlEnum; 384 else if (strcmp(name,"SmbRequestedOutputs")==0) return SmbRequestedOutputsEnum;385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"SmbRlaps")==0) return SmbRlapsEnum; 388 if (strcmp(name,"SmbRequestedOutputs")==0) return SmbRequestedOutputsEnum; 389 else if (strcmp(name,"SmbRlaps")==0) return SmbRlapsEnum; 389 390 else if (strcmp(name,"SmbRlapslgm")==0) return SmbRlapslgmEnum; 390 391 else if (strcmp(name,"SmbRunoffalti")==0) return SmbRunoffaltiEnum; … … 505 506 else if (strcmp(name,"CalvingCalvingrate")==0) return CalvingCalvingrateEnum; 506 507 else if (strcmp(name,"CalvingHabFraction")==0) return CalvingHabFractionEnum; 507 else if (strcmp(name,"CalvingMeltingrate")==0) return CalvingMeltingrateEnum;508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"CalvingStressThresholdFloatingice")==0) return CalvingStressThresholdFloatingiceEnum; 511 if (strcmp(name,"CalvingMeltingrate")==0) return CalvingMeltingrateEnum; 512 else if (strcmp(name,"CalvingStressThresholdFloatingice")==0) return CalvingStressThresholdFloatingiceEnum; 512 513 else if (strcmp(name,"CalvingStressThresholdGroundedice")==0) return CalvingStressThresholdGroundediceEnum; 513 514 else if (strcmp(name,"CalvinglevermannCoeff")==0) return CalvinglevermannCoeffEnum; … … 628 629 else if (strcmp(name,"IceMaskNodeActivation")==0) return IceMaskNodeActivationEnum; 629 630 else if (strcmp(name,"Input")==0) return InputEnum; 630 else if (strcmp(name,"InversionCostFunctionsCoefficients")==0) return InversionCostFunctionsCoefficientsEnum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"InversionSurfaceObs")==0) return InversionSurfaceObsEnum; 634 if (strcmp(name,"InversionCostFunctionsCoefficients")==0) return InversionCostFunctionsCoefficientsEnum; 635 else if (strcmp(name,"InversionSurfaceObs")==0) return InversionSurfaceObsEnum; 635 636 else if (strcmp(name,"InversionThicknessObs")==0) return InversionThicknessObsEnum; 636 637 else if (strcmp(name,"InversionVelObs")==0) return InversionVelObsEnum; … … 751 752 else if (strcmp(name,"SmbMassBalance")==0) return SmbMassBalanceEnum; 752 753 else if (strcmp(name,"SmbMassBalanceSubstep")==0) return SmbMassBalanceSubstepEnum; 753 else if (strcmp(name,"SmbMassBalanceTransient")==0) return SmbMassBalanceTransientEnum;754 754 else stage=7; 755 755 } 756 756 if(stage==7){ 757 if (strcmp(name,"SmbMeanLHF")==0) return SmbMeanLHFEnum; 757 if (strcmp(name,"SmbMassBalanceTransient")==0) return SmbMassBalanceTransientEnum; 758 else if (strcmp(name,"SmbMeanLHF")==0) return SmbMeanLHFEnum; 758 759 else if (strcmp(name,"SmbMeanSHF")==0) return SmbMeanSHFEnum; 759 760 else if (strcmp(name,"SmbMeanULW")==0) return SmbMeanULWEnum; … … 874 875 else if (strcmp(name,"Outputdefinition14")==0) return Outputdefinition14Enum; 875 876 else if (strcmp(name,"Outputdefinition15")==0) return Outputdefinition15Enum; 876 else if (strcmp(name,"Outputdefinition16")==0) return Outputdefinition16Enum;877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"Outputdefinition17")==0) return Outputdefinition17Enum; 880 if (strcmp(name,"Outputdefinition16")==0) return Outputdefinition16Enum; 881 else if (strcmp(name,"Outputdefinition17")==0) return Outputdefinition17Enum; 881 882 else if (strcmp(name,"Outputdefinition18")==0) return Outputdefinition18Enum; 882 883 else if (strcmp(name,"Outputdefinition19")==0) return Outputdefinition19Enum; … … 997 998 else if (strcmp(name,"BedSlopeSolution")==0) return BedSlopeSolutionEnum; 998 999 else if (strcmp(name,"BoolExternalResult")==0) return BoolExternalResultEnum; 999 else if (strcmp(name,"BoolInput")==0) return BoolInputEnum;1000 1000 else stage=9; 1001 1001 } 1002 1002 if(stage==9){ 1003 if (strcmp(name,"BoolInput2")==0) return BoolInput2Enum; 1003 if (strcmp(name,"BoolInput")==0) return BoolInputEnum; 1004 else if (strcmp(name,"BoolInput2")==0) return BoolInput2Enum; 1004 1005 else if (strcmp(name,"IntInput2")==0) return IntInput2Enum; 1005 1006 else if (strcmp(name,"BoolParam")==0) return BoolParamEnum; … … 1120 1121 else if (strcmp(name,"IceVolumeAboveFloatationScaled")==0) return IceVolumeAboveFloatationScaledEnum; 1121 1122 else if (strcmp(name,"IceVolume")==0) return IceVolumeEnum; 1122 else if (strcmp(name,"IceVolumeScaled")==0) return IceVolumeScaledEnum;1123 1123 else stage=10; 1124 1124 } 1125 1125 if(stage==10){ 1126 if (strcmp(name,"IcefrontMassFlux")==0) return IcefrontMassFluxEnum; 1126 if (strcmp(name,"IceVolumeScaled")==0) return IceVolumeScaledEnum; 1127 else if (strcmp(name,"IcefrontMassFlux")==0) return IcefrontMassFluxEnum; 1127 1128 else if (strcmp(name,"IcefrontMassFluxLevelset")==0) return IcefrontMassFluxLevelsetEnum; 1128 1129 else if (strcmp(name,"Incremental")==0) return IncrementalEnum; … … 1243 1244 else if (strcmp(name,"Profiler")==0) return ProfilerEnum; 1244 1245 else if (strcmp(name,"ProfilingCurrentFlops")==0) return ProfilingCurrentFlopsEnum; 1245 else if (strcmp(name,"ProfilingCurrentMem")==0) return ProfilingCurrentMemEnum;1246 1246 else stage=11; 1247 1247 } 1248 1248 if(stage==11){ 1249 if (strcmp(name,"ProfilingSolutionTime")==0) return ProfilingSolutionTimeEnum; 1249 if (strcmp(name,"ProfilingCurrentMem")==0) return ProfilingCurrentMemEnum; 1250 else if (strcmp(name,"ProfilingSolutionTime")==0) return ProfilingSolutionTimeEnum; 1250 1251 else if (strcmp(name,"Regionaloutput")==0) return RegionaloutputEnum; 1251 1252 else if (strcmp(name,"Regular")==0) return RegularEnum;
Note:
See TracChangeset
for help on using the changeset viewer.