Changeset 23782
- Timestamp:
- 03/08/19 13:34:43 (6 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp
r23723 r23782 178 178 case BasalforcingsPicoEnum: 179 179 iomodel->FetchDataToInput(elements,"md.basalforcings.basin_id",BasalforcingsPicoBasinIdEnum); 180 break; 181 case BasalforcingsIsmip6Enum:{ 182 //iomodel->FetchDataToInput(elements,"md.basalforcings.tf",BasalforcingsIsmp6TfEnum); 183 IssmDouble** array3d = NULL; 184 int* Ms = NULL; 185 int* Ns = NULL; 186 int K; 187 iomodel->FetchData(&array3d,&Ms,&Ns,&K,"md.basalforcings.tf"); 188 if(!array3d) _error_("md.basalforcings.tf not found in binary file"); 189 for(int i=0;i<elements->Size();i++){ 190 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 191 for(int kk=0;kk<K;kk++){ 192 element->DatasetInputAdd(BasalforcingsIsmp6TfEnum,array3d[kk],iomodel,Ms[kk],Ns[kk],1,BasalforcingsIsmp6TfEnum,7,BasalforcingsIsmp6TfEnum); 193 } 194 } 195 xDelete<int>(Ms); 196 xDelete<int>(Ns); 197 for(int i=0;i<K;i++) xDelete<IssmDouble>(array3d[i]); 198 xDelete<IssmDouble*>(array3d); 199 } 180 200 break; 181 201 default: -
issm/trunk-jpl/src/c/modules/FloatingiceMeltingRatex/FloatingiceMeltingRatex.cpp
r23066 r23782 37 37 FloatingiceMeltingRatePicox(femmodel); 38 38 break; 39 case BasalforcingsIsmip6Enum: 40 if(VerboseSolution())_printf0_(" call ISMIP 6 Floating melting rate module\n"); 41 FloatingiceMeltingRateIsmip6x(femmodel); 42 break; 39 43 default: 40 44 _error_("Basal forcing model "<<EnumToStringx(basalforcing_model)<<" not supported yet"); … … 67 71 } 68 72 /*}}}*/ 73 void FloatingiceMeltingRateIsmip6x(FemModel* femmodel){/*{{{*/ 74 75 for(int i=0;i<femmodel->elements->Size();i++){ 76 Element* element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i)); 77 Input* temp = element->GetInput(BasalforcingsIsmp6TfEnum); 78 _assert_(temp); 79 temp->Echo(); 80 _error_("not implemented yet"); 81 //element->MismipFloatingiceMeltingRate(); 82 } 83 } 84 /*}}}*/ -
issm/trunk-jpl/src/c/modules/FloatingiceMeltingRatex/FloatingiceMeltingRatex.h
r22953 r23782 14 14 void SpatialLinearFloatingiceMeltingRatex(FemModel* femmodel); 15 15 void MismipFloatingiceMeltingRatex(FemModel* femmodel); 16 void FloatingiceMeltingRateIsmip6x(FemModel* femmodel); 16 17 17 18 #endif /* _FloatingiceMeltingRatex_H*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r23758 r23782 224 224 parameters->AddObject(new TransientArrayParam(BasalforcingsPicoFarOceansalinityEnum,transparam,&transparam[N*(M-1)],interp,N,M)); 225 225 xDelete<IssmDouble>(transparam); 226 case BasalforcingsIsmip6Enum: 227 iomodel->FindConstant(&interp,"md.timestepping.interp_forcings"); 228 printf("-------------- file: CreateParameters.cpp line: %i\n",__LINE__); 229 printf("== WARNING: needs to be implemented\n"); 226 230 break; 227 231 default: -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r23758 r23782 436 436 BasalforcingsGeothermalfluxEnum, 437 437 BasalforcingsGroundediceMeltingRateEnum, 438 BasalforcingsIsmp6TfEnum, 438 439 BasalforcingsPicoBasinIdEnum, 439 440 BasalforcingsPicoBoxIdEnum, … … 752 753 BalancevelocitySolutionEnum, 753 754 BasalCrevasseEnum, 755 BasalforcingsIsmip6Enum, 754 756 BasalforcingsPicoEnum, 755 757 BedSlopeSolutionEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r23758 r23782 442 442 case BasalforcingsGeothermalfluxEnum : return "BasalforcingsGeothermalflux"; 443 443 case BasalforcingsGroundediceMeltingRateEnum : return "BasalforcingsGroundediceMeltingRate"; 444 case BasalforcingsIsmp6TfEnum : return "BasalforcingsIsmp6Tf"; 444 445 case BasalforcingsPicoBasinIdEnum : return "BasalforcingsPicoBasinId"; 445 446 case BasalforcingsPicoBoxIdEnum : return "BasalforcingsPicoBoxId"; … … 756 757 case BalancevelocitySolutionEnum : return "BalancevelocitySolution"; 757 758 case BasalCrevasseEnum : return "BasalCrevasse"; 759 case BasalforcingsIsmip6Enum : return "BasalforcingsIsmip6"; 758 760 case BasalforcingsPicoEnum : return "BasalforcingsPico"; 759 761 case BedSlopeSolutionEnum : return "BedSlopeSolution"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r23758 r23782 451 451 else if (strcmp(name,"BasalforcingsGeothermalflux")==0) return BasalforcingsGeothermalfluxEnum; 452 452 else if (strcmp(name,"BasalforcingsGroundediceMeltingRate")==0) return BasalforcingsGroundediceMeltingRateEnum; 453 else if (strcmp(name,"BasalforcingsIsmp6Tf")==0) return BasalforcingsIsmp6TfEnum; 453 454 else if (strcmp(name,"BasalforcingsPicoBasinId")==0) return BasalforcingsPicoBasinIdEnum; 454 455 else if (strcmp(name,"BasalforcingsPicoBoxId")==0) return BasalforcingsPicoBoxIdEnum; … … 505 506 else if (strcmp(name,"EsaYmotion")==0) return EsaYmotionEnum; 506 507 else if (strcmp(name,"EtaDiff")==0) return EtaDiffEnum; 507 else if (strcmp(name,"FrictionAs")==0) return FrictionAsEnum;508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"FrictionC")==0) return FrictionCEnum; 511 if (strcmp(name,"FrictionAs")==0) return FrictionAsEnum; 512 else if (strcmp(name,"FrictionC")==0) return FrictionCEnum; 512 513 else if (strcmp(name,"FrictionCoefficientcoulomb")==0) return FrictionCoefficientcoulombEnum; 513 514 else if (strcmp(name,"FrictionCoefficient")==0) return FrictionCoefficientEnum; … … 628 629 else if (strcmp(name,"SmbDailyairhumidity")==0) return SmbDailyairhumidityEnum; 629 630 else if (strcmp(name,"SmbDailytemperature")==0) return SmbDailytemperatureEnum; 630 else if (strcmp(name,"SmbD")==0) return SmbDEnum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"SmbDini")==0) return SmbDiniEnum; 634 if (strcmp(name,"SmbD")==0) return SmbDEnum; 635 else if (strcmp(name,"SmbDini")==0) return SmbDiniEnum; 635 636 else if (strcmp(name,"SmbDlwrf")==0) return SmbDlwrfEnum; 636 637 else if (strcmp(name,"SmbDswrf")==0) return SmbDswrfEnum; … … 751 752 else if (strcmp(name,"AdaptiveTimestepping")==0) return AdaptiveTimesteppingEnum; 752 753 else if (strcmp(name,"AdjointBalancethickness2Analysis")==0) return AdjointBalancethickness2AnalysisEnum; 753 else if (strcmp(name,"AdjointBalancethicknessAnalysis")==0) return AdjointBalancethicknessAnalysisEnum;754 754 else stage=7; 755 755 } 756 756 if(stage==7){ 757 if (strcmp(name,"AdjointHorizAnalysis")==0) return AdjointHorizAnalysisEnum; 757 if (strcmp(name,"AdjointBalancethicknessAnalysis")==0) return AdjointBalancethicknessAnalysisEnum; 758 else if (strcmp(name,"AdjointHorizAnalysis")==0) return AdjointHorizAnalysisEnum; 758 759 else if (strcmp(name,"Adjointp")==0) return AdjointpEnum; 759 760 else if (strcmp(name,"AggressiveMigration")==0) return AggressiveMigrationEnum; … … 774 775 else if (strcmp(name,"BalancevelocitySolution")==0) return BalancevelocitySolutionEnum; 775 776 else if (strcmp(name,"BasalCrevasse")==0) return BasalCrevasseEnum; 777 else if (strcmp(name,"BasalforcingsIsmip6")==0) return BasalforcingsIsmip6Enum; 776 778 else if (strcmp(name,"BasalforcingsPico")==0) return BasalforcingsPicoEnum; 777 779 else if (strcmp(name,"BedSlopeSolution")==0) return BedSlopeSolutionEnum; … … 873 875 else if (strcmp(name,"Gradient1")==0) return Gradient1Enum; 874 876 else if (strcmp(name,"Gradient2")==0) return Gradient2Enum; 875 else if (strcmp(name,"Gradient3")==0) return Gradient3Enum;876 else if (strcmp(name,"GroundedArea")==0) return GroundedAreaEnum;877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"GroundedAreaScaled")==0) return GroundedAreaScaledEnum; 880 if (strcmp(name,"Gradient3")==0) return Gradient3Enum; 881 else if (strcmp(name,"GroundedArea")==0) return GroundedAreaEnum; 882 else if (strcmp(name,"GroundedAreaScaled")==0) return GroundedAreaScaledEnum; 881 883 else if (strcmp(name,"GroundingOnly")==0) return GroundingOnlyEnum; 882 884 else if (strcmp(name,"Gset")==0) return GsetEnum; … … 996 998 else if (strcmp(name,"Outputdefinition10")==0) return Outputdefinition10Enum; 997 999 else if (strcmp(name,"Outputdefinition11")==0) return Outputdefinition11Enum; 998 else if (strcmp(name,"Outputdefinition12")==0) return Outputdefinition12Enum;999 else if (strcmp(name,"Outputdefinition13")==0) return Outputdefinition13Enum;1000 1000 else stage=9; 1001 1001 } 1002 1002 if(stage==9){ 1003 if (strcmp(name,"Outputdefinition14")==0) return Outputdefinition14Enum; 1003 if (strcmp(name,"Outputdefinition12")==0) return Outputdefinition12Enum; 1004 else if (strcmp(name,"Outputdefinition13")==0) return Outputdefinition13Enum; 1005 else if (strcmp(name,"Outputdefinition14")==0) return Outputdefinition14Enum; 1004 1006 else if (strcmp(name,"Outputdefinition15")==0) return Outputdefinition15Enum; 1005 1007 else if (strcmp(name,"Outputdefinition16")==0) return Outputdefinition16Enum; … … 1119 1121 else if (strcmp(name,"ProfilingCurrentMem")==0) return ProfilingCurrentMemEnum; 1120 1122 else if (strcmp(name,"ProfilingSolutionTime")==0) return ProfilingSolutionTimeEnum; 1121 else if (strcmp(name,"Regionaloutput")==0) return RegionaloutputEnum;1122 else if (strcmp(name,"Regular")==0) return RegularEnum;1123 1123 else stage=10; 1124 1124 } 1125 1125 if(stage==10){ 1126 if (strcmp(name,"Riftfront")==0) return RiftfrontEnum; 1126 if (strcmp(name,"Regionaloutput")==0) return RegionaloutputEnum; 1127 else if (strcmp(name,"Regular")==0) return RegularEnum; 1128 else if (strcmp(name,"Riftfront")==0) return RiftfrontEnum; 1127 1129 else if (strcmp(name,"Scaled")==0) return ScaledEnum; 1128 1130 else if (strcmp(name,"SealevelAbsolute")==0) return SealevelAbsoluteEnum; -
issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.cpp
r23657 r23782 197 197 case 5: return BasalforcingsPicoEnum; 198 198 case 6: return SpatialLinearFloatingMeltRateEnum; 199 case 7: return BasalforcingsIsmip6Enum; 199 200 default: _error_("Marshalled Basal Forcings code \""<<enum_in<<"\" not supported yet"); 200 201 }
Note:
See TracChangeset
for help on using the changeset viewer.