Changeset 19172
- Timestamp:
- 03/04/15 11:09:39 (11 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 24 edited
-
m4/analyses.m4 (modified) (32 diffs)
-
src/c/Makefile.am (modified) (1 diff)
-
src/c/analyses/MasstransportAnalysis.cpp (modified) (3 diffs)
-
src/c/analyses/ThermalAnalysis.cpp (modified) (1 diff)
-
src/c/classes/Elements/Element.h (modified) (1 diff)
-
src/c/classes/Elements/Penta.cpp (modified) (1 diff)
-
src/c/classes/Elements/Penta.h (modified) (1 diff)
-
src/c/classes/Elements/Seg.h (modified) (1 diff)
-
src/c/classes/Elements/Tetra.h (modified) (1 diff)
-
src/c/classes/Elements/Tria.cpp (modified) (1 diff)
-
src/c/classes/Elements/Tria.h (modified) (1 diff)
-
src/c/classes/Materials/Matpar.cpp (modified) (5 diffs)
-
src/c/classes/Materials/Matpar.h (modified) (1 diff)
-
src/c/modules/ModelProcessorx/CreateParameters.cpp (modified) (5 diffs)
-
src/c/modules/SurfaceMassBalancex/SurfaceMassBalancex.cpp (modified) (4 diffs)
-
src/c/modules/SurfaceMassBalancex/SurfaceMassBalancex.h (modified) (1 diff)
-
src/c/shared/Elements/PddSurfaceMassBalance.cpp (modified) (1 diff)
-
src/c/shared/Elements/elements.h (modified) (1 diff)
-
src/c/shared/Enum/EnumDefinitions.h (modified) (2 diffs)
-
src/c/shared/Enum/EnumToStringx.cpp (modified) (2 diffs)
-
src/c/shared/Enum/StringToEnumx.cpp (modified) (7 diffs)
-
src/m/classes/SMBpdd.m (modified) (14 diffs)
-
src/m/classes/clusters/acenet.m (modified) (1 diff)
-
src/m/enum/EnumDefinitions.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/m4/analyses.m4
r18950 r19172 19 19 if test "x$ADJOINTBALANCETHICKNESS" = "xyes"; then 20 20 HAVE_ADJOINTBALANCETHICKNESS=yes 21 AC_DEFINE([_HAVE_ADJOINTBALANCETHICKNESS_],[1],[with AdjointBalancethickness capability])21 AC_DEFINE([_HAVE_ADJOINTBALANCETHICKNESS_],[1],[with AdjointBalancethickness capability]) 22 22 fi 23 23 AM_CONDITIONAL([ADJOINTBALANCETHICKNESS], [test x$HAVE_ADJOINTBALANCETHICKNESS = xyes]) … … 33 33 if test "x$ADJOINTBALANCETHICKNESS2" = "xyes"; then 34 34 HAVE_ADJOINTBALANCETHICKNESS2=yes 35 AC_DEFINE([_HAVE_ADJOINTBALANCETHICKNESS2_],[1],[with AdjointBalancethickness2 capability])35 AC_DEFINE([_HAVE_ADJOINTBALANCETHICKNESS2_],[1],[with AdjointBalancethickness2 capability]) 36 36 fi 37 37 AM_CONDITIONAL([ADJOINTBALANCETHICKNESS2], [test x$HAVE_ADJOINTBALANCETHICKNESS2 = xyes]) … … 47 47 if test "x$ADJOINTHORIZ" = "xyes"; then 48 48 HAVE_ADJOINTHORIZ=yes 49 AC_DEFINE([_HAVE_ADJOINTHORIZ_],[1],[with AdjointHoriz capability])49 AC_DEFINE([_HAVE_ADJOINTHORIZ_],[1],[with AdjointHoriz capability]) 50 50 fi 51 51 AM_CONDITIONAL([ADJOINTHORIZ], [test x$HAVE_ADJOINTHORIZ = xyes]) … … 61 61 if test "x$BALANCETHICKNESS" = "xyes"; then 62 62 HAVE_BALANCETHICKNESS=yes 63 AC_DEFINE([_HAVE_BALANCETHICKNESS_],[1],[with Balancethickness capability])63 AC_DEFINE([_HAVE_BALANCETHICKNESS_],[1],[with Balancethickness capability]) 64 64 fi 65 65 AM_CONDITIONAL([BALANCETHICKNESS], [test x$HAVE_BALANCETHICKNESS = xyes]) … … 75 75 if test "x$BALANCETHICKNESS2" = "xyes"; then 76 76 HAVE_BALANCETHICKNESS2=yes 77 AC_DEFINE([_HAVE_BALANCETHICKNESS2_],[1],[with Balancethickness2 capability])77 AC_DEFINE([_HAVE_BALANCETHICKNESS2_],[1],[with Balancethickness2 capability]) 78 78 fi 79 79 AM_CONDITIONAL([BALANCETHICKNESS2], [test x$HAVE_BALANCETHICKNESS2 = xyes]) … … 89 89 if test "x$BALANCETHICKNESSSOFT" = "xyes"; then 90 90 HAVE_BALANCETHICKNESSSOFT=yes 91 AC_DEFINE([_HAVE_BALANCETHICKNESSSOFT_],[1],[with BalancethicknessSoft capability])91 AC_DEFINE([_HAVE_BALANCETHICKNESSSOFT_],[1],[with BalancethicknessSoft capability]) 92 92 fi 93 93 AM_CONDITIONAL([BALANCETHICKNESSSOFT], [test x$HAVE_BALANCETHICKNESSSOFT = xyes]) … … 103 103 if test "x$BALANCEVELOCITY" = "xyes"; then 104 104 HAVE_BALANCEVELOCITY=yes 105 AC_DEFINE([_HAVE_BALANCEVELOCITY_],[1],[with Balancevelocity capability])105 AC_DEFINE([_HAVE_BALANCEVELOCITY_],[1],[with Balancevelocity capability]) 106 106 fi 107 107 AM_CONDITIONAL([BALANCEVELOCITY], [test x$HAVE_BALANCEVELOCITY = xyes]) … … 117 117 if test "x$L2PROJECTIONEPL" = "xyes"; then 118 118 HAVE_L2PROJECTIONEPL=yes 119 AC_DEFINE([_HAVE_L2PROJECTIONEPL_],[1],[with L2ProjectionEPL capability])119 AC_DEFINE([_HAVE_L2PROJECTIONEPL_],[1],[with L2ProjectionEPL capability]) 120 120 fi 121 121 AM_CONDITIONAL([L2PROJECTIONEPL], [test x$HAVE_L2PROJECTIONEPL = xyes]) … … 131 131 if test "x$L2PROJECTIONBASE" = "xyes"; then 132 132 HAVE_L2PROJECTIONBASE=yes 133 AC_DEFINE([_HAVE_L2PROJECTIONBASE_],[1],[with L2ProjectionBase capability])133 AC_DEFINE([_HAVE_L2PROJECTIONBASE_],[1],[with L2ProjectionBase capability]) 134 134 fi 135 135 AM_CONDITIONAL([L2PROJECTIONBASE], [test x$HAVE_L2PROJECTIONBASE = xyes]) … … 145 145 if test "x$DAMAGEEVOLUTION" = "xyes"; then 146 146 HAVE_DAMAGEEVOLUTION=yes 147 AC_DEFINE([_HAVE_DAMAGEEVOLUTION_],[1],[with DamageEvolution capability])147 AC_DEFINE([_HAVE_DAMAGEEVOLUTION_],[1],[with DamageEvolution capability]) 148 148 fi 149 149 AM_CONDITIONAL([DAMAGEEVOLUTION], [test x$HAVE_DAMAGEEVOLUTION = xyes]) … … 159 159 if test "x$STRESSBALANCE" = "xyes"; then 160 160 HAVE_STRESSBALANCE=yes 161 AC_DEFINE([_HAVE_STRESSBALANCE_],[1],[with Stressbalance capability])161 AC_DEFINE([_HAVE_STRESSBALANCE_],[1],[with Stressbalance capability]) 162 162 fi 163 163 AM_CONDITIONAL([STRESSBALANCE], [test x$HAVE_STRESSBALANCE = xyes]) … … 173 173 if test "x$STRESSBALANCESIA" = "xyes"; then 174 174 HAVE_STRESSBALANCESIA=yes 175 AC_DEFINE([_HAVE_STRESSBALANCESIA_],[1],[with StressbalanceSIA capability])175 AC_DEFINE([_HAVE_STRESSBALANCESIA_],[1],[with StressbalanceSIA capability]) 176 176 fi 177 177 AM_CONDITIONAL([STRESSBALANCESIA], [test x$HAVE_STRESSBALANCESIA = xyes]) … … 187 187 if test "x$STRESSBALANCEVERTICAL" = "xyes"; then 188 188 HAVE_STRESSBALANCEVERTICAL=yes 189 AC_DEFINE([_HAVE_STRESSBALANCEVERTICAL_],[1],[with StressbalanceVertical capability])189 AC_DEFINE([_HAVE_STRESSBALANCEVERTICAL_],[1],[with StressbalanceVertical capability]) 190 190 fi 191 191 AM_CONDITIONAL([STRESSBALANCEVERTICAL], [test x$HAVE_STRESSBALANCEVERTICAL = xyes]) … … 201 201 if test "x$ENTHALPY" = "xyes"; then 202 202 HAVE_ENTHALPY=yes 203 AC_DEFINE([_HAVE_ENTHALPY_],[1],[with Enthalpy capability])203 AC_DEFINE([_HAVE_ENTHALPY_],[1],[with Enthalpy capability]) 204 204 fi 205 205 AM_CONDITIONAL([ENTHALPY], [test x$HAVE_ENTHALPY = xyes]) … … 215 215 if test "x$HYDROLOGYSHREVE" = "xyes"; then 216 216 HAVE_HYDROLOGYSHREVE=yes 217 AC_DEFINE([_HAVE_HYDROLOGYSHREVE_],[1],[with HydrologyShreve capability])217 AC_DEFINE([_HAVE_HYDROLOGYSHREVE_],[1],[with HydrologyShreve capability]) 218 218 fi 219 219 AM_CONDITIONAL([HYDROLOGYSHREVE], [test x$HAVE_HYDROLOGYSHREVE = xyes]) … … 229 229 if test "x$HYDROLOGYDCINEFFICIENT" = "xyes"; then 230 230 HAVE_HYDROLOGYDCINEFFICIENT=yes 231 AC_DEFINE([_HAVE_HYDROLOGYDCINEFFICIENT_],[1],[with HydrologyDCInefficient capability])231 AC_DEFINE([_HAVE_HYDROLOGYDCINEFFICIENT_],[1],[with HydrologyDCInefficient capability]) 232 232 fi 233 233 AM_CONDITIONAL([HYDROLOGYDCINEFFICIENT], [test x$HAVE_HYDROLOGYDCINEFFICIENT = xyes]) … … 243 243 if test "x$HYDROLOGYDCEFFICIENT" = "xyes"; then 244 244 HAVE_HYDROLOGYDCEFFICIENT=yes 245 AC_DEFINE([_HAVE_HYDROLOGYDCEFFICIENT_],[1],[with HydrologyDCEfficient capability])245 AC_DEFINE([_HAVE_HYDROLOGYDCEFFICIENT_],[1],[with HydrologyDCEfficient capability]) 246 246 fi 247 247 AM_CONDITIONAL([HYDROLOGYDCEFFICIENT], [test x$HAVE_HYDROLOGYDCEFFICIENT = xyes]) … … 257 257 if test "x$MELTING" = "xyes"; then 258 258 HAVE_MELTING=yes 259 AC_DEFINE([_HAVE_MELTING_],[1],[with Melting capability])259 AC_DEFINE([_HAVE_MELTING_],[1],[with Melting capability]) 260 260 fi 261 261 AM_CONDITIONAL([MELTING], [test x$HAVE_MELTING = xyes]) … … 271 271 if test "x$MASSTRANSPORT" = "xyes"; then 272 272 HAVE_MASSTRANSPORT=yes 273 AC_DEFINE([_HAVE_MASSTRANSPORT_],[1],[with Masstransport capability])273 AC_DEFINE([_HAVE_MASSTRANSPORT_],[1],[with Masstransport capability]) 274 274 fi 275 275 AM_CONDITIONAL([MASSTRANSPORT], [test x$HAVE_MASSTRANSPORT = xyes]) … … 285 285 if test "x$FREESURFACEBASE" = "xyes"; then 286 286 HAVE_FREESURFACEBASE=yes 287 AC_DEFINE([_HAVE_FREESURFACEBASE_],[1],[with FreeSurfaceBase capability])287 AC_DEFINE([_HAVE_FREESURFACEBASE_],[1],[with FreeSurfaceBase capability]) 288 288 fi 289 289 AM_CONDITIONAL([FREESURFACEBASE], [test x$HAVE_FREESURFACEBASE = xyes]) … … 299 299 if test "x$FREESURFACETOP" = "xyes"; then 300 300 HAVE_FREESURFACETOP=yes 301 AC_DEFINE([_HAVE_FREESURFACETOP_],[1],[with FreeSurfaceTop capability])301 AC_DEFINE([_HAVE_FREESURFACETOP_],[1],[with FreeSurfaceTop capability]) 302 302 fi 303 303 AM_CONDITIONAL([FREESURFACETOP], [test x$HAVE_FREESURFACETOP = xyes]) … … 313 313 if test "x$EXTRUDEFROMBASE" = "xyes"; then 314 314 HAVE_EXTRUDEFROMBASE=yes 315 AC_DEFINE([_HAVE_EXTRUDEFROMBASE_],[1],[with ExtrudeFromBase capability])315 AC_DEFINE([_HAVE_EXTRUDEFROMBASE_],[1],[with ExtrudeFromBase capability]) 316 316 fi 317 317 AM_CONDITIONAL([EXTRUDEFROMBASE], [test x$HAVE_EXTRUDEFROMBASE = xyes]) … … 327 327 if test "x$EXTRUDEFROMTOP" = "xyes"; then 328 328 HAVE_EXTRUDEFROMTOP=yes 329 AC_DEFINE([_HAVE_EXTRUDEFROMTOP_],[1],[with ExtrudeFromTop capability])329 AC_DEFINE([_HAVE_EXTRUDEFROMTOP_],[1],[with ExtrudeFromTop capability]) 330 330 fi 331 331 AM_CONDITIONAL([EXTRUDEFROMTOP], [test x$HAVE_EXTRUDEFROMTOP = xyes]) … … 341 341 if test "x$DEPTHAVERAGE" = "xyes"; then 342 342 HAVE_DEPTHAVERAGE=yes 343 AC_DEFINE([_HAVE_DEPTHAVERAGE_],[1],[with DepthAverage capability])343 AC_DEFINE([_HAVE_DEPTHAVERAGE_],[1],[with DepthAverage capability]) 344 344 fi 345 345 AM_CONDITIONAL([DEPTHAVERAGE], [test x$HAVE_DEPTHAVERAGE = xyes]) … … 355 355 if test "x$SMOOTH" = "xyes"; then 356 356 HAVE_SMOOTH=yes 357 AC_DEFINE([_HAVE_SMOOTH_],[1],[with Smooth capability])357 AC_DEFINE([_HAVE_SMOOTH_],[1],[with Smooth capability]) 358 358 fi 359 359 AM_CONDITIONAL([SMOOTH], [test x$HAVE_SMOOTH = xyes]) … … 369 369 if test "x$THERMAL" = "xyes"; then 370 370 HAVE_THERMAL=yes 371 AC_DEFINE([_HAVE_THERMAL_],[1],[with Thermal capability])371 AC_DEFINE([_HAVE_THERMAL_],[1],[with Thermal capability]) 372 372 fi 373 373 AM_CONDITIONAL([THERMAL], [test x$HAVE_THERMAL = xyes]) … … 383 383 if test "x$UZAWAPRESSURE" = "xyes"; then 384 384 HAVE_UZAWAPRESSURE=yes 385 AC_DEFINE([_HAVE_UZAWAPRESSURE_],[1],[with UzawaPressure capability])385 AC_DEFINE([_HAVE_UZAWAPRESSURE_],[1],[with UzawaPressure capability]) 386 386 fi 387 387 AM_CONDITIONAL([UZAWAPRESSURE], [test x$HAVE_UZAWAPRESSURE = xyes]) … … 397 397 if test "x$GIA" = "xyes"; then 398 398 HAVE_GIA=yes 399 AC_DEFINE([_HAVE_GIA_],[1],[with Gia capability])399 AC_DEFINE([_HAVE_GIA_],[1],[with Gia capability]) 400 400 fi 401 401 AM_CONDITIONAL([GIA], [test x$HAVE_GIA = xyes]) 402 402 AC_MSG_RESULT($HAVE_GIA) 403 dnl }}}404 dnl with-Seaice{{{405 AC_ARG_WITH([Seaice],406 AS_HELP_STRING([--with-Seaice = YES], [compile with Seaice capabilities (default is yes)]),407 [SEAICE=$withval],[SEAICE=yes])408 AC_MSG_CHECKING(for Seaice capability compilation)409 410 HAVE_SEAICE=no411 if test "x$SEAICE" = "xyes"; then412 HAVE_SEAICE=yes413 AC_DEFINE([_HAVE_SEAICE_],[1],[with Seaicecapability])414 fi415 AM_CONDITIONAL([SEAICE], [test x$HAVE_SEAICE = xyes])416 AC_MSG_RESULT($HAVE_SEAICE)417 403 dnl }}} 418 404 dnl with-Meshdeformation{{{ … … 425 411 if test "x$MESHDEFORMATION" = "xyes"; then 426 412 HAVE_MESHDEFORMATION=yes 427 AC_DEFINE([_HAVE_MESHDEFORMATION_],[1],[with Meshdeformation capability])413 AC_DEFINE([_HAVE_MESHDEFORMATION_],[1],[with Meshdeformation capability]) 428 414 fi 429 415 AM_CONDITIONAL([MESHDEFORMATION], [test x$HAVE_MESHDEFORMATION = xyes]) … … 439 425 if test "x$LEVELSET" = "xyes"; then 440 426 HAVE_LEVELSET=yes 441 AC_DEFINE([_HAVE_LEVELSET_],[1],[with Levelset capability])427 AC_DEFINE([_HAVE_LEVELSET_],[1],[with Levelset capability]) 442 428 fi 443 429 AM_CONDITIONAL([LEVELSET], [test x$HAVE_LEVELSET = xyes]) … … 453 439 if test "x$EXTRAPOLATION" = "xyes"; then 454 440 HAVE_EXTRAPOLATION=yes 455 AC_DEFINE([_HAVE_EXTRAPOLATION_],[1],[with Extrapolation capability])441 AC_DEFINE([_HAVE_EXTRAPOLATION_],[1],[with Extrapolation capability]) 456 442 fi 457 443 AM_CONDITIONAL([EXTRAPOLATION], [test x$HAVE_EXTRAPOLATION = xyes]) … … 467 453 if test "x$LSFREINITIALIZATION" = "xyes"; then 468 454 HAVE_LSFREINITIALIZATION=yes 469 AC_DEFINE([_HAVE_LSFREINITIALIZATION_],[1],[with LsfReinitialization capability])455 AC_DEFINE([_HAVE_LSFREINITIALIZATION_],[1],[with LsfReinitialization capability]) 470 456 fi 471 457 AM_CONDITIONAL([LSFREINITIALIZATION], [test x$HAVE_LSFREINITIALIZATION = xyes]) -
issm/trunk-jpl/src/c/Makefile.am
r19087 r19172 114 114 ./shared/Elements/ComputeDelta18oTemperaturePrecipitation.cpp\ 115 115 ./shared/Elements/ComputeMungsmTemperaturePrecipitation.cpp\ 116 ./shared/Elements/ComputeD18OTemperaturePrecipitationFromPD.cpp\ 116 117 ./shared/Elements/DrainageFunctionWaterfraction.cpp\ 117 118 ./shared/String/DescriptorIndex.cpp\ -
issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp
r18968 r19172 120 120 int stabilization,finiteelement,smb_model; 121 121 bool dakota_analysis; 122 bool isdelta18o,ismungsm ;122 bool isdelta18o,ismungsm,isd18opd; 123 123 bool isgroundingline; 124 124 bool islevelset; … … 180 180 iomodel->Constant(&isdelta18o,SurfaceforcingsIsdelta18oEnum); 181 181 iomodel->Constant(&ismungsm,SurfaceforcingsIsmungsmEnum); 182 iomodel->Constant(&isd18opd,SurfaceforcingsIsd18opdEnum); 182 183 iomodel->FetchDataToInput(elements,ThermalSpctemperatureEnum); 183 184 if(isdelta18o || ismungsm){ … … 187 188 iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationsLgmEnum); 188 189 } 190 else if (isd18opd){ 191 iomodel->FetchDataToInput(elements,SurfaceforcingsTemperaturesPresentdayEnum); 192 iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationsPresentdayEnum); 193 } 189 194 else{ 190 195 iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationEnum); 191 196 iomodel->FetchDataToInput(elements,SurfaceforcingsMonthlytemperaturesEnum); 192 197 } 193 194 198 break; 195 199 case SMBgradientsEnum: -
issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp
r19162 r19172 35 35 } 36 36 else{ 37 IoModelTo Constraintsx(constraints,iomodel,ThermalSpctemperatureEnum,ThermalAnalysisEnum,finiteelement);37 IoModelToDynamicConstraintsx(constraints,iomodel,ThermalSpctemperatureEnum,ThermalAnalysisEnum,finiteelement); 38 38 } 39 39 -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r19154 r19172 183 183 virtual void Delta18oParameterization(void)=0; 184 184 virtual void MungsmtpParameterization(void)=0; 185 virtual void Delta18opdParameterization(void)=0; 185 186 virtual void ElementResponse(IssmDouble* presponse,int response_enum)=0; 186 187 virtual void ElementSizes(IssmDouble* phx,IssmDouble* phy,IssmDouble* phz)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r19137 r19172 713 713 this->inputs->AddInput(NewPrecipitationInput); 714 714 715 this->InputExtrude(SurfaceforcingsMonthlytemperaturesEnum,-1); 716 this->InputExtrude(SurfaceforcingsPrecipitationEnum,-1); 717 718 /*clean-up*/ 719 delete gauss; 720 } 721 /*}}}*/ 722 void Penta::Delta18opdParameterization(void){/*{{{*/ 723 /*Are we on the base? If not, return*/ 724 if(!IsOnBase()) return; 725 726 int i; 727 IssmDouble monthlytemperatures[NUMVERTICES][12],monthlyprec[NUMVERTICES][12]; 728 IssmDouble TemperaturesPresentday[NUMVERTICES][12]; 729 IssmDouble PrecipitationsPresentday[NUMVERTICES][12]; 730 IssmDouble tmp[NUMVERTICES]; 731 IssmDouble Delta18oTime; 732 IssmDouble dpermil; 733 IssmDouble time,yts; 734 this->parameters->FindParam(&time,TimeEnum); 735 this->parameters->FindParam(&yts,ConstantsYtsEnum); 736 737 /*Get some pdd parameters*/ 738 dpermil=matpar-> GetMaterialParameter(SurfaceforcingsDpermilEnum); 739 740 /*Recover present day temperature and precipitation*/ 741 Input* input=inputs->GetInput(SurfaceforcingsTemperaturesPresentdayEnum); _assert_(input); 742 Input* input2=inputs->GetInput(SurfaceforcingsPrecipitationsPresentdayEnum); _assert_(input2); 743 GaussPenta* gauss=new GaussPenta(); 744 for(int month=0;month<12;month++) { 745 for(int iv=0;iv<NUMVERTICES;iv++) { 746 gauss->GaussVertex(iv); 747 input->GetInputValue(&TemperaturesPresentday[iv][month],gauss,month/12.*yts); 748 input2->GetInputValue(&PrecipitationsPresentday[iv][month],gauss,month/12.*yts); 749 } 750 } 751 752 /*Recover interpolation parameters at time t*/ 753 this->parameters->FindParam(&Delta18oTime,SurfaceforcingsDelta18oEnum,time); 754 755 /*Compute the temperature and precipitation*/ 756 for(int iv=0;iv<NUMVERTICES;iv++){ 757 ComputeD18OTemperaturePrecipitationFromPD(Delta18oTime,dpermil, 758 &PrecipitationsPresentday[iv][0], &TemperaturesPresentday[iv][0], 759 &monthlytemperatures[iv][0], &monthlyprec[iv][0]); 760 } 761 762 /*Update inputs*/ 763 TransientInput* NewTemperatureInput = new TransientInput(SurfaceforcingsMonthlytemperaturesEnum); 764 TransientInput* NewPrecipitationInput = new TransientInput(SurfaceforcingsPrecipitationEnum); 765 for (int imonth=0;imonth<12;imonth++) { 766 for(i=0;i<NUMVERTICES;i++) tmp[i]=monthlytemperatures[i][imonth]; 767 PentaInput* newmonthinput1 = new PentaInput(SurfaceforcingsMonthlytemperaturesEnum,&tmp[0],P1Enum); 768 NewTemperatureInput->AddTimeInput(newmonthinput1,time+imonth/12.*yts); 769 770 for(i=0;i<NUMVERTICES;i++) tmp[i]=monthlyprec[i][imonth]; 771 PentaInput* newmonthinput2 = new PentaInput(SurfaceforcingsPrecipitationEnum,&tmp[0],P1Enum); 772 NewPrecipitationInput->AddTimeInput(newmonthinput2,time+imonth/12.*yts); 773 } 774 NewTemperatureInput->Configure(this->parameters); 775 NewPrecipitationInput->Configure(this->parameters); 776 777 this->inputs->AddInput(NewTemperatureInput); 778 this->inputs->AddInput(NewPrecipitationInput); 779 715 780 this->InputExtrude(SurfaceforcingsMonthlytemperaturesEnum,-1); 716 781 this->InputExtrude(SurfaceforcingsPrecipitationEnum,-1); -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r19061 r19172 60 60 void Delta18oParameterization(void); 61 61 void MungsmtpParameterization(void); 62 void Delta18opdParameterization(void); 62 63 void ElementResponse(IssmDouble* presponse,int response_enum); 63 64 void ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz); -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r19061 r19172 55 55 void Delta18oParameterization(void){_error_("not implemented yet");}; 56 56 void MungsmtpParameterization(void){_error_("not implemented yet");}; 57 void Delta18opdParameterization(void){_error_("not implemented yet");}; 57 58 void ElementResponse(IssmDouble* presponse,int response_enum){_error_("not implemented yet");}; 58 59 void ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tetra.h
r19061 r19172 55 55 void Delta18oParameterization(void){_error_("not implemented yet");}; 56 56 void MungsmtpParameterization(void){_error_("not implemented yet");}; 57 void Delta18opdParameterization(void){_error_("not implemented yet");}; 57 58 IssmDouble DragCoefficientAbsGradient(void){_error_("not implemented yet");}; 58 59 void ElementResponse(IssmDouble* presponse,int response_enum){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r19154 r19172 750 750 &PrecipitationsLgm[iv][0],&PrecipitationsPresentday[iv][0], 751 751 &TemperaturesLgm[iv][0], &TemperaturesPresentday[iv][0], 752 &monthlytemperatures[iv][0], &monthlyprec[iv][0]); 753 } 754 755 /*Update inputs*/ 756 TransientInput* NewTemperatureInput = new TransientInput(SurfaceforcingsMonthlytemperaturesEnum); 757 TransientInput* NewPrecipitationInput = new TransientInput(SurfaceforcingsPrecipitationEnum); 758 for (int imonth=0;imonth<12;imonth++) { 759 for(i=0;i<NUMVERTICES;i++) tmp[i]=monthlytemperatures[i][imonth]; 760 TriaInput* newmonthinput1 = new TriaInput(SurfaceforcingsMonthlytemperaturesEnum,&tmp[0],P1Enum); 761 NewTemperatureInput->AddTimeInput(newmonthinput1,time+imonth/12.*yts); 762 763 for(i=0;i<NUMVERTICES;i++) tmp[i]=monthlyprec[i][imonth]; 764 TriaInput* newmonthinput2 = new TriaInput(SurfaceforcingsPrecipitationEnum,&tmp[0],P1Enum); 765 NewPrecipitationInput->AddTimeInput(newmonthinput2,time+imonth/12.*yts); 766 } 767 NewTemperatureInput->Configure(this->parameters); 768 NewPrecipitationInput->Configure(this->parameters); 769 770 this->inputs->AddInput(NewTemperatureInput); 771 this->inputs->AddInput(NewPrecipitationInput); 772 773 /*clean-up*/ 774 delete gauss; 775 } 776 /*}}}*/ 777 void Tria::Delta18opdParameterization(void){/*{{{*/ 778 /*Are we on the base? If not, return*/ 779 if(!IsOnBase()) return; 780 781 int i; 782 IssmDouble monthlytemperatures[NUMVERTICES][12],monthlyprec[NUMVERTICES][12]; 783 IssmDouble TemperaturesPresentday[NUMVERTICES][12]; 784 IssmDouble PrecipitationsPresentday[NUMVERTICES][12]; 785 IssmDouble tmp[NUMVERTICES]; 786 IssmDouble Delta18oTime; 787 IssmDouble dpermil; 788 IssmDouble time,yts; 789 this->parameters->FindParam(&time,TimeEnum); 790 this->parameters->FindParam(&yts,ConstantsYtsEnum); 791 792 /*Get some pdd parameters*/ 793 dpermil=matpar-> GetMaterialParameter(SurfaceforcingsDpermilEnum); 794 795 /*Recover present day temperature and precipitation*/ 796 Input* input=inputs->GetInput(SurfaceforcingsTemperaturesPresentdayEnum); _assert_(input); 797 Input* input2=inputs->GetInput(SurfaceforcingsPrecipitationsPresentdayEnum); _assert_(input2); 798 GaussTria* gauss=new GaussTria(); 799 for(int month=0;month<12;month++) { 800 for(int iv=0;iv<NUMVERTICES;iv++) { 801 gauss->GaussVertex(iv); 802 input->GetInputValue(&TemperaturesPresentday[iv][month],gauss,month/12.*yts); 803 input2->GetInputValue(&PrecipitationsPresentday[iv][month],gauss,month/12.*yts); 804 } 805 } 806 807 /*Recover interpolation parameters at time t*/ 808 this->parameters->FindParam(&Delta18oTime,SurfaceforcingsDelta18oEnum,time); 809 810 /*Compute the temperature and precipitation*/ 811 for(int iv=0;iv<NUMVERTICES;iv++){ 812 ComputeD18OTemperaturePrecipitationFromPD(Delta18oTime,dpermil, 813 &PrecipitationsPresentday[iv][0], &TemperaturesPresentday[iv][0], 752 814 &monthlytemperatures[iv][0], &monthlyprec[iv][0]); 753 815 } -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r19061 r19172 65 65 void Delta18oParameterization(void); 66 66 void MungsmtpParameterization(void); 67 void Delta18opdParameterization(void); 67 68 int EdgeOnBaseIndex(); 68 69 void EdgeOnBaseIndices(int* pindex1,int* pindex); -
issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp
r19087 r19172 55 55 iomodel->Constant(&this->rlaps,SurfaceforcingsRlapsEnum); 56 56 iomodel->Constant(&this->rlapslgm,SurfaceforcingsRlapslgmEnum); 57 iomodel->Constant(&this->dpermil,SurfaceforcingsDpermilEnum); 57 58 break; 58 59 case SMBgradientsEnum: … … 134 135 _printf_(" rlaps: " << rlaps << "\n"); 135 136 _printf_(" rlapslgm: " << rlapslgm << "\n"); 137 _printf_(" dpermil: " << dpermil << "\n"); 136 138 return; 137 139 } … … 179 181 matpar->rlaps=this->rlaps; 180 182 matpar->rlapslgm=this->rlapslgm; 183 matpar->dpermil=this->dpermil; 181 184 182 185 matpar->sediment_compressibility=this->sediment_compressibility; … … 273 276 case SurfaceforcingsRlapslgmEnum: 274 277 this->rlapslgm=constant; 278 break; 279 case SurfaceforcingsDpermilEnum: 280 this->dpermil=constant; 275 281 break; 276 282 default: … … 400 406 case SurfaceforcingsRlapsEnum: return this->rlaps; 401 407 case SurfaceforcingsRlapslgmEnum: return this->rlapslgm; 408 case SurfaceforcingsDpermilEnum: return this->dpermil; 402 409 case MaterialsLithosphereShearModulusEnum: return this->lithosphere_shear_modulus; 403 410 case MaterialsLithosphereDensityEnum: return this->lithosphere_density; -
issm/trunk-jpl/src/c/classes/Materials/Matpar.h
r18946 r19172 36 36 IssmDouble rlaps; 37 37 IssmDouble rlapslgm; 38 IssmDouble dpermil; 38 39 39 40 /*hydrology Dual Porous Continuum: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r19087 r19172 22 22 char** requestedoutputs = NULL; 23 23 IssmDouble time; 24 bool isdelta18o,ismungsm ;24 bool isdelta18o,ismungsm,isd18opd; 25 25 26 26 /*parameters for mass flux:*/ … … 107 107 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIsdelta18oEnum)); 108 108 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIsmungsmEnum)); 109 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIsd18opdEnum)); 109 110 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsDesfacEnum)); 110 111 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsS0pEnum)); … … 114 115 iomodel->Constant(&isdelta18o,SurfaceforcingsIsdelta18oEnum); 115 116 iomodel->Constant(&ismungsm,SurfaceforcingsIsmungsmEnum); 117 iomodel->Constant(&isd18opd,SurfaceforcingsIsd18opdEnum); 116 118 117 119 if(ismungsm){ … … 131 133 iomodel->DeleteData(temp,SurfaceforcingsSealevEnum); 132 134 } 133 134 135 if(isdelta18o){ 135 136 iomodel->Constant(&yts,ConstantsYtsEnum); … … 144 145 parameters->AddObject(new TransientParam(SurfaceforcingsDelta18oSurfaceEnum,&temp[0],&temp[M],M)); 145 146 iomodel->DeleteData(temp,SurfaceforcingsDelta18oSurfaceEnum); 147 } 148 if(isd18opd){ 149 iomodel->Constant(&yts,ConstantsYtsEnum); 150 151 iomodel->FetchData(&temp,&N,&M,SurfaceforcingsDelta18oEnum); _assert_(N==2); 152 for(i=0;i<M;i++) temp[M+i]=yts*temp[M+i]; 153 parameters->AddObject(new TransientParam(SurfaceforcingsDelta18oEnum,&temp[0],&temp[M],M)); 154 iomodel->DeleteData(temp,SurfaceforcingsDelta18oEnum); 155 156 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsDpermilEnum)); 146 157 } 147 158 break; -
issm/trunk-jpl/src/c/modules/SurfaceMassBalancex/SurfaceMassBalancex.cpp
r18968 r19172 11 11 /*Intermediaties*/ 12 12 int smb_model; 13 bool isdelta18o,ismungsm ;13 bool isdelta18o,ismungsm,isd18opd; 14 14 15 15 /*First, get SMB model from parameters*/ … … 24 24 femmodel->parameters->FindParam(&isdelta18o,SurfaceforcingsIsdelta18oEnum); 25 25 femmodel->parameters->FindParam(&ismungsm,SurfaceforcingsIsmungsmEnum); 26 femmodel->parameters->FindParam(&isd18opd,SurfaceforcingsIsd18opdEnum); 26 27 if(isdelta18o){ 27 28 if(VerboseSolution()) _printf0_(" call Delta18oParameterization module\n"); … … 31 32 if(VerboseSolution()) _printf0_(" call MungsmtpParameterization module\n"); 32 33 MungsmtpParameterizationx(femmodel); 34 } 35 if(isd18opd){ 36 if(VerboseSolution()) _printf0_(" call Delta18opdParameterization module\n"); 37 Delta18opdParameterizationx(femmodel); 33 38 } 34 39 if(VerboseSolution()) _printf0_(" call positive degree day module\n"); … … 128 133 Element* element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i)); 129 134 element->MungsmtpParameterization(); 135 } 136 137 }/*}}}*/ 138 void Delta18opdParameterizationx(FemModel* femmodel){/*{{{*/ 139 140 for(int i=0;i<femmodel->elements->Size();i++){ 141 Element* element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i)); 142 element->Delta18opdParameterization(); 130 143 } 131 144 -
issm/trunk-jpl/src/c/modules/SurfaceMassBalancex/SurfaceMassBalancex.h
r18968 r19172 13 13 void Delta18oParameterizationx(FemModel* femmodel); 14 14 void MungsmtpParameterizationx(FemModel* femmodel); 15 void Delta18opdParameterizationx(FemModel* femmodel); 15 16 void PositiveDegreeDayx(FemModel* femmodel); 16 17 void SmbHenningx(FemModel* femmodel); -
issm/trunk-jpl/src/c/shared/Elements/PddSurfaceMassBalance.cpp
r18968 r19172 90 90 Tsurf = tstar*deltm+Tsurf; 91 91 92 /*********compute PD ****************/93 if (tstar < PDup){94 pd = 1.;95 if (tstar >= -siglimc){ pd = pds[reCast<int,IssmDouble>(tstar/DT + siglim0c)];}}96 else {97 pd = 0.;}98 99 /******exp des/elev precip reduction*******/100 sp=(s-s0p)/1000.-deselcut; // deselev effect is wrt chng in topo101 if (sp>0.0){q = exp(-desfac*sp);}102 else {q = 1.0;}103 104 qmt= qmt + monthlyprec[imonth]*sconv; //*sconv to convert in m of ice equivalent per month105 qmpt= q*monthlyprec[imonth]*sconv;106 qmp= qmp + qmpt;107 qm= qm + qmpt*pd;108 109 /*********compute PDD************/110 // ndd(month)=-(tstar-pdd(month)) since ndd+pdd gives expectation of111 // gaussian=T_m, so ndd=-(Tsurf-pdd)112 if (iqj>5 && iqj<9){ Tsum=Tsum+tstar;}113 114 if (tstar >= siglim) {pdd = pdd + tstar*deltm;}115 else if (tstar> -siglim){116 pddsig=pdds[reCast<int,IssmDouble>(tstar/DT + siglim0)];117 pdd = pdd + pddsig*deltm;118 frzndd = frzndd - (tstar-pddsig)*deltm;}119 else{frzndd = frzndd - tstar*deltm; }120 121 /*Assign output pointer*/122 *(monthlytemperatures+imonth) = monthlytemperatures[imonth];123 *(monthlyprec+imonth) = monthlyprec[imonth];92 /*********compute PD ****************/ 93 if (tstar < PDup){ 94 pd = 1.; 95 if (tstar >= -siglimc){ pd = pds[reCast<int,IssmDouble>(tstar/DT + siglim0c)];}} 96 else { 97 pd = 0.;} 98 99 /******exp des/elev precip reduction*******/ 100 sp=(s-s0p)/1000.-deselcut; // deselev effect is wrt chng in topo 101 if (sp>0.0){q = exp(-desfac*sp);} 102 else {q = 1.0;} 103 104 qmt= qmt + monthlyprec[imonth]*sconv; //*sconv to convert in m of ice equivalent per month 105 qmpt= q*monthlyprec[imonth]*sconv; 106 qmp= qmp + qmpt; 107 qm= qm + qmpt*pd; 108 109 /*********compute PDD************/ 110 // ndd(month)=-(tstar-pdd(month)) since ndd+pdd gives expectation of 111 // gaussian=T_m, so ndd=-(Tsurf-pdd) 112 if (iqj>5 && iqj<9){ Tsum=Tsum+tstar;} 113 114 if (tstar >= siglim) {pdd = pdd + tstar*deltm;} 115 else if (tstar> -siglim){ 116 pddsig=pdds[reCast<int,IssmDouble>(tstar/DT + siglim0)]; 117 pdd = pdd + pddsig*deltm; 118 frzndd = frzndd - (tstar-pddsig)*deltm;} 119 else{frzndd = frzndd - tstar*deltm; } 120 121 /*Assign output pointer*/ 122 *(monthlytemperatures+imonth) = monthlytemperatures[imonth]; 123 *(monthlyprec+imonth) = monthlyprec[imonth]; 124 124 } // end of seasonal loop 125 125 //****************************************************************** 126 126 127 saccu = qm;128 prect = qmp; // total precipitation during 1 year taking into account des. ef.129 Tsum=Tsum/3;130 131 /***** determine PDD factors *****/132 if(Tsum< -1.) {133 snwmf=2.65*0.001; // ablation factor for snow per positive degree day.*0.001 to go from mm to m/ppd134 smf=17.22*0.001; // ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002)135 }136 else if(Tsum< 10){137 snwmf = (0.15*Tsum + 2.8)*0.001;138 smf = (0.0067*pow((10.-Tsum),3) + 8.3)*0.001;139 }140 else{141 snwmf=4.3*0.001;142 smf=8.3*0.001;143 }144 snwmf=0.95*snwmf;145 smf=0.95*smf;146 147 /***** compute PDD ablation and refreezing *****/148 pddt = pdd *365;149 snwm = snwmf*pddt; // snow that could have been melted in a year150 hmx2 = min(h,dfrz); // refreeze active layer max depth: dfrz151 152 if(snwm < saccu) {153 water=prect-saccu + snwm; //water=rain + snowmelt154 // l 2.2= capillary factor155 // Should refreezing be controlled by frzndd or by mean annual Tsurf?156 // dCovrLm concept is of warming of active layer (thickness =d@=1-157 // >2m)158 // problem with water seepage into ice: should be sealed after159 // refreezing160 // so everything needs to be predicated on 1 year scale, except for161 // thermal162 // conductivity through ice163 // also, need to account that melt season has low accum, so what's164 // going to165 // hold the meltwater around for refreezing? And melt-time will have166 // low seasonal frzndd167 168 // Superimposed ice : Pfeffer et al. 1991, Tarasov 2002169 170 supice= min(hmx2*CovrLm*frzndd+2.2*(saccu-snwm), water); // superimposed ice171 supcap=min(2.2*(saccu-snwm),water);172 runoff=snwm - supice; //meltwater only, does not include rain173 }174 else { //all snow melted175 supice= min(hmx2*CovrLm*frzndd, prect );176 runoff= saccu + smf*(pddt-saccu/snwmf) - supice;177 supcap=0;178 }179 // pdd melting doesn't cool Tsurf, so ndd refreeze shouldn't warm it180 // except pdd melt heat source is atmosphere, while refreeze is181 // ground/ice stored interim182 // assume pdd=ndd, then melt should equal refreeze and Tsurf should=0183 // assume ndd=2*pdd, then all supice is refrozen, but Tsurf should be184 // <0185 // assume ndd>pdd, little melt => little supice186 // bottom line: compare for Tsurf<0 : supice and no supice case,187 // expect Tsurf difference188 // except some of cooling flux comes from atmosphere//189 // 1 dm supice should not raise Tsurf by 1/dCovrLm = 16.675C190 // does supice make sense when H< 0.1m? then d=thermoactive ice layer ////191 // < 0.1192 193 // make more sense to just use residual pdd-ndd except that pdd194 // residual not clear yet195 // frzndd should not be used up by refreezing in snow, so stick in196 // supcap.197 diffndd=0;198 if (frzndd>0) {199 diffndd=fsupndd*min((supice-supcap)/dCovrLm ,frzndd);200 frzndd=frzndd-diffndd;201 }202 if(runoff<0){203 saccu= saccu -runoff;204 smelt = 0;205 precrunoff=prect-saccu;206 //here assume pdd residual is 0, =>207 Tsurf= max(Tsurf,-frzndd);208 }209 else {210 smelt = runoff;211 precrunoff=prect-max(0.,supice)-saccu;}212 //here really need pdd balance, try 0.5 fudge factor?213 //at least runoff>0 => it's fairly warm, so Tsurf is !<<0,214 //yet from site plots, can be ice free with Tsurf=-5.5C215 if(Tsurf<0) {216 Tsurf= min(Tsurf+fsupT*diffndd , 0.);}217 218 B = -smelt+saccu;219 B = B/yts;220 pddtj=pddt;127 saccu = qm; 128 prect = qmp; // total precipitation during 1 year taking into account des. ef. 129 Tsum=Tsum/3; 130 131 /***** determine PDD factors *****/ 132 if(Tsum< -1.) { 133 snwmf=2.65*0.001; // ablation factor for snow per positive degree day.*0.001 to go from mm to m/ppd 134 smf=17.22*0.001; // ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002) 135 } 136 else if(Tsum< 10){ 137 snwmf = (0.15*Tsum + 2.8)*0.001; 138 smf = (0.0067*pow((10.-Tsum),3) + 8.3)*0.001; 139 } 140 else{ 141 snwmf=4.3*0.001; 142 smf=8.3*0.001; 143 } 144 snwmf=0.95*snwmf; 145 smf=0.95*smf; 146 147 /***** compute PDD ablation and refreezing *****/ 148 pddt = pdd *365; 149 snwm = snwmf*pddt; // snow that could have been melted in a year 150 hmx2 = min(h,dfrz); // refreeze active layer max depth: dfrz 151 152 if(snwm < saccu) { 153 water=prect-saccu + snwm; //water=rain + snowmelt 154 // l 2.2= capillary factor 155 // Should refreezing be controlled by frzndd or by mean annual Tsurf? 156 // dCovrLm concept is of warming of active layer (thickness =d@=1- 157 // >2m) 158 // problem with water seepage into ice: should be sealed after 159 // refreezing 160 // so everything needs to be predicated on 1 year scale, except for 161 // thermal 162 // conductivity through ice 163 // also, need to account that melt season has low accum, so what's 164 // going to 165 // hold the meltwater around for refreezing? And melt-time will have 166 // low seasonal frzndd 167 168 // Superimposed ice : Pfeffer et al. 1991, Tarasov 2002 169 170 supice= min(hmx2*CovrLm*frzndd+2.2*(saccu-snwm), water); // superimposed ice 171 supcap=min(2.2*(saccu-snwm),water); 172 runoff=snwm - supice; //meltwater only, does not include rain 173 } 174 else { //all snow melted 175 supice= min(hmx2*CovrLm*frzndd, prect ); 176 runoff= saccu + smf*(pddt-saccu/snwmf) - supice; 177 supcap=0; 178 } 179 // pdd melting doesn't cool Tsurf, so ndd refreeze shouldn't warm it 180 // except pdd melt heat source is atmosphere, while refreeze is 181 // ground/ice stored interim 182 // assume pdd=ndd, then melt should equal refreeze and Tsurf should=0 183 // assume ndd=2*pdd, then all supice is refrozen, but Tsurf should be 184 // <0 185 // assume ndd>pdd, little melt => little supice 186 // bottom line: compare for Tsurf<0 : supice and no supice case, 187 // expect Tsurf difference 188 // except some of cooling flux comes from atmosphere// 189 // 1 dm supice should not raise Tsurf by 1/dCovrLm = 16.675C 190 // does supice make sense when H< 0.1m? then d=thermoactive ice layer //// 191 // < 0.1 192 193 // make more sense to just use residual pdd-ndd except that pdd 194 // residual not clear yet 195 // frzndd should not be used up by refreezing in snow, so stick in 196 // supcap. 197 diffndd=0; 198 if (frzndd>0) { 199 diffndd=fsupndd*min((supice-supcap)/dCovrLm ,frzndd); 200 frzndd=frzndd-diffndd; 201 } 202 if(runoff<0){ 203 saccu= saccu -runoff; 204 smelt = 0; 205 precrunoff=prect-saccu; 206 //here assume pdd residual is 0, => 207 Tsurf= max(Tsurf,-frzndd); 208 } 209 else { 210 smelt = runoff; 211 precrunoff=prect-max(0.,supice)-saccu;} 212 //here really need pdd balance, try 0.5 fudge factor? 213 //at least runoff>0 => it's fairly warm, so Tsurf is !<<0, 214 //yet from site plots, can be ice free with Tsurf=-5.5C 215 if(Tsurf<0) { 216 Tsurf= min(Tsurf+fsupT*diffndd , 0.);} 217 218 B = -smelt+saccu; 219 B = B/yts; 220 pddtj=pddt; 221 221 222 222 return B; -
issm/trunk-jpl/src/c/shared/Elements/elements.h
r18968 r19172 28 28 IssmDouble* TemperaturesLgm, IssmDouble* TemperaturesPresentday, 29 29 IssmDouble* monthlytemperaturesout, IssmDouble* monthlyprecout); 30 void ComputeD18OTemperaturePrecipitationFromPD(IssmDouble d018,IssmDouble dpermil, 31 IssmDouble* PrecipitationPresentday,IssmDouble* TemperaturePresentday, 32 IssmDouble* monthlytemperaturesout, IssmDouble* monthlyprecout); 30 33 IssmDouble DrainageFunctionWaterfraction(IssmDouble waterfraction, IssmDouble dt=0.); 31 34 IssmDouble StressIntensityIntegralWeight(IssmDouble depth, IssmDouble water_depth, IssmDouble thickness); -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r19158 r19172 348 348 SurfaceforcingsIsdelta18oEnum, 349 349 SurfaceforcingsIsmungsmEnum, 350 SurfaceforcingsIsd18opdEnum, 350 351 SurfaceforcingsPrecipitationsPresentdayEnum, 351 352 SurfaceforcingsPrecipitationsLgmEnum, … … 361 362 SurfaceforcingsTdiffEnum, 362 363 SurfaceforcingsSealevEnum, 364 SurfaceforcingsDpermilEnum, 363 365 SMBgradientsEnum, 364 366 SurfaceforcingsMonthlytemperaturesEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r19158 r19172 354 354 case SurfaceforcingsIsdelta18oEnum : return "SurfaceforcingsIsdelta18o"; 355 355 case SurfaceforcingsIsmungsmEnum : return "SurfaceforcingsIsmungsm"; 356 case SurfaceforcingsIsd18opdEnum : return "SurfaceforcingsIsd18opd"; 356 357 case SurfaceforcingsPrecipitationsPresentdayEnum : return "SurfaceforcingsPrecipitationsPresentday"; 357 358 case SurfaceforcingsPrecipitationsLgmEnum : return "SurfaceforcingsPrecipitationsLgm"; … … 367 368 case SurfaceforcingsTdiffEnum : return "SurfaceforcingsTdiff"; 368 369 case SurfaceforcingsSealevEnum : return "SurfaceforcingsSealev"; 370 case SurfaceforcingsDpermilEnum : return "SurfaceforcingsDpermil"; 369 371 case SMBgradientsEnum : return "SMBgradients"; 370 372 case SurfaceforcingsMonthlytemperaturesEnum : return "SurfaceforcingsMonthlytemperatures"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r19158 r19172 360 360 else if (strcmp(name,"SurfaceforcingsIsdelta18o")==0) return SurfaceforcingsIsdelta18oEnum; 361 361 else if (strcmp(name,"SurfaceforcingsIsmungsm")==0) return SurfaceforcingsIsmungsmEnum; 362 else if (strcmp(name,"SurfaceforcingsIsd18opd")==0) return SurfaceforcingsIsd18opdEnum; 362 363 else if (strcmp(name,"SurfaceforcingsPrecipitationsPresentday")==0) return SurfaceforcingsPrecipitationsPresentdayEnum; 363 364 else if (strcmp(name,"SurfaceforcingsPrecipitationsLgm")==0) return SurfaceforcingsPrecipitationsLgmEnum; … … 373 374 else if (strcmp(name,"SurfaceforcingsTdiff")==0) return SurfaceforcingsTdiffEnum; 374 375 else if (strcmp(name,"SurfaceforcingsSealev")==0) return SurfaceforcingsSealevEnum; 376 else if (strcmp(name,"SurfaceforcingsDpermil")==0) return SurfaceforcingsDpermilEnum; 375 377 else if (strcmp(name,"SMBgradients")==0) return SMBgradientsEnum; 376 378 else if (strcmp(name,"SurfaceforcingsMonthlytemperatures")==0) return SurfaceforcingsMonthlytemperaturesEnum; … … 381 383 else if (strcmp(name,"SMBhenning")==0) return SMBhenningEnum; 382 384 else if (strcmp(name,"SMBcomponents")==0) return SMBcomponentsEnum; 383 else if (strcmp(name,"SurfaceforcingsAccumulation")==0) return SurfaceforcingsAccumulationEnum;384 else if (strcmp(name,"SurfaceforcingsEvaporation")==0) return SurfaceforcingsEvaporationEnum;385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"SurfaceforcingsRunoff")==0) return SurfaceforcingsRunoffEnum; 388 if (strcmp(name,"SurfaceforcingsAccumulation")==0) return SurfaceforcingsAccumulationEnum; 389 else if (strcmp(name,"SurfaceforcingsEvaporation")==0) return SurfaceforcingsEvaporationEnum; 390 else if (strcmp(name,"SurfaceforcingsRunoff")==0) return SurfaceforcingsRunoffEnum; 389 391 else if (strcmp(name,"SMBmeltcomponents")==0) return SMBmeltcomponentsEnum; 390 392 else if (strcmp(name,"SurfaceforcingsMelt")==0) return SurfaceforcingsMeltEnum; … … 504 506 else if (strcmp(name,"Penpair")==0) return PenpairEnum; 505 507 else if (strcmp(name,"Profiler")==0) return ProfilerEnum; 506 else if (strcmp(name,"MatrixParam")==0) return MatrixParamEnum;507 else if (strcmp(name,"Masscon")==0) return MassconEnum;508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"MassconName")==0) return MassconNameEnum; 511 if (strcmp(name,"MatrixParam")==0) return MatrixParamEnum; 512 else if (strcmp(name,"Masscon")==0) return MassconEnum; 513 else if (strcmp(name,"MassconName")==0) return MassconNameEnum; 512 514 else if (strcmp(name,"MassconDefinitionenum")==0) return MassconDefinitionenumEnum; 513 515 else if (strcmp(name,"MassconLevelset")==0) return MassconLevelsetEnum; … … 627 629 else if (strcmp(name,"DeviatoricStressxx")==0) return DeviatoricStressxxEnum; 628 630 else if (strcmp(name,"DeviatoricStressxy")==0) return DeviatoricStressxyEnum; 629 else if (strcmp(name,"DeviatoricStressxz")==0) return DeviatoricStressxzEnum;630 else if (strcmp(name,"DeviatoricStressyy")==0) return DeviatoricStressyyEnum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"DeviatoricStressyz")==0) return DeviatoricStressyzEnum; 634 if (strcmp(name,"DeviatoricStressxz")==0) return DeviatoricStressxzEnum; 635 else if (strcmp(name,"DeviatoricStressyy")==0) return DeviatoricStressyyEnum; 636 else if (strcmp(name,"DeviatoricStressyz")==0) return DeviatoricStressyzEnum; 635 637 else if (strcmp(name,"DeviatoricStresszz")==0) return DeviatoricStresszzEnum; 636 638 else if (strcmp(name,"StrainRate")==0) return StrainRateEnum; … … 750 752 else if (strcmp(name,"Outputdefinition70")==0) return Outputdefinition70Enum; 751 753 else if (strcmp(name,"Outputdefinition71")==0) return Outputdefinition71Enum; 752 else if (strcmp(name,"Outputdefinition72")==0) return Outputdefinition72Enum;753 else if (strcmp(name,"Outputdefinition73")==0) return Outputdefinition73Enum;754 754 else stage=7; 755 755 } 756 756 if(stage==7){ 757 if (strcmp(name,"Outputdefinition74")==0) return Outputdefinition74Enum; 757 if (strcmp(name,"Outputdefinition72")==0) return Outputdefinition72Enum; 758 else if (strcmp(name,"Outputdefinition73")==0) return Outputdefinition73Enum; 759 else if (strcmp(name,"Outputdefinition74")==0) return Outputdefinition74Enum; 758 760 else if (strcmp(name,"Outputdefinition75")==0) return Outputdefinition75Enum; 759 761 else if (strcmp(name,"Outputdefinition76")==0) return Outputdefinition76Enum; … … 873 875 else if (strcmp(name,"XY")==0) return XYEnum; 874 876 else if (strcmp(name,"XYZ")==0) return XYZEnum; 875 else if (strcmp(name,"Dense")==0) return DenseEnum;876 else if (strcmp(name,"MpiDense")==0) return MpiDenseEnum;877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"MpiSparse")==0) return MpiSparseEnum; 880 if (strcmp(name,"Dense")==0) return DenseEnum; 881 else if (strcmp(name,"MpiDense")==0) return MpiDenseEnum; 882 else if (strcmp(name,"MpiSparse")==0) return MpiSparseEnum; 881 883 else if (strcmp(name,"Seq")==0) return SeqEnum; 882 884 else if (strcmp(name,"Mpi")==0) return MpiEnum; -
issm/trunk-jpl/src/m/classes/SMBpdd.m
r19040 r19172 12 12 s0t = 0; 13 13 rlaps = 0; 14 rlapslgm = 0; 14 rlapslgm = 0; 15 dpermil = 0; 15 16 Pfac = NaN; 16 17 Tdiff = NaN; … … 18 19 isdelta18o = 0; 19 20 ismungsm = 0; 21 isd18opd = 0; 20 22 delta18o = NaN; 21 23 delta18o_surface = NaN; … … 35 37 end % }}} 36 38 function self = extrude(self,md) % {{{ 37 if(self.isdelta18o==0 & self.ismungsm==0 ),self.precipitation=project3d(md,'vector',self.precipitation,'type','node');end38 if(self.isdelta18o==0 & self.ismungsm==0 ),self.monthlytemperatures=project3d(md,'vector',self.monthlytemperatures,'type','node');end39 if(self.isdelta18o==0 & self.ismungsm==0 & self.isd18opd==0),self.precipitation=project3d(md,'vector',self.precipitation,'type','node');end 40 if(self.isdelta18o==0 & self.ismungsm==0 & self.isd18opd==0),self.monthlytemperatures=project3d(md,'vector',self.monthlytemperatures,'type','node');end 39 41 if(self.isdelta18o),self.temperatures_lgm=project3d(md,'vector',self.temperatures_lgm,'type','node');end 40 42 if(self.isdelta18o),self.temperatures_presentday=project3d(md,'vector',self.temperatures_presentday,'type','node');end … … 45 47 if(self.ismungsm),self.precipitations_presentday=project3d(md,'vector',self.precipitations_presentday,'type','node');end 46 48 if(self.ismungsm),self.precipitations_lgm=project3d(md,'vector',self.precipitations_lgm,'type','node');end 49 if(self.isd18opd),self.temperatures_presentday=project3d(md,'vector',self.temperatures_presentday,'type','node');end 50 if(self.isd18opd),self.precipitations_presentday=project3d(md,'vector',self.precipitations_presentday,'type','node');end 47 51 48 52 end % }}} … … 59 63 self.isdelta18o = 0; 60 64 self.ismungsm = 0; 65 self.isd18opd = 0; 61 66 self.desfac = 0.5; 62 67 self.s0p = 0; … … 64 69 self.rlaps = 6.5; 65 70 self.rlapslgm = 6.5; 71 self.dpermil = 2.4; 66 72 67 73 end % }}} … … 74 80 md = checkfield(md,'fieldname','surfaceforcings.rlaps','>=',0,'numel',1); 75 81 md = checkfield(md,'fieldname','surfaceforcings.rlapslgm','>=',0,'numel',1); 76 if(self.isdelta18o==0 & self.ismungsm==0 )82 if(self.isdelta18o==0 & self.ismungsm==0 & self.isd18opd==0) 77 83 md = checkfield(md,'fieldname','surfaceforcings.monthlytemperatures','timeseries',1,'NaN',1); 78 84 md = checkfield(md,'fieldname','surfaceforcings.precipitation','timeseries',1,'NaN',1); … … 94 100 md = checkfield(md,'fieldname','surfaceforcings.Tdiff','NaN',1); 95 101 md = checkfield(md,'fieldname','surfaceforcings.sealev','NaN',1); 102 elseif(self.isd18opd==1) 103 md = checkfield(md,'fieldname','surfaceforcings.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1); 104 md = checkfield(md,'fieldname','surfaceforcings.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1); 105 md = checkfield(md,'fieldname','surfaceforcings.delta18o','NaN',1); 106 md = checkfield(md,'fieldname','surfaceforcings.dpermil','>=',0,'numel',1); 96 107 end 97 108 end … … 103 114 fielddisplay(self,'isdelta18o','is temperature and precipitation delta18o parametrisation activated (0 or 1, default is 0)'); 104 115 fielddisplay(self,'ismungsm','is temperature and precipitation mungsm parametrisation activated (0 or 1, default is 0)'); 116 fielddisplay(self,'isd18opd','is delta18o parametrisation from present day temperature and precipitation activated (0 or 1, default is 0)'); 105 117 fielddisplay(self,'desfac','desertification elevation factor (between 0 and 1, default is 0.5) [m]'); 106 118 fielddisplay(self,'s0p','should be set to elevation from precip source (between 0 and a few 1000s m, default is 0) [m]'); … … 108 120 fielddisplay(self,'rlaps','present day lapse rate [degree/km]'); 109 121 fielddisplay(self,'rlapslgm','LGM lapse rate [degree/km]'); 110 if(self.isdelta18o==0 & self.ismungsm==0 )122 if(self.isdelta18o==0 & self.ismungsm==0 & self.isd18opd==0) 111 123 fielddisplay(self,'monthlytemperatures',['monthly surface temperatures [K], required if pdd is activated and delta18o not activated']); 112 124 fielddisplay(self,'precipitation',['monthly surface precipitation [m/yr water eq], required if pdd is activated and delta18o or mungsm not activated']); … … 116 128 fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm is activated'); 117 129 fielddisplay(self,'temperatures_lgm','monthly LGM surface temperatures [K], required if delta18o or mungsm is activated'); 118 fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o or mungsmis activated');119 fielddisplay(self,'precipitations_lgm','monthly surface precipitation [m/yr water eq], required if delta18o ormungsm is activated');130 fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm/d18opd is activated'); 131 fielddisplay(self,'precipitations_lgm','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm is activated'); 120 132 fielddisplay(self,'Tdiff','time interpolation parameter for temperature, 1D(year), required if mungsm is activated'); 121 133 fielddisplay(self,'sealev','sea level [m], 1D(year), required if mungsm is activated'); 122 134 elseif(self.ismungsm==1) 123 fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm is activated');135 fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm/d18opd is activated'); 124 136 fielddisplay(self,'temperatures_lgm','monthly LGM surface temperatures [K], required if delta18o or mungsm is activated'); 125 fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o or mungsmis activated');126 fielddisplay(self,'precipitations_lgm','monthly surface precipitation [m/yr water eq], required if delta18o ormungsm is activated');137 fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm/d18opd is activated'); 138 fielddisplay(self,'precipitations_lgm','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm is activated'); 127 139 fielddisplay(self,'Pfac','time interpolation parameter for precipitation, 1D(year), required if mungsm is activated'); 128 140 fielddisplay(self,'Tdiff','time interpolation parameter for temperature, 1D(year), required if mungsm is activated'); 129 141 fielddisplay(self,'sealev','sea level [m], 1D(year), required if mungsm is activated'); 142 elseif(self.isd18opd==1) 143 fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm/d18opd is activated'); 144 fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm/d18opd is activated'); 145 fielddisplay(self,'delta18o','delta18o, required if pdd is activated and d18opd activated'); 146 fielddisplay(self,'dpermil','degree per mil, required if d18opd is activated'); 130 147 end 131 148 end % }}} … … 138 155 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','isdelta18o','format','Boolean'); 139 156 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','ismungsm','format','Boolean'); 157 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','isd18opd','format','Boolean'); 140 158 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','desfac','format','Double'); 141 159 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','s0p','format','Double'); … … 144 162 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','rlapslgm','format','Double'); 145 163 146 if(self.isdelta18o==0 & self.ismungsm==0 )164 if(self.isdelta18o==0 & self.ismungsm==0 & self.isd18opd==0) 147 165 %WriteData(fid,'object',self,'class','surfaceforcings','fieldname','monthlytemperatures','format','DoubleMat','mattype',1); 148 166 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','monthlytemperatures','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1); … … 165 183 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1); 166 184 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1); 185 elseif self.isd18opd 186 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1); 187 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1); 188 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1); 189 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','dpermil','format','Double'); 167 190 end 168 191 end % }}} -
issm/trunk-jpl/src/m/classes/clusters/acenet.m
r18717 r19172 68 68 fprintf(fid,'#$ -cwd\n'); 69 69 fprintf(fid,'#$ -N issm\n'); 70 %fprintf(fid,'#$ -l h_rt=25:00:0\n'); 71 %fprintf(fid,'#$ -l h_rt=47:59:00\n'); 72 %fprintf(fid,'#$ -l h_rt=72:00:0\n'); 73 fprintf(fid,'#$ -l h_rt=96:00:0\n'); 74 fprintf(fid,'#$ -l h_vmem=4G\n'); 75 fprintf(fid,'#$ -pe ompi* %i\n',cluster.np); 76 fprintf(fid,'#$ -j y\n'); 77 fprintf(fid,'#$ -l h=cl27*|cl28*|cl29*|cl30*|cl31*|cl320|cl267|cl268|cl269|cl338 \n'); 70 % fprintf(fid,'#$ -l h_rt=25:00:0\n'); 71 fprintf(fid,'#$ -l h_rt=47:59:00\n'); 72 % fprintf(fid,'#$ -l h_rt=72:00:0\n'); 73 % fprintf(fid,'#$ -l h_rt=96:00:0\n'); 74 % fprintf(fid,'#$ -l h_rt=336:00:0\n'); 75 76 fprintf(fid,'#$ -l h_vmem=3G\n'); 77 % if cluster.np>10 78 % fprintf(fid,'#$ -l h_vmem=3G\n'); 79 % else 80 % fprintf(fid,'#$ -l h_vmem=3G\n'); 81 % end 82 83 % ---- Which queue to use ---- 84 %fprintf(fid,'#$ -q !tarasov.q\n'); % 85 %fprintf(fid,'#$ -q medium.q@*,short.q@*\n'); 86 fprintf(fid,'#$ -q short.q@*\n'); 87 88 % ---- Which node are selected ---- 89 % fprintf(fid,'#$ -l h=cl27*|cl28*|cl29*|cl30*|cl31*|cl320|cl267|cl268|cl269|cl338 \n'); 90 %fprintf(fid,'#$ -l h=cl0* \n'); 78 91 %fprintf(fid,'#$ -l h=cl338 \n'); 79 %fprintf(fid,'#$ -pe openmp 20 \n'); 80 %fprintf(fid,'#$ -q !tarasov.q\n'); % 81 fprintf(fid,'#$ -pe openmp 8\n'); 92 % Acenet nodes with 16cpus and more than 60G mem 93 % fprintf(fid,'#$ -l h=cl001|cl002|cl003|cl004|cl005|cl006|cl007|cl008|cl009|cl010|cl011|cl012|cl021|cl022|cl023|cl024 \n'); 94 95 % ---- cpus on different nodes ---- 96 fprintf(fid,'#$ -pe ompi %i\n',cluster.np); % To avoid green acenet that does not have InfiniBand 97 % fprintf(fid,'#$ -pe ompi* %i\n',cluster.np); 98 % -------- All cpus in the same node -------- 99 % fprintf(fid,'#$ -pe openmp %i\n',cluster.np); 100 101 % ---- misc ---- 102 fprintf(fid,'#$ -j y\n'); 103 82 104 fprintf(fid,'module purge\n'); 83 105 %fprintf(fid,'module load gcc openmpi/gcc\n'); -
issm/trunk-jpl/src/m/enum/EnumDefinitions.py
r19158 r19172 346 346 def SurfaceforcingsIsdelta18oEnum(): return StringToEnum("SurfaceforcingsIsdelta18o")[0] 347 347 def SurfaceforcingsIsmungsmEnum(): return StringToEnum("SurfaceforcingsIsmungsm")[0] 348 def SurfaceforcingsIsd18opdEnum(): return StringToEnum("SurfaceforcingsIsd18opd")[0] 348 349 def SurfaceforcingsPrecipitationsPresentdayEnum(): return StringToEnum("SurfaceforcingsPrecipitationsPresentday")[0] 349 350 def SurfaceforcingsPrecipitationsLgmEnum(): return StringToEnum("SurfaceforcingsPrecipitationsLgm")[0] … … 359 360 def SurfaceforcingsTdiffEnum(): return StringToEnum("SurfaceforcingsTdiff")[0] 360 361 def SurfaceforcingsSealevEnum(): return StringToEnum("SurfaceforcingsSealev")[0] 362 def SurfaceforcingsDpermilEnum(): return StringToEnum("SurfaceforcingsDpermil")[0] 361 363 def SMBgradientsEnum(): return StringToEnum("SMBgradients")[0] 362 364 def SurfaceforcingsMonthlytemperaturesEnum(): return StringToEnum("SurfaceforcingsMonthlytemperatures")[0]
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/trac/issm/chrome/common/trac_banner.png)