Changeset 19594
- Timestamp:
- 09/25/15 18:41:17 (10 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r19583 r19594 2129 2129 IssmDouble C; 2130 2130 IssmDouble Tz,Vz; 2131 IssmDouble rho_ice, aSnow,aIce;2131 IssmDouble rho_ice, rho_water,aSnow,aIce; 2132 2132 IssmDouble time,dt; 2133 2133 IssmDouble t,smb_dt; 2134 IssmDouble yts; 2134 2135 IssmDouble Ta,V,dlw,dsw,P,eAir,pAir; 2135 2136 int aIdx=0; … … 2163 2164 IssmDouble mAdd; 2164 2165 int m; 2165 IssmDouble SmbMassBalance=0;2166 2166 int count=0; 2167 2167 /*}}}*/ … … 2173 2173 /*Retrieve material properties and parameters:{{{ */ 2174 2174 rho_ice = matpar->GetMaterialParameter(MaterialsRhoIceEnum); 2175 rho_water = matpar->GetMaterialParameter(MaterialsRhoFreshwaterEnum); 2175 2176 parameters->FindParam(&aSnow,SmbASnowEnum); 2176 2177 parameters->FindParam(&aIce,SmbAIceEnum); … … 2383 2384 if (T[m-1]!=T_bottom) _printf_("T(end)~=T_bottom" << "\n"); 2384 2385 2385 SmbMassBalance += sumP + sumEC - sumR; //increment SMB for the entire time span of ice-flow dynamics.2386 2387 2386 count++; 2388 2387 2389 2388 } //for (t=time;t<=time+dt;t=t+smb_dt) 2389 2390 2390 2391 2391 /*Save generated inputs: */ … … 2400 2400 this->AddInput(new DoubleArrayInput(SmbAEnum,a,m)); 2401 2401 this->AddInput(new DoubleArrayInput(SmbSwfEnum,swf,m)); 2402 this->AddInput(new DoubleInput(SmbMassBalanceEnum,time)); 2402 this->AddInput(new DoubleInput(SmbMassBalanceEnum,(sumP + sumEC -sumR)/rho_water/dt)); 2403 this->AddInput(new DoubleInput(SmbRunoffEnum,sumR/rho_water/dt)); 2404 this->AddInput(new DoubleInput(SmbPrecipitationEnum,sumP/rho_water/dt)); 2405 this->AddInput(new DoubleInput(SmbCondensationEnum,sumEC/rho_water/dt)); 2406 2403 2407 2404 2408 -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r19561 r19594 396 396 SmbGspEnum, 397 397 SmbECEnum, 398 SmbCondensationEnum, 398 399 SmbWEnum, 399 400 SmbAEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r19561 r19594 398 398 case SmbGspEnum : return "SmbGsp"; 399 399 case SmbECEnum : return "SmbEC"; 400 case SmbCondensationEnum : return "SmbCondensation"; 400 401 case SmbWEnum : return "SmbW"; 401 402 case SmbAEnum : return "SmbA"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r19561 r19594 407 407 else if (strcmp(name,"SmbGsp")==0) return SmbGspEnum; 408 408 else if (strcmp(name,"SmbEC")==0) return SmbECEnum; 409 else if (strcmp(name,"SmbCondensation")==0) return SmbCondensationEnum; 409 410 else if (strcmp(name,"SmbW")==0) return SmbWEnum; 410 411 else if (strcmp(name,"SmbA")==0) return SmbAEnum; … … 505 506 else if (strcmp(name,"UzawaPressureAnalysis")==0) return UzawaPressureAnalysisEnum; 506 507 else if (strcmp(name,"GiaSolution")==0) return GiaSolutionEnum; 507 else if (strcmp(name,"GiaAnalysis")==0) return GiaAnalysisEnum;508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"MeshdeformationSolution")==0) return MeshdeformationSolutionEnum; 511 if (strcmp(name,"GiaAnalysis")==0) return GiaAnalysisEnum; 512 else if (strcmp(name,"MeshdeformationSolution")==0) return MeshdeformationSolutionEnum; 512 513 else if (strcmp(name,"MeshdeformationAnalysis")==0) return MeshdeformationAnalysisEnum; 513 514 else if (strcmp(name,"LevelsetAnalysis")==0) return LevelsetAnalysisEnum; … … 628 629 else if (strcmp(name,"FractionIncrement")==0) return FractionIncrementEnum; 629 630 else if (strcmp(name,"Friction")==0) return FrictionEnum; 630 else if (strcmp(name,"Internal")==0) return InternalEnum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"MassFlux")==0) return MassFluxEnum; 634 if (strcmp(name,"Internal")==0) return InternalEnum; 635 else if (strcmp(name,"MassFlux")==0) return MassFluxEnum; 635 636 else if (strcmp(name,"MeltingOffset")==0) return MeltingOffsetEnum; 636 637 else if (strcmp(name,"Misfit")==0) return MisfitEnum; … … 751 752 else if (strcmp(name,"Outputdefinition1")==0) return Outputdefinition1Enum; 752 753 else if (strcmp(name,"Outputdefinition2")==0) return Outputdefinition2Enum; 753 else if (strcmp(name,"Outputdefinition3")==0) return Outputdefinition3Enum;754 754 else stage=7; 755 755 } 756 756 if(stage==7){ 757 if (strcmp(name,"Outputdefinition4")==0) return Outputdefinition4Enum; 757 if (strcmp(name,"Outputdefinition3")==0) return Outputdefinition3Enum; 758 else if (strcmp(name,"Outputdefinition4")==0) return Outputdefinition4Enum; 758 759 else if (strcmp(name,"Outputdefinition5")==0) return Outputdefinition5Enum; 759 760 else if (strcmp(name,"Outputdefinition6")==0) return Outputdefinition6Enum; … … 874 875 else if (strcmp(name,"MinVel")==0) return MinVelEnum; 875 876 else if (strcmp(name,"MaxVel")==0) return MaxVelEnum; 876 else if (strcmp(name,"MinVx")==0) return MinVxEnum;877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"MaxVx")==0) return MaxVxEnum; 880 if (strcmp(name,"MinVx")==0) return MinVxEnum; 881 else if (strcmp(name,"MaxVx")==0) return MaxVxEnum; 881 882 else if (strcmp(name,"MaxAbsVx")==0) return MaxAbsVxEnum; 882 883 else if (strcmp(name,"MinVy")==0) return MinVyEnum; -
issm/trunk-jpl/src/m/enum/EnumDefinitions.py
r19561 r19594 390 390 def SmbGspEnum(): return StringToEnum("SmbGsp")[0] 391 391 def SmbECEnum(): return StringToEnum("SmbEC")[0] 392 def SmbCondensationEnum(): return StringToEnum("SmbCondensation")[0] 392 393 def SmbWEnum(): return StringToEnum("SmbW")[0] 393 394 def SmbAEnum(): return StringToEnum("SmbA")[0] -
issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m
r19527 r19594 200 200 elseif strcmp(fieldname,'SmbMassBalance'), 201 201 field = field*yts; 202 elseif strcmp(fieldname,'SmbPrecipitation'), 203 field = field*yts; 204 elseif strcmp(fieldname,'SmbRunoff'), 205 field = field*yts; 206 elseif strcmp(fieldname,'SmbCondensation'), 207 field = field*yts; 202 208 elseif strcmp(fieldname,'SmbAccumulation'), 203 209 field = field*yts;
Note:
See TracChangeset
for help on using the changeset viewer.