Changeset 26047
- Timestamp:
- 03/08/21 17:46:39 (4 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 9 added
- 8 deleted
- 140 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/m4/analyses.m4
r26004 r26047 304 304 AC_MSG_RESULT($HAVE_HYDROLOGYSHREVE) 305 305 dnl }}} 306 dnl with-HydrologyTws{{{ 307 AC_ARG_WITH([HydrologyTws], 308 AS_HELP_STRING([--with-HydrologyTws = YES], [compile with HydrologyTws capabilities (default is yes)]), 309 [HYDROLOGYTWS=$withval],[HYDROLOGYTWS=yes]) 310 AC_MSG_CHECKING(for HydrologyTws capability compilation) 311 312 HAVE_HYDROLOGYTWS=no 313 if test "x$HYDROLOGYTWS" = "xyes"; then 314 HAVE_HYDROLOGYTWS=yes 315 AC_DEFINE([_HAVE_HYDROLOGYTWS_],[1],[with HydrologyTws capability]) 316 fi 317 AM_CONDITIONAL([HYDROLOGYTWS], [test x$HAVE_HYDROLOGYTWS = xyes]) 318 AC_MSG_RESULT($HAVE_HYDROLOGYTWS) 319 dnl }}} 306 320 dnl with-HydrologyGlaDS{{{ 307 321 AC_ARG_WITH([HydrologyGlaDS], … … 416 430 AC_MSG_RESULT($HAVE_MASSTRANSPORT) 417 431 dnl }}} 432 dnl with-Oceanmasstransport{{{ 433 AC_ARG_WITH([Oceanmasstransport], 434 AS_HELP_STRING([--with-Oceanmasstransport = YES], [compile with Oceanmasstransport capabilities (default is yes)]), 435 [OCEANMASSTRANSPORT=$withval],[OCEANMASSTRANSPORT=yes]) 436 AC_MSG_CHECKING(for Oceanmasstransport capability compilation) 437 438 HAVE_OCEANMASSTRANSPORT=no 439 if test "x$OCEANMASSTRANSPORT" = "xyes"; then 440 HAVE_OCEANMASSTRANSPORT=yes 441 AC_DEFINE([_HAVE_OCEANMASSTRANSPORT_],[1],[with Oceanmasstransport capability]) 442 fi 443 AM_CONDITIONAL([OCEANMASSTRANSPORT], [test x$HAVE_OCEANMASSTRANSPORT = xyes]) 444 AC_MSG_RESULT($HAVE_OCEANMASSTRANSPORT) 445 dnl }}} 418 446 dnl with-Melting{{{ 419 447 AC_ARG_WITH([Melting], -
issm/trunk-jpl/src/c/Makefile.am
r26046 r26047 194 194 ./toolkits/mpi/commops/GetOwnershipBoundariesFromRange.cpp \ 195 195 ./toolkits/ToolkitOptions.cpp \ 196 ./modules/MmeToInputFromIdx/MmeToInputFromIdx.cpp\ 196 197 ./modules/ModelProcessorx/ModelProcessorx.cpp \ 197 198 ./modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp \ … … 268 269 ./cores/steadystate_core.cpp \ 269 270 ./cores/masstransport_core.cpp \ 271 ./cores/oceantransport_core.cpp \ 270 272 ./cores/depthaverage_core.cpp \ 271 273 ./cores/extrudefrombase_core.cpp \ … … 450 452 issm_sources += ./analyses/HydrologyShreveAnalysis.cpp 451 453 endif 454 if HYDROLOGYTWS 455 issm_sources += ./analyses/HydrologyTwsAnalysis.cpp 456 endif 457 452 458 if HYDROLOGYSHAKTI 453 459 issm_sources += ./analyses/HydrologyShaktiAnalysis.cpp … … 473 479 if MASSTRANSPORT 474 480 issm_sources += ./analyses/MasstransportAnalysis.cpp 481 endif 482 if OCEANMASSTRANSPORT 483 issm_sources += ./analyses/OceantransportAnalysis.cpp 475 484 endif 476 485 if SMB … … 512 521 if FORTRAN 513 522 issm_sources += \ 514 ./cores/gia_core.cpp \515 ./analyses/GiaAnalysis.cpp \516 523 ./modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp \ 517 524 ./modules/GiaDeflectionCorex/distme.f \ -
issm/trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.cpp
r25439 r26047 28 28 /*Finite Element Analysis*/ 29 29 void AdjointBalancethickness2Analysis::Core(FemModel* femmodel){/*{{{*/ 30 _error_("not implemented"); 31 }/*}}}*/ 32 void AdjointBalancethickness2Analysis::PreCore(FemModel* femmodel){/*{{{*/ 30 33 _error_("not implemented"); 31 34 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/AdjointBalancethicknessAnalysis.cpp
r25439 r26047 28 28 /*Finite Element Analysis*/ 29 29 void AdjointBalancethicknessAnalysis::Core(FemModel* femmodel){/*{{{*/ 30 _error_("not implemented"); 31 }/*}}}*/ 32 void AdjointBalancethicknessAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 30 33 _error_("not implemented"); 31 34 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/AdjointBalancethicknessAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.cpp
r26038 r26047 28 28 /*Finite Element Analysis*/ 29 29 void AdjointHorizAnalysis::Core(FemModel* femmodel){/*{{{*/ 30 _error_("not implemented"); 31 }/*}}}*/ 32 void AdjointHorizAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 30 33 _error_("not implemented"); 31 34 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/Analysis.h
r25379 r26047 39 39 virtual void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false)=0; 40 40 virtual int DofsPerNode(int** doflist,int domaintype,int approximation)=0; 41 virtual void UpdateElements(Elements* elements,Inputs* inputs, IoModel* iomodel,int analysis_counter,int analysis_type)=0;41 virtual void UpdateElements(Elements* elements,Inputs* inputs, IoModel* iomodel,int analysis_counter,int analysis_type)=0; 42 42 virtual void UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum)=0; 43 43 44 44 /*Finite element Analysis*/ 45 45 virtual void Core(FemModel* femmodel)=0; 46 virtual void PreCore(FemModel* femmodel)=0; 46 47 virtual ElementVector* CreateDVector(Element* element)=0; 47 48 virtual ElementMatrix* CreateJacobianMatrix(Element* element)=0; -
issm/trunk-jpl/src/c/analyses/Balancethickness2Analysis.cpp
r25763 r26047 32 32 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 33 33 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 34 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);34 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 35 35 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 36 36 iomodel->FetchDataToInput(inputs,elements,"md.initialization.vx",VxEnum); … … 57 57 /*Finite Element Analysis*/ 58 58 void Balancethickness2Analysis::Core(FemModel* femmodel){/*{{{*/ 59 _error_("not implemented yet"); 60 }/*}}}*/ 61 void Balancethickness2Analysis::PreCore(FemModel* femmodel){/*{{{*/ 59 62 _error_("not implemented yet"); 60 63 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/Balancethickness2Analysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/BalancethicknessAnalysis.cpp
r25763 r26047 99 99 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 100 100 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 101 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);101 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 102 102 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 103 103 iomodel->FetchDataToInput(inputs,elements,"md.initialization.vx",VxEnum); … … 118 118 /*Finite Element Analysis*/ 119 119 void BalancethicknessAnalysis::Core(FemModel* femmodel){/*{{{*/ 120 _error_("not implemented"); 121 }/*}}}*/ 122 void BalancethicknessAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 120 123 _error_("not implemented"); 121 124 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/BalancethicknessAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/BalancethicknessSoftAnalysis.cpp
r25379 r26047 29 29 _error_("not implemented"); 30 30 }/*}}}*/ 31 void BalancethicknessSoftAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 32 _error_("not implemented"); 33 }/*}}}*/ 31 34 ElementVector* BalancethicknessSoftAnalysis::CreateDVector(Element* element){/*{{{*/ 32 35 /*Default, return NULL*/ -
issm/trunk-jpl/src/c/analyses/BalancethicknessSoftAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/BalancevelocityAnalysis.cpp
r25763 r26047 41 41 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 42 42 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 43 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);43 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 44 44 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 45 45 iomodel->FetchDataToInput(inputs,elements,"md.initialization.vx",VxEnum); … … 59 59 /*Finite Element Analysis*/ 60 60 void BalancevelocityAnalysis::Core(FemModel* femmodel){/*{{{*/ 61 _error_("not implemented"); 62 }/*}}}*/ 63 void BalancevelocityAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 61 64 _error_("not implemented"); 62 65 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/BalancevelocityAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.cpp
r25539 r26047 121 121 /*Finite Element Analysis*/ 122 122 void DamageEvolutionAnalysis::Core(FemModel* femmodel){/*{{{*/ 123 _error_("not implemented"); 124 }/*}}}*/ 125 void DamageEvolutionAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 123 126 _error_("not implemented"); 124 127 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 void CreateDamageFInput(Element* element); 25 26 void CreateDamageFInputArctan(Element* element); -
issm/trunk-jpl/src/c/analyses/DepthAverageAnalysis.cpp
r25439 r26047 38 38 /*Finite Element Analysis*/ 39 39 void DepthAverageAnalysis::Core(FemModel* femmodel){/*{{{*/ 40 _error_("not implemented"); 41 }/*}}}*/ 42 void DepthAverageAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 40 43 _error_("not implemented"); 41 44 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/DepthAverageAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
r25763 r26047 136 136 iomodel->FetchDataToInput(inputs,elements,"md.geometry.thickness",ThicknessEnum); 137 137 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 138 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);138 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 139 139 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 140 140 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); … … 548 548 549 549 }/*}}}*/ 550 void EnthalpyAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 551 _error_("not implemented"); 552 }/*}}}*/ 550 553 ElementVector* EnthalpyAnalysis::CreateDVector(Element* element){/*{{{*/ 551 554 /*Default, return NULL*/ -
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.h
r25379 r26047 26 26 static void ComputeBasalMeltingrate(Element* element); 27 27 void Core(FemModel* femmodel); 28 void PreCore(FemModel* femmodel); 28 29 ElementVector* CreateDVector(Element* element); 29 30 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/EnumToAnalysis.cpp
r26004 r26047 64 64 #ifdef _HAVE_GLHEIGHTADVECTION_ 65 65 case GLheightadvectionAnalysisEnum : return new GLheightadvectionAnalysis(); 66 #endif67 #ifdef _HAVE_GIA_68 case GiaAnalysisEnum : return new GiaAnalysis();69 66 #endif 70 67 #ifdef _HAVE_HYDROLOGYDCEFFICIENT_ -
issm/trunk-jpl/src/c/analyses/EnumToAnalysis.h
r25379 r26047 17 17 /*Finite element Analysis*/ 18 18 void Core(FemModel* femmodel); 19 void PreCore(FemModel* femmodel); 19 20 ElementVector* CreateDVector(Element* element); 20 21 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/EsaAnalysis.cpp
r25379 r26047 32 32 /*Create inputs: */ 33 33 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 34 iomodel->FetchDataToInput(inputs,elements,"md.esa.deltathickness", EsaDeltathicknessEnum);34 iomodel->FetchDataToInput(inputs,elements,"md.esa.deltathickness",DeltaIceThicknessEnum); 35 35 36 36 }/*}}}*/ … … 189 189 _error_("not implemented"); 190 190 }/*}}}*/ 191 void EsaAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 192 _error_("not implemented"); 193 }/*}}}*/ 191 194 ElementVector* EsaAnalysis::CreateDVector(Element* element){/*{{{*/ 192 195 /*Default, return NULL*/ -
issm/trunk-jpl/src/c/analyses/EsaAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/ExtrapolationAnalysis.cpp
r25680 r26047 71 71 femmodel->RequestedOutputsx(&femmodel->results,&extvar_enum,1); 72 72 } 73 }/*}}}*/ 74 void ExtrapolationAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 75 _error_("not implemented"); 73 76 }/*}}}*/ 74 77 ElementVector* ExtrapolationAnalysis::CreateDVector(Element* element){/*{{{*/ -
issm/trunk-jpl/src/c/analyses/ExtrapolationAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/ExtrudeFromBaseAnalysis.cpp
r25439 r26047 38 38 /*Finite Element Analysis*/ 39 39 void ExtrudeFromBaseAnalysis::Core(FemModel* femmodel){/*{{{*/ 40 _error_("not implemented"); 41 }/*}}}*/ 42 void ExtrudeFromBaseAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 40 43 _error_("not implemented"); 41 44 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/ExtrudeFromBaseAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/ExtrudeFromTopAnalysis.cpp
r25439 r26047 38 38 /*Finite Element Analysis*/ 39 39 void ExtrudeFromTopAnalysis::Core(FemModel* femmodel){/*{{{*/ 40 _error_("not implemented"); 41 }/*}}}*/ 42 void ExtrudeFromTopAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 40 43 _error_("not implemented"); 41 44 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/ExtrudeFromTopAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.cpp
r25777 r26047 74 74 75 75 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 76 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);76 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 77 77 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 78 78 iomodel->FetchDataToInput(inputs,elements,"md.basalforcings.groundedice_melting_rate",BasalforcingsGroundediceMeltingRateEnum,0.); … … 127 127 /*Finite Element Analysis*/ 128 128 void FreeSurfaceBaseAnalysis::Core(FemModel* femmodel){/*{{{*/ 129 _error_("not implemented"); 130 }/*}}}*/ 131 void FreeSurfaceBaseAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 129 132 _error_("not implemented"); 130 133 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/FreeSurfaceTopAnalysis.cpp
r25763 r26047 77 77 78 78 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 79 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);79 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 80 80 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 81 81 iomodel->FetchDataToInput(inputs,elements,"md.initialization.vx",VxEnum); … … 101 101 /*Finite Element Analysis*/ 102 102 void FreeSurfaceTopAnalysis::Core(FemModel* femmodel){/*{{{*/ 103 _error_("not implemented"); 104 }/*}}}*/ 105 void FreeSurfaceTopAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 103 106 _error_("not implemented"); 104 107 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/FreeSurfaceTopAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/GLheightadvectionAnalysis.cpp
r25539 r26047 47 47 /*Finite Element Analysis*/ 48 48 void GLheightadvectionAnalysis::Core(FemModel* femmodel){/*{{{*/ 49 _error_("not implemented"); 50 }/*}}}*/ 51 void GLheightadvectionAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 49 52 _error_("not implemented"); 50 53 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/GLheightadvectionAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
r25539 r26047 154 154 /*Finite Element Analysis*/ 155 155 void HydrologyDCEfficientAnalysis::Core(FemModel* femmodel){/*{{{*/ 156 _error_("not implemented"); 157 }/*}}}*/ 158 void HydrologyDCEfficientAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 156 159 _error_("not implemented"); 157 160 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.h
r25379 r26047 25 25 /*Finite element Analysis*/ 26 26 void Core(FemModel* femmodel); 27 void PreCore(FemModel* femmodel); 27 28 ElementVector* CreateDVector(Element* element); 28 29 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
r25539 r26047 178 178 _error_("not implemented"); 179 179 }/*}}}*/ 180 void HydrologyDCInefficientAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 181 _error_("not implemented"); 182 }/*}}}*/ 180 183 ElementVector* HydrologyDCInefficientAnalysis::CreateDVector(Element* element){/*{{{*/ 181 184 /*Default, return NULL*/ -
issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.h
r25379 r26047 23 23 /*Finite element Analysis*/ 24 24 void Core(FemModel* femmodel); 25 void PreCore(FemModel* femmodel); 25 26 ElementVector* CreateDVector(Element* element); 26 27 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/HydrologyGlaDSAnalysis.cpp
r25763 r26047 129 129 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 130 130 iomodel->FetchDataToInput(inputs,elements,"md.geometry.bed",BedEnum); 131 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0); /*Needed for friction*/131 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 132 132 iomodel->FetchDataToInput(inputs,elements,"md.basalforcings.geothermalflux",BasalforcingsGeothermalfluxEnum); 133 133 iomodel->FetchDataToInput(inputs,elements,"md.basalforcings.groundedice_melting_rate",BasalforcingsGroundediceMeltingRateEnum); … … 213 213 /*Finite Element Analysis*/ 214 214 void HydrologyGlaDSAnalysis::Core(FemModel* femmodel){/*{{{*/ 215 _error_("not implemented"); 216 }/*}}}*/ 217 void HydrologyGlaDSAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 215 218 _error_("not implemented"); 216 219 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/HydrologyGlaDSAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/HydrologyPismAnalysis.cpp
r25539 r26047 62 62 /*Finite Element Analysis*/ 63 63 void HydrologyPismAnalysis::Core(FemModel* femmodel){/*{{{*/ 64 _error_("not implemented"); 65 }/*}}}*/ 66 void HydrologyPismAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 64 67 _error_("not implemented"); 65 68 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/HydrologyPismAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/HydrologyShaktiAnalysis.cpp
r25539 r26047 160 160 /*Finite Element Analysis*/ 161 161 void HydrologyShaktiAnalysis::Core(FemModel* femmodel){/*{{{*/ 162 _error_("not implemented"); 163 }/*}}}*/ 164 void HydrologyShaktiAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 162 165 _error_("not implemented"); 163 166 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/HydrologyShaktiAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/HydrologyShreveAnalysis.cpp
r25763 r26047 58 58 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 59 59 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 60 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);60 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 61 61 if(iomodel->domaintype!=Domain2DhorizontalEnum){ 62 62 iomodel->FetchDataToInput(inputs,elements,"md.mesh.vertexonbase",MeshVertexonbaseEnum); … … 93 93 /*Finite Element Analysis*/ 94 94 void HydrologyShreveAnalysis::Core(FemModel* femmodel){/*{{{*/ 95 _error_("not implemented"); 96 }/*}}}*/ 97 void HydrologyShreveAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 95 98 _error_("not implemented"); 96 99 }/*}}}*/ … … 292 295 /*Fetch dof list and allocate solution vector*/ 293 296 element->GetDofListLocal(&doflist,NoneApproximationEnum,GsetEnum); 294 IssmDouble* values= xNew<IssmDouble>(numnodes);297 IssmDouble* watercolumn = xNew<IssmDouble>(numnodes); 295 298 296 299 /*Use the dof list to index into the solution vector: */ 297 300 for(int i=0;i<numnodes;i++){ 298 values[i]=solution[doflist[i]];299 if(xIsNan<IssmDouble>( values[i])) _error_("NaN found in solution vector");300 if(xIsInf<IssmDouble>( values[i])) _error_("Inf found in solution vector");301 if ( values[i]<10e-10) values[i]=10e-10; //correcting the water column to positive values301 watercolumn[i]=solution[doflist[i]]; 302 if(xIsNan<IssmDouble>(watercolumn[i])) _error_("NaN found in solution vector"); 303 if(xIsInf<IssmDouble>(watercolumn[i])) _error_("Inf found in solution vector"); 304 if (watercolumn[i]<10e-10) watercolumn[i]=10e-10; //correcting the water column to positive watercolumn 302 305 } 303 306 304 307 /*Add input to the element: */ 305 element->AddInput(WatercolumnEnum,values,element->GetElementType()); 308 element->AddInput(WatercolumnEnum,watercolumn,element->GetElementType()); 309 310 /*Also update the hydrological loads for the sealevel core: */ 311 IssmDouble* oldwatercolumn = xNew<IssmDouble>(numnodes); 312 IssmDouble* deltawatercolumn = xNew<IssmDouble>(numnodes); 313 314 element->GetInputListOnVertices(&watercolumn[0],WatercolumnEnum); 315 element->GetInputListOnVertices(&oldwatercolumn[0],WaterColumnOldEnum); 316 element->GetInputListOnVertices(&deltawatercolumn[0],AccumulatedDeltaTwsEnum); 317 for(int i=0;i<numnodes;i++){ 318 deltawatercolumn[i] += watercolumn[i]-oldwatercolumn[i]; 319 } 320 element->AddInput(AccumulatedDeltaTwsEnum,deltawatercolumn,P1Enum); 306 321 307 322 /*Free ressources:*/ 308 xDelete<IssmDouble>(values); 323 xDelete<IssmDouble>(oldwatercolumn); 324 xDelete<IssmDouble>(deltawatercolumn); 325 xDelete<IssmDouble>(watercolumn); 309 326 xDelete<int>(doflist); 310 327 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/HydrologyShreveAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 void CreateHydrologyWaterVelocityInput(Element* element); -
issm/trunk-jpl/src/c/analyses/L2ProjectionBaseAnalysis.cpp
r25763 r26047 41 41 42 42 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 43 44 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);43 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 44 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 45 45 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 46 46 if(iomodel->domaintype!=Domain2DhorizontalEnum & iomodel->domaintype!=Domain3DsurfaceEnum){ … … 54 54 /*Finite Element Analysis*/ 55 55 void L2ProjectionBaseAnalysis::Core(FemModel* femmodel){/*{{{*/ 56 _error_("not implemented"); 57 }/*}}}*/ 58 void L2ProjectionBaseAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 56 59 _error_("not implemented"); 57 60 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/L2ProjectionBaseAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/L2ProjectionEPLAnalysis.cpp
r25439 r26047 74 74 _error_("not implemented"); 75 75 }/*}}}*/ 76 void L2ProjectionEPLAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 77 _error_("not implemented"); 78 }/*}}}*/ 76 79 ElementVector* L2ProjectionEPLAnalysis::CreateDVector(Element* element){/*{{{*/ 77 80 /*Default, return NULL*/ -
issm/trunk-jpl/src/c/analyses/L2ProjectionEPLAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp
r25839 r26047 171 171 femmodel->RequestedOutputsx(&femmodel->results,&outputs[0],1); 172 172 } 173 }/*}}}*/ 174 void LevelsetAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 175 _error_("not implemented"); 173 176 }/*}}}*/ 174 177 ElementVector* LevelsetAnalysis::CreateDVector(Element* element){/*{{{*/ -
issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/LoveAnalysis.cpp
r25379 r26047 46 46 _error_(" not needed!"); 47 47 }/*}}}*/ 48 void LoveAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 49 _error_(" not needed!"); 50 }/*}}}*/ 48 51 ElementVector* LoveAnalysis::CreateDVector(Element* element){/*{{{*/ 49 52 _error_(" not needed!"); -
issm/trunk-jpl/src/c/analyses/LoveAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp
r25958 r26047 4 4 #include "../shared/shared.h" 5 5 #include "../modules/modules.h" 6 #include "../classes/Inputs/TransientInput.h" 6 7 7 8 #define FINITEELEMENT P1Enum … … 119 120 bool isoceancoupling; 120 121 bool issmb; 122 int grdmodel; 121 123 122 124 /*Fetch data needed: */ … … 148 150 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 149 151 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 150 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);152 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 151 153 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 152 154 iomodel->FetchDataToInput(inputs,elements,"md.mask.ocean_levelset",MaskOceanLevelsetEnum); … … 155 157 iomodel->FetchDataToInput(inputs,elements,"md.initialization.vy",VyEnum); 156 158 if(isgroundingline) iomodel->FetchDataToInput(inputs,elements,"md.geometry.bed",BedEnum); 157 /*Initialize cumdeltalthickness input*/158 InputUpdateFromConstantx(inputs,elements,0.,SealevelchangeCumDeltathicknessEnum);159 159 /*Initialize ThicknessResidual input*/ 160 160 InputUpdateFromConstantx(inputs,elements,0.,ThicknessResidualEnum); … … 226 226 } 227 227 228 /*Initialize sea level cumulated sea level loads :*/ 229 InputUpdateFromConstantx(inputs,elements,0.,AccumulatedDeltaIceThicknessEnum); 230 InputUpdateFromConstantx(inputs,elements,0.,OldAccumulatedDeltaIceThicknessEnum); 231 232 /*for Ivins deformation model, initialize history of ice thickness changes:*/ 233 iomodel->FindConstant(&grdmodel,"md.solidearth.settings.grdmodel"); 234 if(grdmodel==IvinsEnum) inputs->SetTransientInput(TransientAccumulatedDeltaIceThicknessEnum,NULL,0); 235 236 228 237 }/*}}}*/ 229 238 void MasstransportAnalysis::UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum){/*{{{*/ … … 248 257 /*Finite Element Analysis*/ 249 258 void MasstransportAnalysis::Core(FemModel* femmodel){/*{{{*/ 259 _error_("not implemented"); 260 }/*}}}*/ 261 void MasstransportAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 250 262 _error_("not implemented"); 251 263 }/*}}}*/ … … 795 807 void MasstransportAnalysis::InputUpdateFromSolution(IssmDouble* solution,Element* element){/*{{{*/ 796 808 797 798 809 /*Only update if on base*/ 799 810 if(!element->IsOnBase()) return; 800 811 812 /*deal with logic of accumulating thickness if we are coupled to a 813 * sea level core:*/ 814 int frequency,count,isgrd; 815 element->FindParam(&isgrd,SolidearthSettingsGRDEnum); 816 if(isgrd){ 817 element->FindParam(&frequency,SolidearthSettingsRunFrequencyEnum); 818 element->FindParam(&count,SealevelchangeRunCountEnum); 819 } 820 801 821 /*Fetch dof list and allocate solution vector*/ 802 822 int *doflist = NULL; … … 806 826 IssmDouble* newthickness = xNew<IssmDouble>(numnodes); 807 827 IssmDouble* thicknessresidual = xNew<IssmDouble>(numnodes); 808 809 /*recover time step:*/810 IssmDouble dt = element->FindParam(TimesteppingTimeStepEnum);811 828 812 829 /*Use the dof list to index into the solution vector: */ … … 844 861 IssmDouble* oldthickness = xNew<IssmDouble>(numvertices); 845 862 IssmDouble* cumdeltathickness = xNew<IssmDouble>(numvertices); 846 IssmDouble* icethicknessrate= xNew<IssmDouble>(numvertices);863 IssmDouble* deltathickness = xNew<IssmDouble>(numvertices); 847 864 IssmDouble* newbase = xNew<IssmDouble>(numvertices); 848 865 IssmDouble* bed = xNew<IssmDouble>(numvertices); … … 860 877 basalelement->GetInputListOnVertices(&phi[0],MaskOceanLevelsetEnum); 861 878 basalelement->GetInputListOnVertices(&sealevel[0],SealevelEnum); 862 basalelement->GetInputListOnVertices(&cumdeltathickness[0],SealevelchangeCumDeltathicknessOldEnum);879 if(isgrd)basalelement->GetInputListOnVertices(&cumdeltathickness[0],AccumulatedDeltaIceThicknessEnum); 863 880 864 881 /*Do we do grounding line migration?*/ … … 868 885 869 886 /*What is the delta thickness forcing the sea-level change core: cumulated over time, hence the +=:*/ 870 for(int i=0;i<numvertices;i++){ 871 cumdeltathickness[i] += newthickness[i]-oldthickness[i]; 872 icethicknessrate[i] = (newthickness[i]-oldthickness[i])/dt; 887 if(isgrd){ 888 for(int i=0;i<numvertices;i++){ 889 cumdeltathickness[i] += newthickness[i]-oldthickness[i]; 890 } 873 891 } 874 892 … … 906 924 element->AddBasalInput(SurfaceEnum,newsurface,P1Enum); 907 925 element->AddBasalInput(BaseEnum,newbase,P1Enum); 908 element->AddBasalInput(SealevelchangeCumDeltathicknessEnum,cumdeltathickness,P1Enum); 909 element->AddBasalInput(SurfaceloadIceThicknessRateEnum,icethicknessrate,P1Enum); 926 if(isgrd){ 927 int grdmodel; 928 929 /*accumulate ice thickness changes: */ 930 element->AddBasalInput(AccumulatedDeltaIceThicknessEnum,cumdeltathickness,P1Enum); 931 932 /*for Ivins deformation model, keep history of ice thickness changes:*/ 933 element->FindParam(&grdmodel,GrdModelEnum); 934 if(grdmodel==IvinsEnum){ 935 int *vertexlids = NULL; 936 int *vertexsids= NULL; 937 IssmDouble time; 938 939 TransientInput* transientinput = basalelement->inputs->GetTransientInput(TransientAccumulatedDeltaIceThicknessEnum); 940 941 /*Get values and lid list and recover vertices ids needed to initialize inputs*/ 942 vertexlids = xNew<int>(numvertices); 943 vertexsids = xNew<int>(numvertices); 944 element->FindParam(&time,TimeEnum); 945 element->GetVerticesLidList(&vertexlids[0]); 946 element->GetVerticesSidList(&vertexsids[0]); 947 948 /*Add the current time cumdeltathickness to the existing time series: */ 949 switch(element->ObjectEnum()){ 950 case TriaEnum: transientinput->AddTriaTimeInput( time,numvertices,vertexlids,cumdeltathickness,P1Enum); break; 951 default: _error_("Not implemented yet"); 952 } 953 xDelete<int>(vertexlids); 954 xDelete<int>(vertexsids); 955 } 956 957 /*compute total ice thickness change between two sea-level solver time steps, ie. every frequency*dt:*/ 958 if(count==frequency){ 959 IssmDouble* oldcumdeltathickness = xNew<IssmDouble>(numvertices); 960 961 basalelement->GetInputListOnVertices(&oldcumdeltathickness[0],OldAccumulatedDeltaIceThicknessEnum); 962 element->AddBasalInput(OldAccumulatedDeltaIceThicknessEnum,cumdeltathickness,P1Enum); 963 for(int i=0;i<numvertices;i++)deltathickness[i]=cumdeltathickness[i]-oldcumdeltathickness[i]; 964 element->AddBasalInput(DeltaIceThicknessEnum,deltathickness,P1Enum); 965 966 xDelete<IssmDouble>(oldcumdeltathickness); 967 } 968 969 } 910 970 911 971 /*Free ressources:*/ … … 915 975 xDelete<IssmDouble>(newsurface); 916 976 xDelete<IssmDouble>(oldthickness); 917 xDelete<IssmDouble>(icethicknessrate);918 977 xDelete<IssmDouble>(oldbase); 919 978 xDelete<IssmDouble>(oldsurface); -
issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/MeltingAnalysis.cpp
r25763 r26047 56 56 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 57 57 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 58 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);58 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 59 59 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 60 60 if(iomodel->domaintype!=Domain2DhorizontalEnum){ … … 69 69 /*Finite Element Analysis*/ 70 70 void MeltingAnalysis::Core(FemModel* femmodel){/*{{{*/ 71 _error_("not implemented"); 72 }/*}}}*/ 73 void MeltingAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 71 74 _error_("not implemented"); 72 75 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/MeltingAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/SamplingAnalysis.cpp
r26010 r26047 101 101 _error_("not implemented"); 102 102 }/*}}}*/ 103 void SamplingAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 104 _error_("not implemented"); 105 }/*}}}*/ 103 106 ElementVector* SamplingAnalysis::CreateDVector(Element* element){/*{{{*/ 104 107 /*Default, return NULL*/ -
issm/trunk-jpl/src/c/analyses/SamplingAnalysis.h
r26001 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/SealevelchangeAnalysis.cpp
r26037 r26047 6 6 #include "../shared/shared.h" 7 7 #include "../modules/modules.h" 8 #include "../cores/cores.h" 8 9 9 10 /*Model processing*/ … … 22 23 void SealevelchangeAnalysis::UpdateElements(Elements* elements,Inputs* inputs,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/ 23 24 24 int geodetic=0;25 int dslmodel=0;26 25 int isexternal=0; 27 26 … … 39 38 iomodel->FetchDataToInput(inputs,elements,"md.mask.ocean_levelset",MaskOceanLevelsetEnum); 40 39 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 41 iomodel->FetchData(&geodetic,"md.solidearth.settings.computesealevelchange");42 iomodel->FetchDataToInput(inputs,elements,"md.solidearth.initialsealevel",SealevelEnum,0);43 40 iomodel->FetchDataToInput(inputs,elements,"md.geometry.bed",BedEnum); 44 iomodel->FetchDataToInput(inputs,elements,"md.solidearth.surfaceload.icethicknesschange",SurfaceloadIceThicknessRateEnum,0.); 45 iomodel->FetchDataToInput(inputs,elements,"md.solidearth.surfaceload.waterheightchange",SurfaceloadWaterHeightRateEnum); 46 iomodel->FetchDataToInput(inputs,elements,"md.solidearth.surfaceload.otherchange",SurfaceloadOtherRateEnum); 47 48 /*dynamic sea level: */ 49 iomodel->FetchData(&dslmodel,"md.dsl.model"); 50 if (dslmodel==1){ /*standard dsl model:{{{*/ 51 52 /*deal with global mean steric rate: */ 53 IssmDouble* str=NULL; 54 IssmDouble* times = NULL; 55 int M,N; 56 57 /*fetch str vector:*/ 58 iomodel->FetchData(&str,&M,&N,"md.dsl.global_average_thermosteric_sea_level_change"); _assert_(M==2); 59 60 //recover time vector: 61 times=xNew<IssmDouble>(N); 62 for(int t=0;t<N;t++) times[t] = str[N+t]; 63 64 /*create transient input: */ 65 inputs->SetTransientInput(DslGlobalAverageThermostericSeaLevelChangeEnum,times,N); 66 TransientInput* transientinput = inputs->GetTransientInput(DslGlobalAverageThermostericSeaLevelChangeEnum); 67 68 69 for(Object* & object : elements->objects){ 70 Element* element=xDynamicCast<Element*>(object); 71 72 for(int t=0;t<N;t++){ 73 switch(element->ObjectEnum()){ 74 case TriaEnum: transientinput->AddTriaTimeInput( t,1,&element->lid,&str[t],P0Enum); break; 75 case PentaEnum: transientinput->AddPentaTimeInput(t,1,&element->lid,&str[t],P0Enum); break; 76 default: _error_("Not implemented yet"); 77 } 78 } 79 } 80 81 /*cleanup:*/ 82 xDelete<IssmDouble>(times); 83 iomodel->DeleteData(str,"md.dsl.global_average_thermosteric_sea_level_change"); 84 85 /*deal with dynamic sea level fields: */ 86 iomodel->FetchDataToInput(inputs,elements,"md.dsl.sea_surface_height_change_above_geoid", DslSeaSurfaceHeightChangeAboveGeoidEnum); 87 iomodel->FetchDataToInput(inputs,elements,"md.dsl.sea_water_pressure_change_at_sea_floor", DslSeaWaterPressureChangeAtSeaFloorEnum); 88 89 } /*}}}*/ 90 else if (dslmodel==2){ /*multi-model ensemble dsl model:{{{*/ 91 92 /*variables:*/ 93 int nummodels; 94 IssmDouble** pstr=NULL; 95 IssmDouble* str=NULL; 96 IssmDouble* times = NULL; 97 int* pM = NULL; 98 int* pN = NULL; 99 int M,N; 100 101 /*deal with dsl.global_average_thermosteric_sea_level_change {{{*/ 102 iomodel->FetchData(&pstr,&pM,&pN,&nummodels,"md.dsl.global_average_thermosteric_sea_level_change"); 103 104 /*go through the mat array and create a dataset of transient inputs:*/ 105 for (int i=0;i<nummodels;i++){ 106 107 M=pM[i]; 108 N=pN[i]; 109 str=pstr[i]; 110 111 //recover time vector: 112 times=xNew<IssmDouble>(N); 113 for(int t=0;t<N;t++) times[t] = str[(M-1)*N+t]; 114 115 TransientInput* transientinput=inputs->SetDatasetTransientInput(DslGlobalAverageThermostericSeaLevelChangeEnum,i, times,N); 116 117 for(Object* & object : elements->objects){ 118 Element* element=xDynamicCast<Element*>(object); 119 120 for(int t=0;t<N;t++){ 121 switch(element->ObjectEnum()){ 122 case TriaEnum: transientinput->AddTriaTimeInput( t,1,&element->lid,&str[t],P0Enum); break; 123 case PentaEnum: transientinput->AddPentaTimeInput(t,1,&element->lid,&str[t],P0Enum); break; 124 default: _error_("Not implemented yet"); 125 } 126 } 127 } 128 xDelete<IssmDouble>(times); 129 } 130 /*Delete data:*/ 131 for(int i=0;i<nummodels;i++){ 132 IssmDouble* str=pstr[i]; 133 xDelete<IssmDouble>(str); 134 } 135 xDelete<IssmDouble*>(pstr); 136 xDelete<int>(pM); 137 xDelete<int>(pN); 138 /*}}}*/ 139 iomodel->FetchDataToInput(inputs,elements,"md.dsl.sea_surface_height_change_above_geoid",DslSeaSurfaceHeightChangeAboveGeoidEnum); 140 iomodel->FetchDataToInput(inputs,elements,"md.dsl.sea_water_pressure_change_at_sea_floor",DslSeaWaterPressureChangeAtSeaFloorEnum); 141 142 } /*}}}*/ 143 else _error_("Dsl model " << dslmodel << " not implemented yet!"); 144 41 145 42 /*external solidearthsolution: solid-Earth model*/ 146 43 iomodel->FetchData(&isexternal,"md.solidearth.isexternal"); … … 151 48 iomodel->FetchDataToInput(inputs,elements,"md.solidearth.external.geoid",SolidearthExternalGeoidRateEnum); 152 49 iomodel->FetchDataToInput(inputs,elements,"md.solidearth.external.barystaticsealevel",SolidearthExternalBarystaticSeaLevelRateEnum); 153 } 154 155 /*Initialize cumdeltalthickness, bedrockeast and bedrocknorth to 0 at time step 0:*/ 50 51 /*Resolve Mmes using the modelid, if necessary:*/ 52 if (inputs->GetInputObjectEnum(SolidearthExternalDisplacementEastRateEnum)==DatasetInputEnum){ 53 int modelid; 54 55 /*retrieve model id: */ 56 iomodel->FetchData(&modelid,"md.solidearth.external.modelid"); 57 58 /*replace dataset of forcings with only one, the modelid'th:*/ 59 MmeToInputFromIdx(inputs,elements,modelid,SolidearthExternalDisplacementNorthRateEnum, P1Enum); 60 MmeToInputFromIdx(inputs,elements,modelid,SolidearthExternalDisplacementEastRateEnum, P1Enum); 61 MmeToInputFromIdx(inputs,elements,modelid,SolidearthExternalDisplacementUpRateEnum, P1Enum); 62 MmeToInputFromIdx(inputs,elements,modelid,SolidearthExternalGeoidRateEnum, P1Enum); 63 MmeToInputFromIdx(inputs,elements,modelid,SolidearthExternalBarystaticSeaLevelRateEnum, P1Enum); 64 } 65 } 66 67 /*Initialize solid earth motion and sea level: */ 156 68 InputUpdateFromConstantx(inputs,elements,0.,BedEastEnum); 157 69 InputUpdateFromConstantx(inputs,elements,0.,BedNorthEnum); 158 InputUpdateFromConstantx(inputs,elements,0.,SealevelchangeCumDeltathicknessEnum);70 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum); 159 71 160 72 … … 169 81 IssmDouble* love_tk=NULL; 170 82 IssmDouble* love_tl=NULL; 171 int dslmodel=0;172 83 int externalnature=0; 173 84 int isexternal=0; … … 223 134 parameters->AddObject(iomodel->CopyConstantObject("md.solidearth.settings.computesealevelchange",SolidearthSettingsComputesealevelchangeEnum)); 224 135 parameters->AddObject(iomodel->CopyConstantObject("md.solidearth.settings.isgrd",SolidearthSettingsGRDEnum)); 136 parameters->AddObject(iomodel->CopyConstantObject("md.solidearth.settings.compute_bp_grd",SolidearthSettingsComputeBpGrdEnum)); 225 137 parameters->AddObject(iomodel->CopyConstantObject("md.solidearth.planetradius",SolidearthPlanetRadiusEnum)); 226 138 parameters->AddObject(iomodel->CopyConstantObject("md.solidearth.settings.glfraction",SolidearthSettingsGlfractionEnum)); 139 parameters->AddObject(iomodel->CopyConstantObject("md.solidearth.settings.cross_section_shape",SolidearthSettingsCrossSectionShapeEnum)); 227 140 parameters->AddObject(new DoubleParam(CumBslcEnum,0.0)); 228 141 parameters->AddObject(new DoubleParam(CumBslcIceEnum,0.0)); … … 257 170 } 258 171 259 /*Deal with dsl multi-model ensembles: {{{*/ 260 iomodel->FetchData(&dslmodel,"md.dsl.model"); 261 parameters->AddObject(iomodel->CopyConstantObject("md.dsl.compute_fingerprints",DslComputeFingerprintsEnum)); 262 if(dslmodel==2){ 263 IssmDouble modelid; 264 int nummodels; 265 266 /*create double param, not int param, because Dakota will be updating it as 267 * a double potentially: */ 268 iomodel->FetchData(&modelid,"md.dsl.modelid"); 269 parameters->AddObject(new DoubleParam(DslModelidEnum,modelid)); 270 parameters->AddObject(iomodel->CopyConstantObject("md.dsl.nummodels",DslNummodelsEnum)); 271 iomodel->FetchData(&nummodels,"md.dsl.nummodels"); 272 273 /*quick checks: */ 274 if(nummodels<=0)_error_("dslmme object in md.dsl field should contain at least 1 ensemble model!"); 275 if(modelid<=0 || modelid>nummodels)_error_("modelid field in dslmme object of md.dsl field should be between 1 and the number of ensemble runs!"); 276 } /*}}}*/ 172 277 173 /*Deal with external multi-model ensembles: {{{*/ 278 174 if(isexternal){ … … 508 404 _error_("not implemented"); 509 405 }/*}}}*/ 406 void SealevelchangeAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 407 408 /*run sea level change core geometry only once, after the Model Processor is done:*/ 409 sealevelchange_geometry(femmodel); 410 411 }/*}}}*/ 510 412 ElementVector* SealevelchangeAnalysis::CreateDVector(Element* element){/*{{{*/ 511 413 /*Default, return NULL*/ -
issm/trunk-jpl/src/c/analyses/SealevelchangeAnalysis.h
r25947 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/SmbAnalysis.cpp
r25997 r26047 503 503 504 504 }/*}}}*/ 505 void SmbAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 506 _error_("not implemented"); 507 }/*}}}*/ 505 508 ElementVector* SmbAnalysis::CreateDVector(Element* element){/*{{{*/ 506 509 _error_("not implemented"); -
issm/trunk-jpl/src/c/analyses/SmbAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/SmoothAnalysis.cpp
r25439 r26047 35 35 /*Finite Element Analysis*/ 36 36 void SmoothAnalysis::Core(FemModel* femmodel){/*{{{*/ 37 _error_("not implemented"); 38 }/*}}}*/ 39 void SmoothAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 37 40 _error_("not implemented"); 38 41 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/SmoothAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
r25974 r26047 768 768 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 769 769 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 770 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);770 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 771 771 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 772 772 iomodel->FetchDataToInput(inputs,elements,"md.mask.ocean_levelset",MaskOceanLevelsetEnum); … … 1112 1112 } 1113 1113 1114 }/*}}}*/ 1115 void StressbalanceAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 1116 _error_("not implemented"); 1114 1117 }/*}}}*/ 1115 1118 ElementVector* StressbalanceAnalysis::CreateDVector(Element* element){/*{{{*/ -
issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.h
r25610 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/StressbalanceSIAAnalysis.cpp
r25610 r26047 181 181 femmodel->SetCurrentConfiguration(StressbalanceSIAAnalysisEnum); 182 182 solutionsequence_linear(femmodel); 183 }/*}}}*/ 184 void StressbalanceSIAAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 185 _error_("not implemented"); 183 186 }/*}}}*/ 184 187 ElementVector* StressbalanceSIAAnalysis::CreateDVector(Element* element){/*{{{*/ -
issm/trunk-jpl/src/c/analyses/StressbalanceSIAAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/StressbalanceVerticalAnalysis.cpp
r25942 r26047 107 107 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 108 108 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 109 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);109 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 110 110 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 111 111 if(iomodel->domaintype!=Domain2DhorizontalEnum){ … … 167 167 femmodel->SetCurrentConfiguration(StressbalanceVerticalAnalysisEnum); 168 168 solutionsequence_linear(femmodel); 169 }/*}}}*/ 170 void StressbalanceVerticalAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 171 _error_("not implemented"); 169 172 }/*}}}*/ 170 173 ElementVector* StressbalanceVerticalAnalysis::CreateDVector(Element* element){/*{{{*/ -
issm/trunk-jpl/src/c/analyses/StressbalanceVerticalAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp
r25763 r26047 133 133 iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum); 134 134 iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum); 135 iomodel->FetchDataToInput(inputs,elements,"md. solidearth.initialsealevel",SealevelEnum,0);135 iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0); 136 136 iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum); 137 137 iomodel->FetchDataToInput(inputs,elements,"md.mask.ocean_levelset",MaskOceanLevelsetEnum); … … 297 297 /*Finite Element Analysis*/ 298 298 void ThermalAnalysis::Core(FemModel* femmodel){/*{{{*/ 299 _error_("not implemented"); 300 }/*}}}*/ 301 void ThermalAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 299 302 _error_("not implemented"); 300 303 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/ThermalAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/UzawaPressureAnalysis.cpp
r25439 r26047 61 61 /*Finite Element Analysis*/ 62 62 void UzawaPressureAnalysis::Core(FemModel* femmodel){/*{{{*/ 63 _error_("not implemented"); 64 }/*}}}*/ 65 void UzawaPressureAnalysis::PreCore(FemModel* femmodel){/*{{{*/ 63 66 _error_("not implemented"); 64 67 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/UzawaPressureAnalysis.h
r25379 r26047 22 22 /*Finite element Analysis*/ 23 23 void Core(FemModel* femmodel); 24 void PreCore(FemModel* femmodel); 24 25 ElementVector* CreateDVector(Element* element); 25 26 ElementMatrix* CreateJacobianMatrix(Element* element); -
issm/trunk-jpl/src/c/analyses/analyses.h
r26000 r26047 23 23 #include "./FreeSurfaceBaseAnalysis.h" 24 24 #include "./FreeSurfaceTopAnalysis.h" 25 #include "./GiaAnalysis.h"26 25 #include "./GLheightadvectionAnalysis.h" 27 26 #include "./LoveAnalysis.h" … … 30 29 #include "./HydrologyDCInefficientAnalysis.h" 31 30 #include "./HydrologyShreveAnalysis.h" 31 #include "./HydrologyTwsAnalysis.h" 32 32 #include "./HydrologyGlaDSAnalysis.h" 33 33 #include "./HydrologyShaktiAnalysis.h" … … 35 35 #include "./LevelsetAnalysis.h" 36 36 #include "./MasstransportAnalysis.h" 37 #include "./OceantransportAnalysis.h" 37 38 #include "./SamplingAnalysis.h" 38 39 #include "./SmbAnalysis.h" -
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r25997 r26047 1666 1666 for(int t=0;t<N;t++){ 1667 1667 value=vector[N*this->Sid()+t]; 1668 switch(this->ObjectEnum()){ 1669 case TriaEnum: transientinput->AddTriaTimeInput( t,1,&(this->lid),&value,P0Enum); break; 1670 case PentaEnum: transientinput->AddPentaTimeInput(t,1,&(this->lid),&value,P0Enum); break; 1671 default: _error_("Not implemented yet"); 1672 } 1673 } 1674 xDelete<IssmDouble>(times); 1675 } 1676 else if(M==1 || M==2){ 1677 /*create transient input: */ 1678 IssmDouble* times = xNew<IssmDouble>(N); 1679 if(M==1)times[0]=0; 1680 if(M==2)for(int t=0;t<N;t++) times[t] = vector[(M-1)*N+t]; 1681 1682 inputs->SetTransientInput(vector_enum,times,N); 1683 TransientInput* transientinput = inputs->GetTransientInput(vector_enum); 1684 1685 for(int t=0;t<N;t++){ 1686 value=vector[t]; //values are on the first line, times are on the second line 1668 1687 switch(this->ObjectEnum()){ 1669 1688 case TriaEnum: transientinput->AddTriaTimeInput( t,1,&(this->lid),&value,P0Enum); break; -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r25947 r26047 23 23 class Materials; 24 24 class Material; 25 class Matlitho; 25 26 class Inputs; 26 27 class Inputs; … … 366 367 367 368 #ifdef _HAVE_GIA_ 368 virtual void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, IssmDouble* x,IssmDouble* y)=0;369 virtual void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y)=0; 369 370 #endif 370 371 #ifdef _HAVE_ESA_ -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r25945 r26047 4851 4851 /*}}}*/ 4852 4852 4853 #ifdef _HAVE_GIA_4854 void Penta::GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x,IssmDouble* y){/*{{{*/4855 _error_("GIA deflection not implemented yet!");4856 }4857 /*}}}*/4858 #endif4859 4860 4853 #ifdef _HAVE_DAKOTA_ 4861 4854 void Penta::InputScaleFromDakota(IssmDouble* distributed_values, IssmDouble* partition, int npart, int nt, int name){/*{{{*/ -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r25947 r26047 19 19 class Node; 20 20 class Material; 21 class Matlitho; 21 22 class Tria; 22 23 class ElementMatrix; … … 207 208 208 209 #ifdef _HAVE_GIA_ 209 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, IssmDouble* x,IssmDouble* y);210 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");}; 210 211 #endif 211 212 #ifdef _HAVE_ESA_ -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r25947 r26047 17 17 class Node; 18 18 class Material; 19 class Matlitho; 19 20 class ElementMatrix; 20 21 class ElementVector; … … 163 164 164 165 #ifdef _HAVE_GIA_ 165 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");};166 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");}; 166 167 #endif 167 168 #ifdef _HAVE_ESA_ -
issm/trunk-jpl/src/c/classes/Elements/Tetra.h
r25947 r26047 17 17 class Node; 18 18 class Material; 19 class Matlitho; 19 20 class ElementMatrix; 20 21 class ElementVector; … … 169 170 170 171 #ifdef _HAVE_GIA_ 171 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");};172 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, Matlitho* litho, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");}; 172 173 #endif 173 174 #ifdef _HAVE_ESA_ -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r25972 r26047 5089 5089 5090 5090 #ifdef _HAVE_GIA_ 5091 void Tria::GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x, IssmDouble* y){/*{{{*/5091 void Tria::GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, Matlitho* litho, IssmDouble* x, IssmDouble* y){/*{{{*/ 5092 5092 5093 5093 IssmDouble xyz_list[NUMVERTICES][3]; 5094 5094 5095 5095 /*gia solution parameters:*/ 5096 IssmDouble lithosphere_thickness,mantle_viscosity,ice_mask;5096 IssmDouble ice_mask; 5097 5097 5098 5098 /*output: */ … … 5111 5111 /*recover gia solution parameters: */ 5112 5112 int cross_section_shape; 5113 this->parameters->FindParam(&cross_section_shape, GiaCrossSectionShapeEnum);5113 this->parameters->FindParam(&cross_section_shape,SolidearthSettingsCrossSectionShapeEnum); 5114 5114 5115 5115 /*what time is it? :*/ … … 5118 5118 5119 5119 /*recover material parameters: */ 5120 IssmDouble lithosphere_shear_modulus = FindParam(MaterialsLithosphereShearModulusEnum);5121 IssmDouble lithosphere_density = FindParam(MaterialsLithosphereDensityEnum);5122 IssmDouble mantle_shear_modulus = FindParam(MaterialsMantleShearModulusEnum);5123 IssmDouble mantle_density = FindParam(MaterialsMantleDensityEnum);5124 5120 IssmDouble rho_ice = FindParam(MaterialsRhoIceEnum); 5121 5122 /*recover mantle and lithosphere material properties:*/ 5123 int numlayers=litho->numlayers; 5124 5125 /*lithosphere is the last layer, mantle is the penultimate layer. Watch out, radius represents the layers 5126 *from center to surface of the Earth:*/ 5127 IssmDouble lithosphere_thickness = litho->radius[numlayers] - litho->radius[numlayers-1]; 5128 IssmDouble lithosphere_shear_modulus = litho->lame_mu[numlayers-1]; 5129 IssmDouble lithosphere_density = litho->density[numlayers-1]; 5130 IssmDouble mantle_shear_modulus = litho->lame_mu[numlayers-2]; 5131 IssmDouble mantle_density = litho->density[numlayers-2]; 5132 IssmDouble mantle_viscosity = litho->viscosity[numlayers-2]; 5125 5133 5126 5134 /*early return if we are NOT on an icy element:*/ … … 5131 5139 IssmDouble *times = NULL; 5132 5140 int numtimes; 5133 this->GetInputAveragesUpToCurrentTime(ThicknessEnum,&hes,×,&numtimes,currenttime); 5134 5135 /*recover mantle viscosity: */ 5136 Input* mantle_viscosity_input=this->GetInput(GiaMantleViscosityEnum); 5137 if (!mantle_viscosity_input)_error_("mantle viscosity input needed to compute gia deflection!"); 5138 mantle_viscosity_input->GetInputAverage(&mantle_viscosity); 5139 5140 /*recover lithosphere thickness: */ 5141 Input* lithosphere_thickness_input=this->GetInput(GiaLithosphereThicknessEnum); 5142 if (!lithosphere_thickness_input)_error_("lithosphere thickness input needed to compute gia deflection!"); 5143 lithosphere_thickness_input->GetInputAverage(&lithosphere_thickness); 5141 this->GetInputAveragesUpToCurrentTime(TransientAccumulatedDeltaIceThicknessEnum,&hes,×,&numtimes,currenttime); 5142 5143 if(this->Id()==1){ 5144 _printf_("numtimes: " << numtimes << "\n"); 5145 for (int i=0;i<numtimes;i++)_printf_(times[i] << " " << hes[i] << "\n"); 5146 } 5144 5147 5145 5148 /*pull area of this Tria: */ … … 5223 5226 5224 5227 /*Compute ice thickness change: */ 5225 Input* deltathickness_input=this->GetInput( EsaDeltathicknessEnum);5228 Input* deltathickness_input=this->GetInput(DeltaIceThicknessEnum); 5226 5229 if (!deltathickness_input)_error_("delta thickness input needed to compute elastic adjustment!"); 5227 5230 deltathickness_input->GetInputAverage(&I); … … 5361 5364 5362 5365 /*Compute ice thickness change: */ 5363 Input* deltathickness_input=this->GetInput( EsaDeltathicknessEnum);5366 Input* deltathickness_input=this->GetInput(DeltaIceThicknessEnum); 5364 5367 if (!deltathickness_input)_error_("delta thickness input needed to compute elastic adjustment!"); 5365 5368 deltathickness_input->GetInputAverage(&I); … … 5514 5517 /*}}}*/ 5515 5518 void Tria::SealevelchangeMomentOfInertia(IssmDouble* dI_list,IssmDouble* Sg_old, SealevelMasks* masks){/*{{{*/ 5516 5517 5518 5519 /*early return if we are not on an ice cap OR ocean:*/ 5519 5520 if(!masks->isiceonly[this->lid] && !masks->isoceanin[this->lid]){ … … 5592 5593 } 5593 5594 else if(masks->isiceonly[this->lid]){ 5594 IssmDouble rho_ice, dIdt, dt; 5595 5596 5597 /*recover parameters: */ 5595 IssmDouble rho_ice, I; 5596 5597 /*recover material parameters: */ 5598 5598 rho_ice=FindParam(MaterialsRhoIceEnum); 5599 dt=FindParam(TimesteppingTimeStepEnum);5600 5599 5601 5600 /*Compute ice thickness change: */ 5602 Input* deltathickness_input=this->GetInput(SurfaceloadIceThicknessRateEnum); 5603 if (!deltathickness_input)_error_("delta thickness input needed to compute sea level change!"); 5604 deltathickness_input->GetInputAverage(&dIdt); 5605 5606 5607 dI_list[0] = -4*PI*(rho_ice*dIdt*dt*area)*pow(re,4)*(sin(late)*cos(late)*cos(longe))/planetarea; 5608 dI_list[1] = -4*PI*(rho_ice*dIdt*dt*area)*pow(re,4)*(sin(late)*cos(late)*sin(longe))/planetarea; 5609 dI_list[2] = +4*PI*(rho_ice*dIdt*dt*area)*pow(re,4)*(1-pow(sin(late),2))/planetarea; 5601 Input* deltathickness_input=this->GetInput(DeltaIceThicknessEnum); 5602 if (!deltathickness_input)_error_("DeltaIceThicknessEnum delta ice thickness input needed to compute sea level change!"); 5603 deltathickness_input->GetInputAverage(&I); 5604 5605 dI_list[0] = -4*PI*(rho_ice*I*area)*pow(re,4)*(sin(late)*cos(late)*cos(longe))/planetarea; 5606 dI_list[1] = -4*PI*(rho_ice*I*area)*pow(re,4)*(sin(late)*cos(late)*sin(longe))/planetarea; 5607 dI_list[2] = +4*PI*(rho_ice*I*area)*pow(re,4)*(1-pow(sin(late),2))/planetarea; 5610 5608 } 5611 5609 … … 5815 5813 IssmDouble area; 5816 5814 IssmDouble phi=1.0; //WARNING: do not touch this, default is entire elemnt contributes barystatic 5817 IssmDouble I dot; //ice thickness rate(Farrel and Clarke, Equ. 4)5815 IssmDouble I; //change in ice thickness or water level(Farrel and Clarke, Equ. 4) 5818 5816 bool notfullygrounded=false; 5819 5817 bool scaleoceanarea= false; 5820 5818 bool computerigid= false; 5821 5819 int glfraction=1; 5822 IssmDouble dt=0;5823 5820 5824 5821 /*output: */ … … 5865 5862 rho_ice=FindParam(MaterialsRhoIceEnum); 5866 5863 rho_water=FindParam(MaterialsRhoSeawaterEnum); 5867 dt=FindParam(TimesteppingTimeStepEnum);5868 5864 this->parameters->FindParam(&computerigid,SolidearthSettingsRigidEnum); 5869 5865 this->parameters->FindParam(&scaleoceanarea,SolidearthSettingsOceanAreaScalingEnum); … … 5889 5885 else phi=1.0; 5890 5886 5891 /*Retrieve ice thickness at vertices: */5892 Input* deltathickness_input=this->GetInput( SurfaceloadIceThicknessRateEnum);5887 /*Retrieve surface load for ice: */ 5888 Input* deltathickness_input=this->GetInput(DeltaIceThicknessEnum); 5893 5889 if (!deltathickness_input)_error_("delta thickness input needed to compute sea level change!"); 5894 5890 5895 5891 /*/Average ice thickness over grounded area of the element only: {{{*/ 5896 if(!notfullygrounded)deltathickness_input->GetInputAverage(&I dot);5892 if(!notfullygrounded)deltathickness_input->GetInputAverage(&I); 5897 5893 else{ 5898 5894 IssmDouble total_weight=0; … … 5907 5903 /* Start looping on the number of gaussian points and average over these gaussian points: */ 5908 5904 total_weight=0; 5909 I dot=0;5905 I=0; 5910 5906 while(gauss->next()){ 5911 IssmDouble I dotg=0;5912 deltathickness_input->GetInputValue(&I dotg,gauss);5913 I dot+=Idotg*gauss->weight;5907 IssmDouble Ig=0; 5908 deltathickness_input->GetInputValue(&Ig,gauss); 5909 I+=Ig*gauss->weight; 5914 5910 total_weight+=gauss->weight; 5915 5911 } 5916 I dot=Idot/total_weight;5912 I=I/total_weight; 5917 5913 delete gauss; 5918 5914 } … … 5922 5918 _assert_(oceanarea>0.); 5923 5919 if(scaleoceanarea) oceanarea=3.619e+14; // use true ocean area, m^2 5924 bslcice = rho_ice*area*phi*I dot*dt/(oceanarea*rho_water);5920 bslcice = rho_ice*area*phi*I/(oceanarea*rho_water); 5925 5921 _assert_(!xIsNan<IssmDouble>(bslcice)); 5926 5922 5927 5923 if(computerigid){ 5928 5924 /*convert from m to kg/m^2:*/ 5929 I dot=Idot*rho_ice*phi;5925 I=I*rho_ice*phi; 5930 5926 5931 5927 /*convolve:*/ 5932 for(int i=0;i<gsize;i++) Sgi[i]+=G[i]*I dot*dt;5928 for(int i=0;i<gsize;i++) Sgi[i]+=G[i]*I; 5933 5929 } 5934 5930 … … 5948 5944 IssmDouble area; 5949 5945 IssmDouble phi=1.0; //WARNING: do not touch this, default is entire elemnt contributes barystatic 5950 IssmDouble Wdot; //change in water height thickness (Farrel and Clarke, Equ. 4) 5951 IssmDouble dt=0; 5946 IssmDouble W; //change in water height thickness (Farrel and Clarke, Equ. 4) 5952 5947 bool notfullygrounded=false; 5953 5948 bool scaleoceanarea= false; … … 5982 5977 rho_water=FindParam(MaterialsRhoSeawaterEnum); 5983 5978 rho_freshwater=FindParam(MaterialsRhoFreshwaterEnum); 5984 dt=FindParam(TimesteppingTimeStepEnum);5985 5979 this->parameters->FindParam(&computeelastic,SolidearthSettingsElasticEnum); 5986 5980 this->parameters->FindParam(&scaleoceanarea,SolidearthSettingsOceanAreaScalingEnum); … … 5993 5987 5994 5988 /*Retrieve water height at vertices: */ 5995 Input* deltathickness_input=this->GetInput( SurfaceloadWaterHeightRateEnum);5996 if (!deltathickness_input)_error_(" SurfaceloadWaterHeightRateEnum input needed to compute sea level change!");5997 deltathickness_input->GetInputAverage(&W dot);5989 Input* deltathickness_input=this->GetInput(DeltaTwsEnum); 5990 if (!deltathickness_input)_error_("DeltaTwsEnum input needed to compute sea level change!"); 5991 deltathickness_input->GetInputAverage(&W); 5998 5992 5999 5993 /*Compute barystatic component:*/ 6000 5994 _assert_(oceanarea>0.); 6001 5995 if(scaleoceanarea) oceanarea=3.619e+14; // use true ocean area, m^2 6002 bslchydro = rho_freshwater*area*phi*W dot*dt/(oceanarea*rho_water);5996 bslchydro = rho_freshwater*area*phi*W/(oceanarea*rho_water); 6003 5997 _assert_(!xIsNan<IssmDouble>(bslchydro)); 6004 5998 6005 5999 if(computeelastic){ 6006 6000 /*convert from m to kg/m^2:*/ 6007 W dot=Wdot*rho_freshwater*phi;6001 W=W*rho_freshwater*phi; 6008 6002 6009 6003 /*convolve:*/ 6010 for(int i=0;i<gsize;i++) Sgi[i]+=G[i]*W dot*dt;6004 for(int i=0;i<gsize;i++) Sgi[i]+=G[i]*W; 6011 6005 } 6012 6006 … … 6057 6051 6058 6052 /*Retrieve bottom pressure change and average over the element: */ 6059 Input* bottompressure_change_input=this->GetInput(D slSeaWaterPressureChangeAtSeaFloorEnum);6060 if (!bottompressure_change_input)_error_(" bottom pressure input needed to compute sea level change fingerprint!");6053 Input* bottompressure_change_input=this->GetInput(DeltaBottomPressureEnum); 6054 if (!bottompressure_change_input)_error_("DeltaBottomPressureEnum pressure input needed to compute sea level change fingerprint!"); 6061 6055 bottompressure_change_input->GetInputAverage(&BP); 6062 6056 … … 6078 6072 IssmDouble rho_water; 6079 6073 IssmDouble* G=NULL; 6080 int bp_compute_fingerprints= 0;6081 6074 6082 6075 /*retrieve parameters:*/ 6083 this->parameters->FindParam(&bp_compute_fingerprints,DslComputeFingerprintsEnum);6084 6076 rho_water=FindParam(MaterialsRhoSeawaterEnum); 6085 6077 … … 6118 6110 /*diverse:*/ 6119 6111 int gsize; 6120 IssmDouble I dot, S, BP; //change in relative ice thickness and sea level6112 IssmDouble I, S, BP; //change in relative ice thickness and sea level 6121 6113 IssmDouble rho_ice,rho_water; 6122 6114 int horiz; … … 6137 6129 this->parameters->FindParam(&computeelastic,SolidearthSettingsElasticEnum); 6138 6130 this->parameters->FindParam(&horiz,SolidearthSettingsHorizEnum); 6139 this->parameters->FindParam(&bp_compute_fingerprints, DslComputeFingerprintsEnum);6131 this->parameters->FindParam(&bp_compute_fingerprints,SolidearthSettingsComputeBpGrdEnum); 6140 6132 6141 6133 /*early return if elastic not requested:*/ … … 6163 6155 /*If bottom pressures are available, retrieve them to load the bedrock:*/ 6164 6156 if(bp_compute_fingerprints){ 6165 Input* bottompressure_change_input=this->GetInput(D slSeaWaterPressureChangeAtSeaFloorEnum);6157 Input* bottompressure_change_input=this->GetInput(DeltaBottomPressureEnum); 6166 6158 if (!bottompressure_change_input)_error_("bottom pressure input needed to compute sea level change fingerprint!"); 6167 6159 bottompressure_change_input->GetInputAverage(&BP); … … 6182 6174 } 6183 6175 else if (masks->isiceonly[this->lid]){ 6184 IssmDouble dt=0;6185 dt=FindParam(TimesteppingTimeStepEnum);6186 6176 6187 6177 /*Compute ice thickness change: */ 6188 Input* deltathickness_input=this->GetInput( SurfaceloadIceThicknessRateEnum);6189 if (!deltathickness_input)_error_(" delta thickness input needed to compute sea level change!");6190 deltathickness_input->GetInputAverage(&I dot);6178 Input* deltathickness_input=this->GetInput(DeltaIceThicknessEnum); 6179 if (!deltathickness_input)_error_("DeltaIceThicknessEnum delta thickness input needed to compute sea level change!"); 6180 deltathickness_input->GetInputAverage(&I); 6191 6181 6192 6182 /*convert to kg/m^2*/ 6193 I dot=Idot*rho_ice;6183 I=I*rho_ice; 6194 6184 6195 6185 for(int i=0;i<gsize;i++){ 6196 Up[i]+=I dot*dt*GU[i];6186 Up[i]+=I*GU[i]; 6197 6187 if(horiz){ 6198 North[i]+=I dot*dt*GN[i];6199 East[i]+=I dot*dt*GE[i];6188 North[i]+=I*GN[i]; 6189 East[i]+=I*GE[i]; 6200 6190 } 6201 6191 } -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r25947 r26047 17 17 class Node; 18 18 class Material; 19 class Matlitho; 19 20 class Seg; 20 21 class ElementMatrix; … … 154 155 155 156 #ifdef _HAVE_GIA_ 156 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, IssmDouble* x,IssmDouble* y);157 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y); 157 158 #endif 158 159 #ifdef _HAVE_ESA_ -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r26010 r26047 822 822 break; 823 823 824 case GiaSolutionEnum:825 analyses_temp[numanalyses++]=GiaAnalysisEnum;826 break;827 828 824 case LoveSolutionEnum: 829 825 analyses_temp[numanalyses++]=LoveAnalysisEnum; … … 838 834 break; 839 835 840 case SealevelchangeSolutionEnum:841 analyses_temp[numanalyses++]=SealevelchangeAnalysisEnum;842 analyses_temp[numanalyses++]=GiaAnalysisEnum;843 break;844 845 836 case SmbSolutionEnum: 846 837 analyses_temp[numanalyses++]=SmbAnalysisEnum; … … 853 844 case TransientSolutionEnum:{ 854 845 /*We have multiple analyses here, process one by one*/ 855 bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isgroundingline,isstressbalance,ismovingfront,ishydrology,isdamage,issmb,isslc,isesa,is gia,issampling;846 bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isgroundingline,isstressbalance,ismovingfront,ishydrology,isdamage,issmb,isslc,isesa,issampling; 856 847 iomodel->FindConstant(&isthermal,"md.transient.isthermal"); 857 848 iomodel->FindConstant(&ismovingfront,"md.transient.ismovingfront"); … … 864 855 iomodel->FindConstant(&isslc,"md.transient.isslc"); 865 856 iomodel->FindConstant(&isesa,"md.transient.isesa"); 866 iomodel->FindConstant(&isgia,"md.transient.isgia");867 857 iomodel->FindConstant(&issampling,"md.transient.issampling"); 868 858 int* analyses_iter = NULL; … … 904 894 } 905 895 if(isslc){ 906 analyses_temp[numanalyses++]=GiaAnalysisEnum;907 896 analyses_temp[numanalyses++]=SealevelchangeAnalysisEnum; 908 897 } 909 898 if(isesa){ 910 899 analyses_temp[numanalyses++]=EsaAnalysisEnum; 911 }912 if(isgia){913 analyses_temp[numanalyses++]=GiaAnalysisEnum;914 900 } 915 901 if(issampling){ … … 2123 2109 void FemModel::MmeToInputFromId(int id, int rootenum, int interpolationenum){ /*{{{*/ 2124 2110 2125 TransientInput* transientinput = NULL; 2126 TransientInput* transientinput2 = NULL; 2127 Tria* element = NULL; 2128 IssmDouble value; 2129 IssmDouble* values = NULL; 2130 IssmDouble* times = NULL; 2131 int N; 2132 2133 /*find thickness dataset: */ 2134 DatasetInput* datasetinput = this->inputs->GetDatasetInput(rootenum); 2135 2136 /*Initialize new transient input: */ 2137 transientinput = datasetinput->GetTransientInputByOffset(0); _assert_(transientinput); 2138 transientinput->GetAllTimes(×,&N); 2139 this->inputs->SetTransientInput(DummyEnum,times,N); 2140 transientinput2 = this->inputs->GetTransientInput(DummyEnum); 2141 2142 for(Object* & object : this->elements->objects){ 2143 Tria* element=xDynamicCast<Tria*>(object); 2144 2145 /*recover the right field from the mme: */ 2146 transientinput = datasetinput->GetTransientInputByOffset(id); _assert_(transientinput); 2147 2148 /*copy values from the transientinput to the final transientinput2: */ 2149 for (int j=0;j<N;j++){ 2150 TriaInput* tria_input=transientinput->GetTriaInput(j); 2151 element->InputServe(tria_input); 2152 if(interpolationenum==P0Enum){ 2153 value=tria_input->element_values[0]; 2154 transientinput2->AddTriaTimeInput( j,1,&(element->lid),&value,P0Enum); 2155 } 2156 else if(interpolationenum==P1Enum){ 2157 2158 /*Get values and lid list*/ 2159 const int numvertices = element->GetNumberOfVertices(); 2160 int *vertexlids = xNew<int>(numvertices); 2161 int *vertexsids = xNew<int>(numvertices); 2162 2163 /*Recover vertices ids needed to initialize inputs*/ 2164 element->GetVerticesLidList(&vertexlids[0]); 2165 element->GetVerticesSidList(&vertexsids[0]); 2166 values=tria_input->element_values; 2167 transientinput2->AddTriaTimeInput( j,numvertices,vertexlids,values,P1Enum); 2168 } 2169 } 2170 } 2171 2172 /*wipe out existing SurfaceloadIceThicknessChangeEnum dataset:*/ 2173 this->inputs->ChangeEnum(DummyEnum,rootenum); 2174 2175 //reconfigure: 2176 transientinput2->Configure(this->parameters); 2111 MmeToInputFromIdx(this->inputs,this->elements,id,rootenum,interpolationenum); 2112 2177 2113 } //}}} 2178 2114 void FemModel::OmegaAbsGradientx( IssmDouble* pJ){/*{{{*/ … … 4732 4668 #endif 4733 4669 #ifdef _HAVE_GIA_ 4734 void FemModel::Deflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, IssmDouble* x, IssmDouble* y){ /*{{{*/ 4670 void FemModel::IvinsDeformation(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, IssmDouble* x, IssmDouble* y){ /*{{{*/ 4671 4672 /*Find the litho material to be used by all the elements:*/ 4673 Matlitho* matlitho=NULL; 4674 for (Object* & object: this->materials->objects){ 4675 Material* material=xDynamicCast<Material*>(object); 4676 if(material->ObjectEnum()==MatlithoEnum){ 4677 matlitho=xDynamicCast<Matlitho*>(material); 4678 break; 4679 } 4680 } 4681 _assert_(matlitho); 4682 4735 4683 4736 4684 /*Go through elements, and add contribution from each element to the deflection vector wg:*/ 4737 4685 for(Object* & object : this->elements->objects){ 4738 4686 Element* element = xDynamicCast<Element*>(object); 4739 element->GiaDeflection(wg,dwgdt, x,y);4687 element->GiaDeflection(wg,dwgdt, matlitho, x,y); 4740 4688 } 4741 4689 } … … 4842 4790 IssmDouble* partitionhydro=NULL; 4843 4791 int nparthydro; 4792 int istws=0; 4844 4793 4845 4794 … … 4885 4834 4886 4835 /*Call the barystatic sea level change core for hydro: */ 4887 bslchydro_cpu=0; 4888 for(int i=0;i<elements->Size();i++){ 4889 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 4890 bslchydro_cpu+=element->SealevelchangeBarystaticHydro(RSLgi,masks, bslchydro_partition,partitionhydro,oceanarea); 4836 bslchydro_cpu=0; //make sure to initialize this, so we have a total barystatic contribution computed at 0. 4837 this->parameters->FindParam(&istws,TransientIshydrologyEnum); 4838 if(istws){ 4839 for(int i=0;i<elements->Size();i++){ 4840 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 4841 bslchydro_cpu+=element->SealevelchangeBarystaticHydro(RSLgi,masks, bslchydro_partition,partitionhydro,oceanarea); 4842 } 4891 4843 } 4892 4844 4893 4845 /*Call the barystatic sea level change core for bottom pressures: */ 4894 this->parameters->FindParam(&bp_compute_fingerprints, DslComputeFingerprintsEnum);4846 this->parameters->FindParam(&bp_compute_fingerprints,SolidearthSettingsComputeBpGrdEnum); 4895 4847 if(bp_compute_fingerprints){ 4896 4848 for(int i=0;i<elements->Size();i++){ -
issm/trunk-jpl/src/c/classes/FemModel.h
r25956 r26047 160 160 void ThicknessPositivex(IssmDouble* pJ); 161 161 #ifdef _HAVE_GIA_ 162 void Deflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, IssmDouble* x, IssmDouble* y);162 void IvinsDeformation(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, IssmDouble* x, IssmDouble* y); 163 163 #endif 164 164 #ifdef _HAVE_ESA_ -
issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp
r25529 r26047 234 234 } 235 235 /*}}}*/ 236 void Inputs::AXPY(IssmDouble alpha, int xenum, int yenum, int zenum){/*{{{*/ 237 238 _assert_(this); 239 240 /*Get indices from enums*/ 241 int index_x = EnumToIndex(xenum); 242 int index_y = EnumToIndex(yenum); 243 int index_z = EnumToIndex(zenum); 244 245 /*Delete output if it already exists*/ 246 if(this->inputs[index_z]) delete this->inputs[index_z]; 247 248 /*Make sure that old one exists*/ 249 if(!this->inputs[index_x]) _error_("Input "<<EnumToStringx(xenum)<<" not found"); 250 if(!this->inputs[index_y]) _error_("Input "<<EnumToStringx(yenum)<<" not found"); 251 252 /*Make a copy*/ 253 Input* z=this->inputs[index_y]->copy(); 254 255 /*AXPY: */ 256 this->inputs[index_z]->AXPY(this->inputs[index_x],alpha); 257 } 258 /*}}}*/ 236 259 int Inputs::EnumToIndex(int enum_in){/*{{{*/ 237 260 -
issm/trunk-jpl/src/c/classes/Inputs/Inputs.h
r25508 r26047 46 46 int DeleteInput(int enum_type); 47 47 void DuplicateInput(int original_enum,int new_enum); 48 void AXPY(IssmDouble alpha, int xenum, int yenum, int zenum); 48 49 void DeepEcho(void); 49 50 void Echo(void); -
issm/trunk-jpl/src/c/classes/IoModel.cpp
r25539 r26047 656 656 if(strcmp(record_name,"md.timestepping.type")==0) integer = IoCodeToEnumTimestepping(integer); 657 657 if(strcmp(record_name,"md.amr.type")==0) integer = IoCodeToEnumAmr(integer); 658 if(strcmp(record_name,"md.solidearth.settings.grdmodel")==0) integer = IoCodeToEnumGrd(integer); 658 659 659 660 /*Broadcast to other cpus*/ … … 1822 1823 matrix=array[i]; 1823 1824 1824 //recover time vector: 1825 times=xNew<IssmDouble>(N); 1826 for(int t=0;t<N;t++) times[t] = matrix[(M-1)*N+t]; 1827 1825 1828 1826 //initialize transient input dataset: 1829 1827 TransientInput* transientinput=inputs->SetDatasetTransientInput(input_enum,i, times,N); … … 1847 1845 1848 1846 if(M==this->numberofvertices || M==(this->numberofvertices+1)){ 1847 1848 //recover time vector: 1849 times=xNew<IssmDouble>(N); 1850 if(M==this->numberofvertices) times[0] = matrix[M-1]; 1851 if(M==this->numberofvertices+1) for(int t=0;t<N;t++) times[t] = matrix[(M-1)*N+t]; 1849 1852 1850 1853 IssmDouble* values=xNew<IssmDouble>(numvertices); … … 1865 1868 IssmDouble value; 1866 1869 1870 //recover time vector: 1871 times=xNew<IssmDouble>(N); 1872 if(M==this->numberofelements) times[0] = matrix[M-1]; 1873 if(M==this->numberofelements+1) for(int t=0;t<N;t++) times[t] = matrix[(M-1)*N+t]; 1874 1867 1875 for(int t=0;t<N;t++){ 1868 1876 1869 1877 value=matrix[N*element->Sid()+t]; 1870 //if(element->Sid()==188 && t==0)_printf_("value: " << value << "\n");1871 1878 switch(element->ObjectEnum()){ 1872 1879 case TriaEnum: transientinput->AddTriaTimeInput( t,1,&element->lid,&value,P0Enum); break; … … 1875 1882 } 1876 1883 } 1884 } 1885 else if(M==2 || M==1){ 1886 IssmDouble value; 1887 1888 //recover time vector: 1889 times=xNew<IssmDouble>(N); 1890 if(M==1) times[0] = 0; 1891 if(M==2) for(int t=0;t<N;t++) times[t] = matrix[(M-1)*N+t]; 1892 1893 for(int t=0;t<N;t++){ 1894 1895 value=matrix[t]; 1896 switch(element->ObjectEnum()){ 1897 case TriaEnum: transientinput->AddTriaTimeInput( t,1,&element->lid,&value,P0Enum); break; 1898 case PentaEnum: transientinput->AddPentaTimeInput( t,1,&element->lid,&value,P0Enum); break; 1899 default: _error_("Not implemented yet"); 1900 } 1901 } 1902 1877 1903 } 1878 1904 else _error_("FetchDataToInput error message: row size of MatArray elements should be either numberofelements (+1) or numberofvertices (+1)"); -
issm/trunk-jpl/src/c/classes/Profiler.h
r26004 r26047 22 22 #define MOVINGFRONTCORE 9 /*Profiling MOVINGFRONT */ 23 23 #define MASSTRANSPORTCORE 10 /*Profiling MASSTRANSPORT */ 24 #define SMBCORE 11 /*Profiling SMB */ 25 #define GROUNDINGLINECORE 12 /*Profiling GROUDINGLINE MIGRATION */ 26 #define GIACORE 13 /*Profiling GIA */ 27 #define ESACORE 14 /*Profiling ESA */ 28 #define SLRCORE 15 /*Profiling SLR */ 29 #define SAMPLINGCORE 16 /*Profiling SAMPLING */ 30 #define MPISERIAL 17 /*Profiling MPISerial */ 31 #define SEDLOOP 18 /*Profiling MPISerial */ 32 #define SEDMatrix 19 /*Profiling MPISerial */ 33 #define SEDUpdate 20 /*Profiling MPISerial */ 34 #define EPLLOOP 21 /*Profiling MPISerial */ 35 #define EPLMasking 22 /*Profiling MPISerial */ 36 #define EPLMatrices 23 /*Profiling MPISerial */ 37 #define EPLUpdate 24 /*Profiling MPISerial */ 38 #define MAXPROFSIZE 25 /*Used to initialize static arrays*/ 24 #define OCEANTRANSPORTCORE 11 /*Profiling OCEANTRANSPORT */ 25 #define SMBCORE 12 /*Profiling SMB */ 26 #define GROUNDINGLINECORE 13 /*Profiling GROUDINGLINE MIGRATION */ 27 #define GIACORE 14 /*Profiling GIA */ 28 #define ESACORE 15 /*Profiling ESA */ 29 #define SLRCORE 16 /*Profiling SLR */ 30 #define SAMPLINGCORE 17 /*Profiling SAMPLING */ 31 #define MPISERIAL 18 /*Profiling MPISerial */ 32 #define SEDLOOP 19 /*Profiling MPISerial */ 33 #define SEDMatrix 20 /*Profiling MPISerial */ 34 #define SEDUpdate 21 /*Profiling MPISerial */ 35 #define EPLLOOP 22 /*Profiling MPISerial */ 36 #define EPLMasking 23 /*Profiling MPISerial */ 37 #define EPLMatrices 24 /*Profiling MPISerial */ 38 #define EPLUpdate 25 /*Profiling MPISerial */ 39 #define MAXPROFSIZE 26 /*Used to initialize static arrays*/ 39 40 40 41 -
issm/trunk-jpl/src/c/cores/CorePointerFromSolutionEnum.cpp
r26004 r26047 59 59 solutioncore=&masstransport_core; 60 60 break; 61 case SealevelchangeSolutionEnum:62 solutioncore=& sealevelchange_core;61 case OceantransportSolutionEnum: 62 solutioncore=&oceantransport_core; 63 63 break; 64 64 case EsaSolutionEnum: 65 65 solutioncore=&esa_core; 66 break;67 case GiaSolutionEnum:68 #if _HAVE_GIA_69 solutioncore=&gia_core;70 #else71 _error_("ISSM not compiled with Gia capability");72 #endif73 66 break; 74 67 case DamageEvolutionSolutionEnum: -
issm/trunk-jpl/src/c/cores/cores.h
r26004 r26047 35 35 void controlvalidation_core(FemModel* femmodel); 36 36 void masstransport_core(FemModel* femmodel); 37 void oceantransport_core(FemModel* femmodel); 37 38 void depthaverage_core(FemModel* femmodel); 38 39 void extrudefrombase_core(FemModel* femmodel); … … 66 67 Vector<IssmDouble>* sealevelchange_core_sal(FemModel* femmodel,SealevelMasks* masks, Vector<IssmDouble>* RSLg_barystatic,IssmDouble oceanarea); 67 68 void sealevelchange_core_deformation(Vector<IssmDouble>** pN_radial, Vector<IssmDouble>** pU_radial, Vector<IssmDouble>** pU_north,Vector<IssmDouble>** pU_east,FemModel* femmodel,Vector<IssmDouble>* RSLg, SealevelMasks* masks); 68 void GetStericRate(Vector<IssmDouble> ** psteric_rate_g,FemModel* femmodel);69 void GetDynamicRate(Vector<IssmDouble> ** pdynamic_rate_g,FemModel* femmodel);70 void SetBottomPressure(FemModel* femmodel); 69 void couplerinput_core(FemModel* femmodel); 70 void coupleroutput_core(FemModel* femmodel); 71 71 72 72 73 //optimization -
issm/trunk-jpl/src/c/cores/esa_core.cpp
r25827 r26047 41 41 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 42 42 femmodel->parameters->FindParam(&isesa,TransientIsesaEnum); 43 femmodel->parameters->FindParam(&iscoupler, TransientIscouplerEnum);43 femmodel->parameters->FindParam(&iscoupler,IsSlcCouplingEnum); 44 44 45 45 /* recover coordinates of vertices: */ -
issm/trunk-jpl/src/c/cores/hydrology_core.cpp
r25680 r26047 44 44 InputDuplicatex(femmodel,WatercolumnEnum,WaterColumnOldEnum); 45 45 46 } 47 /*Using the Tws based Model*/ 48 if (hydrology_model==HydrologyTwsEnum){ 49 if(VerboseSolution()) _printf0_(" computing water column\n"); 50 51 femmodel->SetCurrentConfiguration(HydrologyTwsAnalysisEnum); 52 53 /*save current tws before updating:*/ 54 InputDuplicatex(femmodel,WatercolumnEnum,WaterColumnOldEnum); 55 56 /*grab tws from the hydrology.spcwatercolumn field input and update 57 * the solution with it:*/ 58 Vector<IssmDouble>* ug = NULL; 59 GetVectorFromInputsx(&ug,femmodel,HydrologyTwsSpcEnum,VertexPIdEnum); 60 InputUpdateFromSolutionx(femmodel,ug); 61 delete ug; 62 46 63 } 47 64 -
issm/trunk-jpl/src/c/cores/masstransport_core.cpp
r25947 r26047 64 64 InputDuplicatex(femmodel,BaseEnum,BaseOldEnum); 65 65 InputDuplicatex(femmodel,SurfaceEnum,SurfaceOldEnum); 66 InputDuplicatex(femmodel,SealevelchangeCumDeltathicknessEnum,SealevelchangeCumDeltathicknessOldEnum);67 66 if(stabilization==4){ 68 67 solutionsequence_fct(femmodel); -
issm/trunk-jpl/src/c/cores/sealevelchange_core.cpp
r25958 r26047 22 22 /*Parameters, variables:*/ 23 23 bool save_results; 24 bool isslc=0;25 bool isgia=0;26 int grd=0;27 int isexternal=0;28 bool iscoupler=0;29 int solution_type;30 24 31 25 /*Retrieve parameters:*/ 32 femmodel->parameters->FindParam(&isslc,TransientIsslcEnum);33 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);34 26 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 35 femmodel->parameters->FindParam(&grd,SolidearthSettingsGRDEnum); 36 femmodel->parameters->FindParam(&isexternal,SolidearthIsExternalEnum); 37 femmodel->parameters->FindParam(&iscoupler,TransientIscouplerEnum); 38 39 /*in case we are running SealevelchangeSolutionEnum, then bypass transient settings:*/ 40 if(solution_type==SealevelchangeSolutionEnum){ 41 isslc=1; 42 isgia=1; 43 } 44 45 /*Should we be here?:*/ 46 if(!isslc)return; 47 27 48 28 /*Verbose: */ 49 29 if(VerboseSolution()) _printf0_(" computing sea level change\n"); 50 30 51 /*Run gia core: */52 if(isgia){53 #ifdef _HAVE_GIA_54 gia_core(femmodel);55 #else56 _error_("ISSM was not compiled with gia capabilities. Exiting");57 #endif58 }59 60 31 /*set SLR configuration: */ 61 32 femmodel->SetCurrentConfiguration(SealevelchangeAnalysisEnum); … … 63 34 /*run geometry core: */ 64 35 sealevelchange_geometry(femmodel); 65 36 66 37 /*any external forcings?:*/ 67 if(isexternal)solidearthexternal_core(femmodel); 38 solidearthexternal_core(femmodel); 39 40 /*Run coupler input transfer:*/ 41 couplerinput_core(femmodel); 68 42 69 43 /*Run geodetic:*/ 70 //if(modelid==earthid) //not sure how we proceed yet on coupling. 71 if(grd)grd_core(femmodel); 44 grd_core(femmodel); 72 45 73 46 /*Run steric core for sure:*/ 74 47 dynstr_core(femmodel); 75 48 76 if(iscoupler){ 77 /*transfer sea level back to ice caps:*/ 78 TransferSealevel(femmodel,SealevelEnum); 79 TransferSealevel(femmodel,BedEnum); 80 81 //reset cumdeltathickness to 0: 82 InputUpdateFromConstantx(femmodel->inputs,femmodel->elements,0.,SealevelchangeCumDeltathicknessEnum); 83 } 49 /*Run coupler output transfer: */ 50 coupleroutput_core(femmodel); 84 51 85 52 /*Save results: */ … … 93 60 } 94 61 95 /*requested dependents: */96 if(solution_type==SealevelchangeSolutionEnum)femmodel->RequestedDependentsx();97 98 62 /*End profiler*/ 99 63 femmodel->profiler->Stop(SLRCORE); 100 64 } 101 65 /*}}}*/ 66 102 67 void solidearthexternal_core(FemModel* femmodel){ /*{{{*/ 103 68 … … 113 78 int horiz=0; 114 79 int modelid=-1; 115 80 int isexternal=0; 81 116 82 /*parameters: */ 117 bool isslc=0;118 int solution_type;119 83 IssmDouble dt; 120 84 121 85 /*Retrieve parameters:*/ 122 femmodel->parameters->FindParam(&isslc,TransientIsslcEnum);123 86 femmodel->parameters->FindParam(&horiz,SolidearthSettingsHorizEnum); 124 87 femmodel->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 125 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 126 127 /*in case we are running SealevelchangeSolutionEnum, then bypass transient settings:*/ 128 if(solution_type==SealevelchangeSolutionEnum)isslc=1; 129 130 /*Should we be here?:*/ 131 if(!isslc)return; 88 femmodel->parameters->FindParam(&isexternal,SolidearthIsExternalEnum); 89 90 /*Early return:*/ 91 if (!isexternal)return; 132 92 133 93 /*Verbose: */ … … 141 101 GetVectorFromInputsx(&bedrocknorth,femmodel,BedNorthEnum,VertexSIdEnum); 142 102 } 143 /*Deal with Mme: */144 if (femmodel->inputs->GetInputObjectEnum(SolidearthExternalDisplacementEastRateEnum)==DatasetInputEnum){145 /*retrieve model id: */146 femmodel->parameters->FindParam(&modelid,SolidearthExternalModelidEnum);147 /*replace dataset of forcings with only one, the modelid'th:*/148 femmodel->MmeToInputFromId(modelid,SolidearthExternalDisplacementNorthRateEnum, P1Enum);149 femmodel->MmeToInputFromId(modelid,SolidearthExternalDisplacementEastRateEnum, P1Enum);150 femmodel->MmeToInputFromId(modelid,SolidearthExternalDisplacementUpRateEnum, P1Enum);151 femmodel->MmeToInputFromId(modelid,SolidearthExternalGeoidRateEnum, P1Enum);152 femmodel->MmeToInputFromId(modelid,SolidearthExternalBarystaticSeaLevelRateEnum, P1Enum);153 }154 103 155 104 GetVectorFromInputsx(&geoid_rate,femmodel,SolidearthExternalGeoidRateEnum,VertexSIdEnum); … … 185 134 } 186 135 /*}}}*/ 136 void couplerinput_core(FemModel* femmodel){ /*{{{*/ 137 138 /*Be very careful here, everything is well thought through, do not remove 139 * without taking big risks:*/ 140 141 /*parameters:*/ 142 int iscoupling; 143 int modelid,earthid; 144 int count,frequency; 145 int horiz; 146 147 /*retrieve more parameters:*/ 148 femmodel->parameters->FindParam(&iscoupling,IsSlcCouplingEnum); 149 femmodel->parameters->FindParam(&frequency,SolidearthSettingsRunFrequencyEnum); 150 femmodel->parameters->FindParam(&count,SealevelchangeRunCountEnum); 151 152 if(iscoupling){ 153 femmodel->parameters->FindParam(&modelid,ModelIdEnum); 154 femmodel->parameters->FindParam(&earthid,EarthIdEnum); 155 } 156 else{ 157 /* we are here, we are not running in a coupler, so we will indeed compute SLR, 158 * so make sure we are identified as being the Earth.:*/ 159 modelid=1; earthid=1; 160 } 161 162 /*if we are carrying loads but are not yet computing grd core, accumulate them and skip 163 * the rest: */ 164 if (count<frequency){ 165 count++; 166 femmodel->parameters->SetParam(count,SealevelchangeRunCountEnum); 167 return; 168 } 169 170 /*Basins are supposed to accumulate loads and hand them over to the Earth 171 for slr computations every "frequency" time steps. If we are here, we 172 have reached the "frequency"'th time step, and we are going to pick up 173 the old loads, the current loads, and send them to the Earth for slr 174 computations. So the Earth is never supposed to compute loads. Except, 175 when we are running the Earth as a giant basin (ex: running a 176 Peltier-style GIA model, or running a "Snow Ball" Earth) which only 177 happens when we are not coupled, at which point we are sending these 178 loads to ourselves (hence the convoluted condition). 179 */ 180 181 /*transer loads from basins to Earth for grd core computations. :*/ 182 if(iscoupling){ 183 184 /*transfer ice thickness change load from basins to earth: */ 185 TransferForcing(femmodel,DeltaIceThicknessEnum); 186 TransferForcing(femmodel,DeltaBottomPressureEnum); 187 TransferForcing(femmodel,DeltaTwsEnum); 188 189 /*transfer external forcings back to Earth:*/ 190 TransferSealevel(femmodel,BedEnum); 191 TransferSealevel(femmodel,SealevelEnum); 192 if(horiz){ 193 TransferSealevel(femmodel,BedEastEnum); 194 TransferSealevel(femmodel,BedNorthEnum); 195 } 196 } 197 198 }; /*}}}*/ 187 199 void grd_core(FemModel* femmodel){ /*{{{*/ 188 200 … … 203 215 204 216 /*parameters:*/ 205 bool iscoupler;206 int solution_type;207 217 int modelid,earthid; 208 bool istransientmasstransport;209 int frequency,count;210 218 int horiz; 211 IssmDouble dt;212 219 IssmDouble oceanarea; 213 int bp_compute_fingerprints=0; 220 int count,frequency,iscoupling; 221 int grd=0; 214 222 215 223 /*Verbose: */ 216 224 if(VerboseSolution()) _printf0_(" computing GRD sea level patterns\n"); 217 218 /*retrieve moreparameters:*/219 femmodel->parameters->FindParam(& iscoupler,TransientIscouplerEnum);225 226 /*retrieve parameters:*/ 227 femmodel->parameters->FindParam(&grd,SolidearthSettingsGRDEnum); 220 228 femmodel->parameters->FindParam(&frequency,SolidearthSettingsRunFrequencyEnum); 221 229 femmodel->parameters->FindParam(&count,SealevelchangeRunCountEnum); 222 femmodel->parameters->FindParam(&horiz,SolidearthSettingsHorizEnum); 223 femmodel->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 224 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 225 226 if(iscoupler){ 230 231 /*only run if grd was requested, if we are the earth, and we have reached 232 * the necessary number of time steps dictated by :*/ 233 if(!grd) return; 234 if(count!=frequency)return; 235 femmodel->parameters->FindParam(&iscoupling,IsSlcCouplingEnum); 236 if(iscoupling){ 227 237 femmodel->parameters->FindParam(&modelid,ModelIdEnum); 228 238 femmodel->parameters->FindParam(&earthid,EarthIdEnum); 229 femmodel->parameters->FindParam(&istransientmasstransport,TransientIsmasstransportEnum); 230 } 231 else{ 232 /* we are here, we are not running in a coupler, so we will indeed compute SLR, 233 * so make sure we are identified as being the Earth.:*/ 234 modelid=1; earthid=1; 235 /* in addition, if we are running solution_type SealevelchangeSolutionEnum, make sure we 236 * run, irresepective of the time settings:*/ 237 count=frequency; 238 } 239 240 /*If we are running in coupled mode, the Earth model needs to run its own mass transport (if 241 * not already done by the mass trasnport module. For ice caps, they rely on the transient mass 242 * transport module exclusively:*/ 243 if(iscoupler) if(modelid==earthid) if(!istransientmasstransport) EarthMassTransport(femmodel); 244 245 /*increment counter, or call solution core if count==frequency:*/ 246 if (count<frequency){ 247 count++; femmodel->parameters->SetParam(count,SealevelchangeRunCountEnum); 248 return; 249 } 250 251 /*call sea-level change sub cores:*/ 252 if(iscoupler){ 253 /*transfer cumulated deltathickness forcing from ice caps to earth model: */ 254 TransferForcing(femmodel,SealevelchangeCumDeltathicknessEnum); 255 256 /*we have accumulated thicknesses, dump them in deltathcikness: */ 257 if(modelid==earthid)InputDuplicatex(femmodel,SealevelchangeCumDeltathicknessEnum,SurfaceloadIceThicknessRateEnum); 258 } 259 260 /*run cores:*/ 261 if(modelid==earthid){ 262 263 /*call masks core: */ 264 masks=sealevel_masks(femmodel); 265 266 /*set bottom pressures:*/ 267 SetBottomPressure(femmodel); 268 269 /*call barystatic core (generalized eustatic - Farrel and Clark, Eq 4, 1st, 3rd and 4rd terms on the RHS) */ 270 RSLg_barystatic=sealevelchange_core_barystatic(femmodel,masks,&oceanarea); 271 272 /*call self attraction and loading module (ocean loading tems - 2nd and 5th terms on the RHS of Farrel and Clark) */ 273 RSLg=sealevelchange_core_sal(femmodel,masks,RSLg_barystatic,oceanarea); 274 275 /*compute bedrock motion and derive geoid: */ 276 sealevelchange_core_deformation(&N_grd,&U_grd,&U_north_grd,&U_east_grd,femmodel,RSLg,masks); 277 278 /*Update bedrock motion and geoid:*/ 279 GetVectorFromInputsx(&geoid,femmodel,SealevelEnum,VertexSIdEnum); 280 GetVectorFromInputsx(&bedrock,femmodel,BedEnum,VertexSIdEnum); 281 if(horiz){ 282 GetVectorFromInputsx(&bedrockeast,femmodel,BedEastEnum,VertexSIdEnum); 283 GetVectorFromInputsx(&bedrocknorth,femmodel,BedNorthEnum,VertexSIdEnum); 284 } 285 286 geoid->AXPY(N_grd,1); 287 bedrock->AXPY(U_grd,1); 288 if(horiz){ 289 bedrockeast->AXPY(U_east_grd,1); 290 bedrocknorth->AXPY(U_north_grd,1); 291 } 292 293 /*get some of the updates into elements:*/ 294 InputUpdateFromVectorx(femmodel,U_grd,SealevelUEsaEnum,VertexSIdEnum); 295 InputUpdateFromVectorx(femmodel,N_grd,SealevelNEsaEnum,VertexSIdEnum); 296 InputUpdateFromVectorx(femmodel,RSLg,SealevelRSLEnum,VertexSIdEnum); 297 InputUpdateFromVectorx(femmodel,RSLg_barystatic,SealevelRSLBarystaticEnum,VertexSIdEnum); 298 if (horiz){ 299 InputUpdateFromVectorx(femmodel,U_north_grd,SealevelUNorthEsaEnum,VertexSIdEnum); 300 InputUpdateFromVectorx(femmodel,U_east_grd,SealevelUEastEsaEnum,VertexSIdEnum); 301 } 302 } 239 if(modelid!=earthid)return; 240 } 241 242 /*call masks core: */ 243 masks=sealevel_masks(femmodel); 244 245 /*call barystatic core (generalized eustatic - Farrel and Clark, Eq 4, 1st, 3rd and 4rd terms on the RHS) */ 246 RSLg_barystatic=sealevelchange_core_barystatic(femmodel,masks,&oceanarea); 247 248 /*call self attraction and loading module (ocean loading tems - 2nd and 5th terms on the RHS of Farrel and Clark) */ 249 RSLg=sealevelchange_core_sal(femmodel,masks,RSLg_barystatic,oceanarea); 250 251 /*compute bedrock motion and derive geoid: */ 252 sealevelchange_core_deformation(&N_grd,&U_grd,&U_north_grd,&U_east_grd,femmodel,RSLg,masks); 253 254 /*Update bedrock motion and geoid:*/ 255 GetVectorFromInputsx(&geoid,femmodel,SealevelEnum,VertexSIdEnum); 256 GetVectorFromInputsx(&bedrock,femmodel,BedEnum,VertexSIdEnum); 257 if(horiz){ 258 GetVectorFromInputsx(&bedrockeast,femmodel,BedEastEnum,VertexSIdEnum); 259 GetVectorFromInputsx(&bedrocknorth,femmodel,BedNorthEnum,VertexSIdEnum); 260 } 261 262 geoid->AXPY(N_grd,1); 263 bedrock->AXPY(U_grd,1); 264 if(horiz){ 265 bedrockeast->AXPY(U_east_grd,1); 266 bedrocknorth->AXPY(U_north_grd,1); 267 } 268 269 /*get some of the updates into elements:*/ 270 InputUpdateFromVectorx(femmodel,U_grd,SealevelUGrdEnum,VertexSIdEnum); 271 InputUpdateFromVectorx(femmodel,N_grd,SealevelNGrdEnum,VertexSIdEnum); 272 if(RSLg)InputUpdateFromVectorx(femmodel,RSLg,SealevelRSLEnum,VertexSIdEnum); 273 if(RSLg_barystatic)InputUpdateFromVectorx(femmodel,RSLg_barystatic,SealevelRSLBarystaticEnum,VertexSIdEnum); 274 if (horiz){ 275 InputUpdateFromVectorx(femmodel,U_north_grd,SealevelUNorthEsaEnum,VertexSIdEnum); 276 InputUpdateFromVectorx(femmodel,U_east_grd,SealevelUEastEsaEnum,VertexSIdEnum); 277 } 303 278 304 279 /*reset counter to 1:*/ … … 327 302 /*variables:*/ 328 303 Vector<IssmDouble> *sealevel = NULL; 329 Vector<IssmDouble> * steric_rate_g= NULL;330 Vector<IssmDouble> *d ynamic_rate_g= NULL;304 Vector<IssmDouble> *deltadsl = NULL; 305 Vector<IssmDouble> *deltastr = NULL; 331 306 332 307 /*parameters: */ 333 bool isslc=0;334 int solution_type;335 IssmDouble dt;336 308 int step; 309 int computesealevel=0; 337 310 IssmDouble time; 338 311 … … 342 315 IssmDouble gmtslc=0; 343 316 344 /*Retrieve parameters:*/ 345 femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum); 346 femmodel->parameters->FindParam(&isslc,TransientIsslcEnum); 347 348 /*in case we are running SealevelchangeSolutionEnum, then bypass transient settings:*/ 349 if(solution_type==SealevelchangeSolutionEnum)isslc=1; 350 351 /*Should we be here?:*/ 352 if(!isslc)return; 353 317 /*early return if we are not computing sea level, but rather deformation: */ 318 femmodel->parameters->FindParam(&computesealevel,SolidearthSettingsComputesealevelchangeEnum); 319 if (!computesealevel)return; 320 354 321 /*Verbose: */ 355 if(VerboseSolution()) _printf0_(" computing steric sea level change\n");322 if(VerboseSolution()) _printf0_(" computing steric and dynamic sea level change\n"); 356 323 357 324 /*Retrieve sealevel and add steric + dynamic rates:*/ 358 325 GetVectorFromInputsx(&sealevel,femmodel,SealevelEnum,VertexSIdEnum); 359 GetStericRate(&steric_rate_g,femmodel); 360 GetDynamicRate(&dynamic_rate_g,femmodel); 361 362 /*compute: sea level change = initial sea level + (N_gia_rate+N_esa_rate) * dt + steric_rate + dynamic_rate dt*/ 363 femmodel->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 364 sealevel->AXPY(steric_rate_g,dt); 365 sealevel->AXPY(dynamic_rate_g,dt); 326 GetVectorFromInputsx(&deltadsl,femmodel,DeltaDslEnum,VertexSIdEnum); 327 GetVectorFromInputsx(&deltastr,femmodel,DeltaStrEnum,VertexSIdEnum); 328 329 /*compute: sea level change = initial sea level + steric + dynamic*/ 330 sealevel->AXPY(deltadsl,1); 331 sealevel->AXPY(deltastr,1); 366 332 367 333 /*cumulate thermal steric rate:*/ … … 369 335 femmodel->parameters->FindParam(&cumbslc,CumBslcEnum); 370 336 371 gmtslc= steric_rate_g->Max()*dt;337 gmtslc=deltastr->Norm(NORM_TWO); 372 338 cumgmtslc+=gmtslc; 373 339 cumgmslc=cumbslc+cumgmtslc; … … 389 355 /*Free ressources:*/ 390 356 delete sealevel; 391 delete steric_rate_g;392 delete d ynamic_rate_g;357 delete deltadsl; 358 delete deltastr; 393 359 } 394 360 /*}}}*/ 361 void coupleroutput_core(FemModel* femmodel){ /*{{{*/ 362 363 /*parameters:*/ 364 int iscoupling; 365 int horiz=0; 366 367 /*retrieve more parameters:*/ 368 femmodel->parameters->FindParam(&iscoupling,IsSlcCouplingEnum); 369 femmodel->parameters->FindParam(&horiz,SolidearthSettingsHorizEnum); 370 371 if(iscoupling){ 372 /*transfer sea level back to ice caps:*/ 373 TransferSealevel(femmodel,SealevelEnum); 374 TransferSealevel(femmodel,BedEnum); 375 if(horiz){ 376 TransferSealevel(femmodel,BedNorthEnum); 377 TransferSealevel(femmodel,BedEastEnum); 378 } 379 } 380 }; /*}}}*/ 395 381 396 382 //Geometry: … … 492 478 IssmDouble* cumbslchydro_partition=NULL; 493 479 int nparthydro; 480 int computesealevel=0; 481 482 /*early return if we are not computing sea level, but rather deformation: */ 483 femmodel->parameters->FindParam(&computesealevel,SolidearthSettingsComputesealevelchangeEnum); 484 if (!computesealevel)return NULL; 494 485 495 486 if(VerboseSolution()) _printf0_(" computing bslc components on ice\n"); … … 581 572 IssmDouble eps_abs; 582 573 IssmDouble Ixz, Iyz, Izz; 574 int computesealevel=0; 575 576 /*early return if we are not computing sea level, but rather deformation: */ 577 femmodel->parameters->FindParam(&computesealevel,SolidearthSettingsComputesealevelchangeEnum); 578 if (!computesealevel)return NULL; 583 579 584 580 if(VerboseSolution()) _printf0_(" converging on ocean components\n"); … … 677 673 678 674 Vector<IssmDouble> *U_grd = NULL; 675 Vector<IssmDouble> *dUdt_grd = NULL; 679 676 Vector<IssmDouble> *N_grd = NULL; 680 677 Vector<IssmDouble> *U_north_grd = NULL; … … 692 689 IssmDouble *zz = NULL; 693 690 int horiz; 691 int grdmodel; 694 692 695 693 if(VerboseSolution()) _printf0_(" computing vertical and horizontal geodetic signatures\n"); … … 697 695 /*retrieve some parameters:*/ 698 696 femmodel->parameters->FindParam(&horiz,SolidearthSettingsHorizEnum); 697 femmodel->parameters->FindParam(&grdmodel,GrdModelEnum); 699 698 700 699 /*find size of vectors:*/ … … 703 702 /*intialize vectors:*/ 704 703 U_grd = new Vector<IssmDouble>(gsize); 704 if(grdmodel==IvinsEnum) dUdt_grd = new Vector<IssmDouble>(gsize); 705 705 N_grd = new Vector<IssmDouble>(gsize); 706 706 if (horiz){ … … 713 713 VertexCoordinatesx(&xx,&yy,&zz,femmodel->vertices); 714 714 715 /*call the elastic main modlule:*/ 716 femmodel->SealevelchangeDeformation(N_grd, U_grd,U_north_grd,U_east_grd,RSLg, masks); 715 /*call the deformation module: */ 716 switch(grdmodel){ 717 case NoneEnum: 718 //do nothing: 719 break; 720 case IvinsEnum: 721 femmodel->IvinsDeformation(U_grd,dUdt_grd,xx,yy); 722 break; 723 case ElasticEnum: 724 femmodel->SealevelchangeDeformation(N_grd, U_grd,U_north_grd,U_east_grd,RSLg, masks); 725 break; 726 default: 727 _error_("Grd model " << EnumToStringx(grdmodel) << " not supported yet"); 728 } 717 729 718 730 /*Assign output pointers:*/ … … 731 743 xDelete<IssmDouble>(zz); 732 744 xDelete<IssmDouble>(radius); 733 } 734 /*}}}*/ 735 736 //Ocean: 737 void GetDynamicRate(Vector<IssmDouble> ** pdynamic_rate_g, FemModel* femmodel){ /*{{{*/ 738 739 int dslmodel=-1; 740 IssmDouble time; 741 742 /*variables:*/ 743 Vector<IssmDouble> *dynamic_rate_g = NULL; 744 745 /*Update steric rates before retrieving them on Vertex SID set:*/ 746 femmodel->parameters->FindParam(&dslmodel,DslModelEnum); 747 femmodel->parameters->FindParam(&time,TimeEnum); 748 if(dslmodel==1){ 749 TransientInput* transient_input = femmodel->inputs->GetTransientInput(DslSeaSurfaceHeightChangeAboveGeoidEnum); 750 TriaInput* tria_input=transient_input->GetTriaInput(time); 751 Input* tria_input_copy=tria_input->copy(); 752 tria_input_copy->ChangeEnum(DslDynamicRateEnum); 753 femmodel->inputs->AddInput(tria_input_copy); 754 } 755 else if(dslmodel==2){ 756 757 IssmDouble modelid; 758 759 /*Recover modelid:*/ 760 femmodel->parameters->FindParam(&modelid,DslModelidEnum); 761 modelid--; //from matlab. 762 763 /*find the DslSeaSurfaceHeightChangeAboveGeoidEnum dataset of transient inputs:*/ 764 DatasetInput* dataset_input=femmodel->inputs->GetDatasetInput(DslSeaSurfaceHeightChangeAboveGeoidEnum); 765 766 /*Go find the modelid'th transient input:*/ 767 TriaInput* tria_input=dataset_input->GetTriaInputByOffset(reCast<int, IssmDouble>(modelid)); 768 769 /*Plug into DslDynamicRate input: */ 770 Input* tria_input_copy=tria_input->copy(); 771 tria_input_copy->ChangeEnum(DslDynamicRateEnum); 772 femmodel->inputs->AddInput(tria_input_copy); 773 } 774 else _error_("not implemented yet"); 775 776 GetVectorFromInputsx(&dynamic_rate_g,femmodel,DslDynamicRateEnum,VertexSIdEnum); 777 *pdynamic_rate_g=dynamic_rate_g; 778 } 779 /*}}}*/ 780 void GetStericRate(Vector<IssmDouble> ** psteric_rate_g, FemModel* femmodel){ /*{{{*/ 781 782 int dslmodel=-1; 783 IssmDouble time; 784 785 /*variables:*/ 786 Vector<IssmDouble> *steric_rate_g = NULL; 787 788 /*Update steric rates before retrieving them on Vertex SID set:*/ 789 femmodel->parameters->FindParam(&dslmodel,DslModelEnum); 790 femmodel->parameters->FindParam(&time,TimeEnum); 791 if(dslmodel==1){ 792 TransientInput* transient_input = femmodel->inputs->GetTransientInput(DslGlobalAverageThermostericSeaLevelChangeEnum); 793 TriaInput* tria_input=transient_input->GetTriaInput(time); 794 Input* tria_input_copy=tria_input->copy(); 795 tria_input_copy->ChangeEnum(DslStericRateEnum); 796 femmodel->inputs->AddInput(tria_input_copy); 797 } 798 else if (dslmodel==2){ 799 IssmDouble modelid; 800 801 /*Recover modelid:*/ 802 femmodel->parameters->FindParam(&modelid,DslModelidEnum); 803 804 modelid--; //from matlab. 805 806 /*find the DslGlobalAverageThermostericSeaLevelChangeEnum dataset of transient inputs:*/ 807 DatasetInput* dataset_input=femmodel->inputs->GetDatasetInput(DslGlobalAverageThermostericSeaLevelChangeEnum); 808 809 /*Go find the modelid'th transient input:*/ 810 TriaInput* tria_input=dataset_input->GetTriaInputByOffset(reCast<int, IssmDouble>(modelid)); 811 812 /*Plug into DslStericRate input: */ 813 Input* tria_input_copy=tria_input->copy(); 814 tria_input_copy->ChangeEnum(DslStericRateEnum); 815 femmodel->inputs->AddInput(tria_input_copy); 816 } 817 else _error_("not implemented yet"); 818 819 GetVectorFromInputsx(&steric_rate_g,femmodel,DslStericRateEnum,VertexSIdEnum); 820 *psteric_rate_g=steric_rate_g; 821 } 822 /*}}}*/ 823 void SetBottomPressure(FemModel* femmodel){ /*{{{*/ 824 825 int dslmodel=-1; 826 int type; 827 828 /*If we are running a dsl mme model, we need to update the bottom pressure first: */ 829 femmodel->parameters->FindParam(&dslmodel,DslModelEnum); 830 if(dslmodel==2){ 831 832 IssmDouble modelid; 833 /*figure out the type of DslSeaWaterPressureChangeAtSeaFloor input:*/ 834 type=femmodel->inputs->GetInputObjectEnum(DslSeaWaterPressureChangeAtSeaFloorEnum); 835 836 if(type==DatasetInputEnum){ 837 838 /*find the DslSeaWaterPressureChangeAtSeaFloor dataset of transient inputs:*/ 839 DatasetInput* dataset_input=femmodel->inputs->GetDatasetInput(DslSeaWaterPressureChangeAtSeaFloorEnum); 840 841 /*Recover modelid:*/ 842 femmodel->parameters->FindParam(&modelid,DslModelidEnum); 843 modelid--; //from matlab. 844 845 /*Go find the modelid'th transient input:*/ 846 TransientInput* transient_input=dataset_input->GetTransientInputByOffset(reCast<int, IssmDouble>(modelid)); 847 848 /*Plug into DslSeaWaterPressureChangeAtSeaFloor input: */ 849 Input* transient_input_copy=transient_input->copy(); 850 transient_input_copy->ChangeEnum(DslSeaWaterPressureChangeAtSeaFloorEnum); 851 femmodel->inputs->AddInput(transient_input_copy); 852 } 853 } 745 if(grdmodel==IvinsEnum)delete dUdt_grd; 854 746 } 855 747 /*}}}*/ … … 870 762 int* transitions_n=NULL; 871 763 int nv; 764 int existforcing=0; 872 765 873 766 /*communicators:*/ … … 900 793 if(modelid!=earthid){ 901 794 nv=femmodel->vertices->NumberOfVertices(); 902 GetVectorFromInputsx(&forcing,femmodel,forcingenum,VertexSIdEnum); 795 existforcing=reCast<int>(femmodel->inputs->Exist(forcingenum)); 796 if(existforcing)GetVectorFromInputsx(&forcing,femmodel,forcingenum,VertexSIdEnum); 903 797 } 904 798 … … 909 803 nvs=xNew<int>(nummodels-1); 910 804 for(int i=0;i<earthid;i++){ 911 ISSM_MPI_Recv(nvs+i, 1, ISSM_MPI_INT, 0,i, fromcomms[i], &status); 912 forcings[i]=xNew<IssmDouble>(nvs[i]); 913 ISSM_MPI_Recv(forcings[i], nvs[i], ISSM_MPI_DOUBLE, 0,i, fromcomms[i], &status); 805 ISSM_MPI_Recv(&existforcing, 1, ISSM_MPI_INT, 0,i, fromcomms[i], &status); 806 if(existforcing){ 807 ISSM_MPI_Recv(nvs+i, 1, ISSM_MPI_INT, 0,i, fromcomms[i], &status); 808 forcings[i]=xNew<IssmDouble>(nvs[i]); 809 ISSM_MPI_Recv(forcings[i], nvs[i], ISSM_MPI_DOUBLE, 0,i, fromcomms[i], &status); 810 } 811 else{ 812 forcings[i]=NULL; 813 } 914 814 } 915 815 916 816 } 917 817 else{ 918 ISSM_MPI_Send(&nv, 1, ISSM_MPI_INT, 0, modelid, tocomm); 919 ISSM_MPI_Send(forcing, nv, ISSM_MPI_DOUBLE, 0, modelid, tocomm); 818 ISSM_MPI_Send(&existforcing, 1, ISSM_MPI_INT, 0, modelid, tocomm); 819 if(existforcing){ 820 ISSM_MPI_Send(&nv, 1, ISSM_MPI_INT, 0, modelid, tocomm); 821 ISSM_MPI_Send(forcing, nv, ISSM_MPI_DOUBLE, 0, modelid, tocomm); 822 } 920 823 } 921 824 } … … 940 843 941 844 IssmDouble* forcingfromcap= forcings[i]; //careful, this only exists on rank 0 of the earth model! 942 IssmDouble* transition=transitions[i]; 943 int M=transitions_m[i]; 944 945 /*build index to plug values: */ 946 int* index=xNew<int>(M); for(int i=0;i<M;i++)index[i]=reCast<int>(transition[i])-1; //matlab indexing! 947 948 /*We are going to plug this vector into the earth model, at the right vertices corresponding to this particular 949 * ice cap: */ 950 forcingglobal->SetValues(M,index,forcingfromcap,ADD_VAL); 951 xDelete<int>(index); 845 if(forcingfromcap){ 846 IssmDouble* transition=transitions[i]; 847 int M=transitions_m[i]; 848 849 /*build index to plug values: */ 850 int* index=xNew<int>(M); for(int i=0;i<M;i++)index[i]=reCast<int>(transition[i])-1; //matlab indexing! 851 852 /*We are going to plug this vector into the earth model, at the right vertices corresponding to this particular 853 * ice cap: */ 854 forcingglobal->SetValues(M,index,forcingfromcap,ADD_VAL); 855 xDelete<int>(index); 856 } 952 857 } 953 858 } … … 964 869 if(forcings){ 965 870 for(int i=0;i<nummodels-1;i++){ 966 IssmDouble* temp=forcings[i]; xDelete<IssmDouble>(temp); 871 IssmDouble* temp=forcings[i]; 872 if(temp)xDelete<IssmDouble>(temp); 967 873 } 968 874 xDelete<IssmDouble*>(forcings); … … 1039 945 femmodel->parameters->FindParam(&transitions,&ntransitions,&transitions_m,&transitions_n,SealevelchangeTransitionsEnum); 1040 946 1041 if(ntransitions!=earthid)_error_("TransferSea Level error message: number of transition vectors is not equal to the number of icecaps!");947 if(ntransitions!=earthid)_error_("TransferSealevel error message: number of transition vectors is not equal to the number of icecaps!"); 1042 948 1043 949 for(int i=0;i<earthid;i++){ … … 1087 993 1088 994 } /*}}}*/ 1089 void EarthMassTransport(FemModel* femmodel){ /*{{{*/1090 1091 IssmDouble time,dt;1092 Vector<IssmDouble> *oldthickness = NULL;1093 Vector<IssmDouble> *newthickness = NULL;1094 Vector<IssmDouble> *deltathickness = NULL;1095 Vector<IssmDouble> *cumdeltathickness = NULL;1096 int nv;1097 1098 if(VerboseSolution()) _printf0_(" computing earth mass transport\n");1099 1100 /*This module has to be recoded! We do not grab spc thicknesses from an earth model1101 * anymore! Thicknesses come from a mass transport module applied to each basin!1102 * Commeting out for now:*/1103 _error_("EarthMassTransport error message: not supported anymore!");1104 1105 /*This mass transport module for the Earth is because we might have thickness variations as spcs1106 * specified in the md.solidearth class, outside of what we will get from the icecaps. That's why we get t1107 * the thickness variations from SealevelchangeSpcthicknessEnum.*/1108 1109 /*No mass transport module was called, so we are just going to retrieve the geometry thickness1110 * at this time step, at prior time step, and plug the difference as deltathickness: */1111 /*femmodel->parameters->FindParam(&time,TimeEnum);1112 femmodel->parameters->FindParam(&dt,TimesteppingTimeStepEnum);1113 nv=femmodel->vertices->NumberOfVertices();1114 1115 GetVectorFromInputsx(&newthickness,femmodel,SealevelchangeSpcthicknessEnum,VertexSIdEnum);1116 GetVectorFromInputsx(&oldthickness,femmodel,SealevelchangeSpcthicknessEnum,VertexSIdEnum,time-dt);*/1117 1118 /*compute deltathickness: */1119 /*deltathickness = new Vector<IssmDouble>(nv);1120 newthickness->Copy(deltathickness); deltathickness->AXPY(oldthickness,-1); */1121 1122 /*plug into elements:*/1123 // InputUpdateFromVectorx(femmodel,deltathickness,SurfaceloadIceThicknessChangeEnum,VertexSIdEnum);1124 1125 /*add to cumulated delta thickness: */1126 /*GetVectorFromInputsx(&cumdeltathickness,femmodel,SealevelchangeCumDeltathicknessEnum,VertexSIdEnum);1127 cumdeltathickness->AXPY(deltathickness,1);1128 InputUpdateFromVectorx(femmodel,cumdeltathickness,SealevelchangeCumDeltathicknessEnum,VertexSIdEnum);*/1129 1130 /*free ressources:*/1131 /*delete oldthickness;1132 delete newthickness;1133 delete deltathickness;1134 delete cumdeltathickness;*/1135 1136 } /*}}}*/1137 995 void slcconvergence(bool* pconverged, Vector<IssmDouble>* RSLg,Vector<IssmDouble>* RSLg_old,IssmDouble eps_rel,IssmDouble eps_abs){ /*{{{*/ 1138 996 -
issm/trunk-jpl/src/c/cores/transient_core.cpp
r26010 r26047 62 62 #endif 63 63 64 if(isslc) sealevelchange_geometry(femmodel);65 66 64 while(time < finaltime - (yts*DBL_EPSILON)){ //make sure we run up to finaltime. 67 65 … … 138 136 139 137 /*parameters: */ 140 bool isstressbalance,ismasstransport,is smb,isthermal,isgroundingline,isgia,isesa,issampling;;138 bool isstressbalance,ismasstransport,isoceantransport,issmb,isthermal,isgroundingline,isesa,issampling;; 141 139 bool isslc,ismovingfront,isdamageevolution,ishydrology,isoceancoupling,save_results; 142 140 int step,sb_coupling_frequency; … … 150 148 femmodel->parameters->FindParam(&isstressbalance,TransientIsstressbalanceEnum); 151 149 femmodel->parameters->FindParam(&ismasstransport,TransientIsmasstransportEnum); 150 femmodel->parameters->FindParam(&isoceantransport,TransientIsoceantransportEnum); 152 151 femmodel->parameters->FindParam(&issmb,TransientIssmbEnum); 153 152 femmodel->parameters->FindParam(&isthermal,TransientIsthermalEnum); 154 femmodel->parameters->FindParam(&isgia,TransientIsgiaEnum);155 153 femmodel->parameters->FindParam(&isesa,TransientIsesaEnum); 156 154 femmodel->parameters->FindParam(&isslc,TransientIsslcEnum); … … 221 219 } 222 220 221 if(isoceantransport){ 222 oceantransport_core(femmodel); 223 } 224 223 225 if(isgroundingline){ 224 226 groundingline_core(femmodel); 225 227 } 226 228 227 if(isgia){228 #ifdef _HAVE_GIA_229 gia_core(femmodel);230 #else231 _error_("ISSM was not compiled with gia capabilities. Exiting");232 #endif233 }234 235 229 /*esa: */ 236 230 if(isesa) esa_core(femmodel); 237 231 238 232 /*Sea level change: */ 239 if(isslc){ 240 if(VerboseSolution()) _printf0_(" computing sea level change\n"); 241 sealevelchange_core(femmodel); 242 } 233 if(isslc) sealevelchange_core(femmodel); 243 234 244 235 /*Sampling: */ -
issm/trunk-jpl/src/c/main/issm.cpp
r18237 r26047 15 15 /*Initialize femmodel from arguments provided command line: */ 16 16 FemModel *femmodel = new FemModel(argc,argv,comm_init); 17 18 /*Need to know we are firing up from ISSM main, not a coupler driver like issm_slcp or issm_ocean:*/ 19 femmodel->parameters->AddObject(new IntParam(IsSlcCouplingEnum,0)); 17 20 18 21 /*Solve: */ -
issm/trunk-jpl/src/c/main/issm_slc.cpp
r25956 r26047 100 100 femmodel->parameters->AddObject(new IntParam(ModelIdEnum,modelid)); 101 101 femmodel->parameters->AddObject(new IntParam(EarthIdEnum,earthid)); 102 femmodel->parameters->AddObject(new IntParam(IsSlcCouplingEnum,1)); 102 103 if(modelid==earthid) femmodel->parameters->AddObject(new GenericParam<ISSM_MPI_Comm*>(fromicecomms,IcecapToEarthCommEnum)); 103 104 else femmodel->parameters->AddObject(new GenericParam<ISSM_MPI_Comm>(toearthcomm,IcecapToEarthCommEnum)); -
issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
r25960 r26047 38 38 femmodel->parameters->FindParam(&variable_partitions_nt,NULL,NULL,QmuVariablePartitionsNtEnum); 39 39 40 41 40 /*Go through all dakota descriptors, ex: "rho_ice","thermal_conductivity","thickness1","thickness2", etc ..., and 42 41 * for each descriptor, take the variable value and plug it into the inputs (more or less :)): … … 169 168 170 169 171 if (femmodel->inputs->GetInputObjectEnum( SurfaceloadIceThicknessRateEnum)==DatasetInputEnum)172 MmeToInput(femmodel,distributed_values,variable_partition,npart, SurfaceloadIceThicknessRateEnum, P0Enum);170 if (femmodel->inputs->GetInputObjectEnum(MasstransportSpcthicknessEnum)==DatasetInputEnum) 171 MmeToInput(femmodel,distributed_values,variable_partition,npart,MasstransportSpcthicknessEnum, P0Enum); 173 172 174 173 if (femmodel->inputs->GetInputObjectEnum(MaskIceLevelsetEnum)==DatasetInputEnum) -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
r25627 r26047 179 179 180 180 //go through list of materials, and create them: 181 for(int i=0;i<nnat;i++){ 182 switch(IoCodeToEnumNature(nature[i])){ //{{{ 183 case MaticeEnum: 184 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_B",MaterialsRheologyBEnum); 185 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_n",MaterialsRheologyNEnum); 186 for (i=0;i<iomodel->numberofelements;i++) if(iomodel->my_elements[i]) materials->AddObject(new Matice(i+1,i,iomodel)); 187 switch(iomodel->domaindim){ 188 case 2: 189 inputs->DuplicateInput(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum); 190 break; 191 case 3: 192 break; 193 default: 194 _error_("Mesh not supported yet"); 195 } 181 for(int i=0;i<nnat;i++){ 182 switch(IoCodeToEnumNature(nature[i])){ 183 case MaticeEnum:{ /*{{{*/ 184 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_B",MaterialsRheologyBEnum); 185 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_n",MaterialsRheologyNEnum); 186 for (int k=0;k<iomodel->numberofelements;k++) if(iomodel->my_elements[k]) materials->AddObject(new Matice(k+1,k,MaticeEnum)); 187 switch(iomodel->domaindim){ 188 case 2: 189 inputs->DuplicateInput(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum); 190 break; 191 case 3: 192 break; 193 default: 194 _error_("Mesh not supported yet"); 195 } 196 _printf_("Matice " << nnat << "\n"); 197 } /*}}}*/ 196 198 break; 197 199 case MatlithoEnum: 198 iomodel->FetchData(9,"md.materials.radius","md.materials.viscosity","md.materials.lame_lambda","md.materials.lame_mu","md.materials.burgers_viscosity","md.materials.burgers_mu","md.materials.isburgers","md.materials.issolid","md.materials.density"); 199 materials->AddObject(new Matlitho(materials->Size()+1,iomodel)); 200 iomodel->DeleteData(9,"md.materials.radius","md.materials.viscosity","md.materials.lame_lambda","md.materials.lame_mu","md.materials.burgers_viscosity","md.materials.burgers_mu","md.materials.isburgers","md.materials.issolid","md.materials.density"); 200 { /*{{{*/ 201 iomodel->FetchData(9,"md.materials.radius","md.materials.viscosity","md.materials.lame_lambda","md.materials.lame_mu","md.materials.burgers_viscosity","md.materials.burgers_mu","md.materials.isburgers","md.materials.issolid","md.materials.density"); 202 materials->AddObject(new Matlitho(materials->Size()+1,iomodel)); 203 iomodel->DeleteData(9,"md.materials.radius","md.materials.viscosity","md.materials.lame_lambda","md.materials.lame_mu","md.materials.burgers_viscosity","md.materials.burgers_mu","md.materials.isburgers","md.materials.issolid","md.materials.density"); 204 _printf_("Matlitho " << nnat << "\n"); 205 } 206 /*}}}*/ 201 207 break; 202 203 case MathydroEnum: 204 { 208 case MathydroEnum: /*{{{*/ 209 { 205 210 /*If we don't have any materials pointed to by elements (meaning, if we are running only litho or hydro), 206 211 * then we need to zero out the hmaterial pointers inside the elements dataset so that it won't error out … … 208 213 bool isice=false; 209 214 for (int j=0;j<nnat;j++){ 210 if((IoCodeToEnumNature(nature[ i])==MaticeEnum)||211 (IoCodeToEnumNature(nature[ i])==MatenhancediceEnum)||212 (IoCodeToEnumNature(nature[ i])==MatestarEnum)||213 (IoCodeToEnumNature(nature[ i])==MatdamageiceEnum)){215 if((IoCodeToEnumNature(nature[j])==MaticeEnum)|| 216 (IoCodeToEnumNature(nature[j])==MatenhancediceEnum)|| 217 (IoCodeToEnumNature(nature[j])==MatestarEnum)|| 218 (IoCodeToEnumNature(nature[j])==MatdamageiceEnum)){ 214 219 isice=true; break; } 215 220 } … … 230 235 } 231 236 } 232 } 237 } /*}}}*/ 233 238 break; 234 235 case MatenhancediceEnum: 239 case MatenhancediceEnum: /*{{{*/ 236 240 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_B",MaterialsRheologyBEnum); 237 241 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_n",MaterialsRheologyNEnum); 238 242 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_E",MaterialsRheologyEEnum); 239 for (i =0;i<iomodel->numberofelements;i++) if(iomodel->my_elements[i]) materials->AddObject(new Matice(i+1,i,iomodel));243 for (int i=0;i<iomodel->numberofelements;i++) if(iomodel->my_elements[i]) materials->AddObject(new Matice(i+1,i,MatenhancediceEnum)); 240 244 switch(iomodel->domaindim){ 241 245 case 2: … … 248 252 _error_("Mesh not supported yet"); 249 253 } 254 /*}}}*/ 250 255 break; 251 case MatdamageiceEnum: 256 case MatdamageiceEnum: /*{{{*/ 252 257 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_B",MaterialsRheologyBEnum); 253 258 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_n",MaterialsRheologyNEnum); 254 259 iomodel->FetchDataToInput(inputs,elements,"md.damage.D",DamageDEnum); 255 for (i =0;i<iomodel->numberofelements;i++) if(iomodel->my_elements[i]) materials->AddObject(new Matice(i+1,i,iomodel));260 for (int i=0;i<iomodel->numberofelements;i++) if(iomodel->my_elements[i]) materials->AddObject(new Matice(i+1,i,MatdamageiceEnum)); 256 261 switch(iomodel->domaindim){ 257 262 case 2: … … 264 269 _error_("Mesh not supported yet"); 265 270 } 271 /*}}}*/ 266 272 break; 267 case MatestarEnum: 273 case MatestarEnum: /*{{{*/ 268 274 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_B",MaterialsRheologyBEnum); 269 275 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_Ec",MaterialsRheologyEcEnum); 270 276 iomodel->FetchDataToInput(inputs,elements,"md.materials.rheology_Es",MaterialsRheologyEsEnum); 271 for(i =0;i<iomodel->numberofelements;i++) if(iomodel->my_elements[i]) materials->AddObject(new Matestar(i+1,i,iomodel));277 for(int i=0;i<iomodel->numberofelements;i++) if(iomodel->my_elements[i]) materials->AddObject(new Matestar(i+1,i,iomodel)); 272 278 switch(iomodel->domaindim){ 273 279 case 2: … … 280 286 default: 281 287 _error_("Mesh not supported yet"); 282 } 283 break;284 288 } 289 /*}}}*/ 290 break; 285 291 default: 286 292 _error_("Materials nature type "<<EnumToStringx(IoCodeToEnumNature(nature[i]))<<" not supported"); 287 288 } //}}}293 break; 294 } 289 295 } 290 296 //Free ressources: -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r26010 r26047 63 63 parameters->AddObject(iomodel->CopyConstantObject("md.calving.law",CalvingLawEnum)); 64 64 parameters->AddObject(iomodel->CopyConstantObject("md.frontalforcings.parameterization",FrontalForcingsParamEnum)); 65 parameters->AddObject(iomodel->CopyConstantObject("md.solidearth.settings.isgrd",SolidearthSettingsGRDEnum)); 66 parameters->AddObject(iomodel->CopyConstantObject("md.solidearth.settings.grdmodel",GrdModelEnum)); 67 parameters->AddObject(iomodel->CopyConstantObject("md.solidearth.settings.runfrequency",SolidearthSettingsRunFrequencyEnum)); 65 68 parameters->AddObject(new IntParam(SealevelchangeRunCountEnum,1)); 66 69 … … 74 77 parameters->AddObject(iomodel->CopyConstantObject("md.transient.isstressbalance",TransientIsstressbalanceEnum)); 75 78 parameters->AddObject(iomodel->CopyConstantObject("md.transient.ismasstransport",TransientIsmasstransportEnum)); 79 parameters->AddObject(iomodel->CopyConstantObject("md.transient.isoceantransport",TransientIsoceantransportEnum)); 76 80 parameters->AddObject(iomodel->CopyConstantObject("md.transient.issmb",TransientIssmbEnum)); 77 81 parameters->AddObject(iomodel->CopyConstantObject("md.transient.isthermal",TransientIsthermalEnum)); 78 82 parameters->AddObject(iomodel->CopyConstantObject("md.transient.isgroundingline",TransientIsgroundinglineEnum)); 79 parameters->AddObject(iomodel->CopyConstantObject("md.transient.isgia",TransientIsgiaEnum));80 83 parameters->AddObject(iomodel->CopyConstantObject("md.transient.isesa",TransientIsesaEnum)); 81 84 parameters->AddObject(iomodel->CopyConstantObject("md.transient.isdamageevolution",TransientIsdamageevolutionEnum)); … … 83 86 parameters->AddObject(iomodel->CopyConstantObject("md.transient.ismovingfront",TransientIsmovingfrontEnum)); 84 87 parameters->AddObject(iomodel->CopyConstantObject("md.transient.isslc",TransientIsslcEnum)); 85 parameters->AddObject(iomodel->CopyConstantObject("md.transient.iscoupler",TransientIscouplerEnum));86 88 parameters->AddObject(iomodel->CopyConstantObject("md.transient.isoceancoupling",TransientIsoceancouplingEnum)); 87 89 parameters->AddObject(iomodel->CopyConstantObject("md.transient.amr_frequency",TransientAmrFrequencyEnum)); … … 356 358 parameters->AddObject(iomodel->CopyConstantObject("md.constants.g",ConstantsGEnum)); 357 359 parameters->AddObject(iomodel->CopyConstantObject("md.materials.rheology_law",MaterialsRheologyLawEnum)); 358 359 360 /*slc:*/ 360 parameters->AddObject(iomodel->CopyConstantObject("md.materials.earth_density",MaterialsEarthDensityEnum));361 361 break; 362 362 case MathydroEnum: 363 363 parameters->AddObject(iomodel->CopyConstantObject("md.materials.rho_ice",MaterialsRhoIceEnum)); 364 364 parameters->AddObject(iomodel->CopyConstantObject("md.materials.rho_water",MaterialsRhoSeawaterEnum)); 365 parameters->AddObject(iomodel->CopyConstantObject("md.materials.earth_density",MaterialsEarthDensityEnum));366 365 parameters->AddObject(iomodel->CopyConstantObject("md.materials.rho_freshwater",MaterialsRhoFreshwaterEnum)); 367 366 break; 368 367 } 369 368 } 369 parameters->AddObject(iomodel->CopyConstantObject("md.materials.earth_density",MaterialsEarthDensityEnum)); 370 370 /*Free rssources:*/ 371 371 xDelete<int>(nature); -
issm/trunk-jpl/src/c/modules/modules.h
r25840 r26047 72 72 #include "./SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.h" 73 73 #include "./ModelProcessorx/ModelProcessorx.h" 74 #include "./MmeToInputFromIdx/MmeToInputFromIdx.h" 74 75 #include "./ParseToolkitsOptionsx/ParseToolkitsOptionsx.h" 75 76 #include "./NodalValuex/NodalValuex.h" -
issm/trunk-jpl/src/c/shared/Enum/Enum.vim
r26004 r26047 142 142 syn keyword cConstant SolidearthExternalModelidEnum 143 143 syn keyword cConstant SolidearthExternalNummodelsEnum 144 syn keyword cConstant DslComputeFingerprintsEnum144 syn keyword cConstant SolidearthSettingsComputeBpGrdEnum 145 145 syn keyword cConstant EarthIdEnum 146 syn keyword cConstant ElasticEnum 146 147 syn keyword cConstant EplZigZagCounterEnum 147 148 syn keyword cConstant EsaHElasticEnum … … 173 174 syn keyword cConstant FrontalForcingsNumberofBasinsEnum 174 175 syn keyword cConstant FrontalForcingsParamEnum 175 syn keyword cConstant GiaModelEnum 176 syn keyword cConstant GiaModelidEnum 177 syn keyword cConstant GiaNummodelsEnum 178 syn keyword cConstant GiaCrossSectionShapeEnum 176 syn keyword cConstant GrdModelEnum 179 177 syn keyword cConstant GroundinglineFrictionInterpolationEnum 180 178 syn keyword cConstant GroundinglineMeltInterpolationEnum … … 247 245 syn keyword cConstant InversionStepThresholdEnum 248 246 syn keyword cConstant InversionTypeEnum 247 syn keyword cConstant IvinsEnum 248 syn keyword cConstant IsSlcCouplingEnum 249 249 syn keyword cConstant LevelsetKillIcebergsEnum 250 250 syn keyword cConstant LevelsetReinitFrequencyEnum … … 275 275 syn keyword cConstant MaterialsHeatcapacityEnum 276 276 syn keyword cConstant MaterialsLatentheatEnum 277 syn keyword cConstant MaterialsLithosphereDensityEnum278 syn keyword cConstant MaterialsLithosphereShearModulusEnum279 syn keyword cConstant MaterialsMantleDensityEnum280 syn keyword cConstant MaterialsMantleShearModulusEnum281 277 syn keyword cConstant MaterialsMeltingpointEnum 282 278 syn keyword cConstant MaterialsMixedLayerCapacityEnum … … 347 343 syn keyword cConstant SolidearthPlanetAreaEnum 348 344 syn keyword cConstant SolidearthSettingsAbstolEnum 345 syn keyword cConstant SolidearthSettingsCrossSectionShapeEnum 349 346 syn keyword cConstant RotationalAngularVelocityEnum 350 347 syn keyword cConstant SolidearthSettingsElasticEnum … … 486 483 syn keyword cConstant ToolkitsTypesEnum 487 484 syn keyword cConstant TransientAmrFrequencyEnum 488 syn keyword cConstant TransientIscouplerEnum489 485 syn keyword cConstant TransientIsdamageevolutionEnum 490 486 syn keyword cConstant TransientIsesaEnum … … 493 489 syn keyword cConstant TransientIshydrologyEnum 494 490 syn keyword cConstant TransientIsmasstransportEnum 491 syn keyword cConstant TransientIsoceantransportEnum 495 492 syn keyword cConstant TransientIsmovingfrontEnum 496 493 syn keyword cConstant TransientIsoceancouplingEnum … … 506 503 syn keyword cConstant ParametersENDEnum 507 504 syn keyword cConstant InputsSTARTEnum 505 syn keyword cConstant AccumulatedDeltaBottomPressureEnum 506 syn keyword cConstant AccumulatedDeltaIceThicknessEnum 507 syn keyword cConstant AccumulatedDeltaTwsEnum 508 508 syn keyword cConstant AdjointEnum 509 509 syn keyword cConstant AdjointpEnum … … 548 548 syn keyword cConstant BedSlopeXEnum 549 549 syn keyword cConstant BedSlopeYEnum 550 syn keyword cConstant BottomPressureEnum 551 syn keyword cConstant BottomPressureOldEnum 550 552 syn keyword cConstant CalvingCalvingrateEnum 551 553 syn keyword cConstant CalvingHabFractionEnum … … 569 571 syn keyword cConstant DegreeOfChannelizationEnum 570 572 syn keyword cConstant DepthBelowSurfaceEnum 573 syn keyword cConstant DeltaIceThicknessEnum 574 syn keyword cConstant DeltaTwsEnum 575 syn keyword cConstant DeltaBottomPressureEnum 576 syn keyword cConstant DeltaDslEnum 577 syn keyword cConstant DslOldEnum 578 syn keyword cConstant DslEnum 579 syn keyword cConstant DeltaStrEnum 580 syn keyword cConstant StrOldEnum 581 syn keyword cConstant StrEnum 571 582 syn keyword cConstant DeviatoricStresseffectiveEnum 572 583 syn keyword cConstant DeviatoricStressxxEnum … … 586 597 syn keyword cConstant DrivingStressXEnum 587 598 syn keyword cConstant DrivingStressYEnum 588 syn keyword cConstant DslGlobalAverageThermostericSeaLevelChangeEnum589 syn keyword cConstant DslSeaSurfaceHeightChangeAboveGeoidEnum590 syn keyword cConstant DslSeaWaterPressureChangeAtSeaFloorEnum591 syn keyword cConstant DslStericRateEnum592 syn keyword cConstant DslDynamicRateEnum593 syn keyword cConstant GiaMmeNgiaEnum594 syn keyword cConstant GiaMmeUgiaEnum595 599 syn keyword cConstant DummyEnum 596 600 syn keyword cConstant EffectivePressureEnum … … 605 609 syn keyword cConstant EplHeadSubstepEnum 606 610 syn keyword cConstant EplHeadTransientEnum 607 syn keyword cConstant EsaDeltathicknessEnum608 611 syn keyword cConstant EsaEmotionEnum 609 612 syn keyword cConstant EsaNmotionEnum … … 635 638 syn keyword cConstant FrontalForcingsThermalForcingEnum 636 639 syn keyword cConstant GeometryHydrostaticRatioEnum 637 syn keyword cConstant GiaLithosphereThicknessEnum638 syn keyword cConstant GiaMantleViscosityEnum639 640 syn keyword cConstant NGiaEnum 640 641 syn keyword cConstant NGiaRateEnum … … 669 670 syn keyword cConstant HydrologySheetThicknessEnum 670 671 syn keyword cConstant HydrologySheetThicknessOldEnum 672 syn keyword cConstant HydrologyTwsEnum 673 syn keyword cConstant HydrologyTwsSpcEnum 674 syn keyword cConstant HydrologyTwsAnalysisEnum 671 675 syn keyword cConstant HydrologyWatercolumnMaxEnum 672 676 syn keyword cConstant HydrologyWaterVxEnum … … 709 713 syn keyword cConstant NodeEnum 710 714 syn keyword cConstant OmegaAbsGradientEnum 715 syn keyword cConstant OceantransportSpcbottompressureEnum 716 syn keyword cConstant OceantransportSpcstrEnum 717 syn keyword cConstant OceantransportSpcdslEnum 711 718 syn keyword cConstant P0Enum 712 719 syn keyword cConstant P1Enum … … 739 746 syn keyword cConstant SealevelRSLBarystaticEnum 740 747 syn keyword cConstant SealevelRSLRateEnum 748 syn keyword cConstant SealevelUGrdEnum 749 syn keyword cConstant SealevelNGrdEnum 741 750 syn keyword cConstant SealevelUEastEsaEnum 742 syn keyword cConstant SealevelUEsaEnum743 syn keyword cConstant SealevelUEsaRateEnum744 751 syn keyword cConstant SealevelUNorthEsaEnum 745 syn keyword cConstant SealevelchangeCumDeltathicknessEnum746 syn keyword cConstant SealevelchangeCumDeltathicknessOldEnum747 syn keyword cConstant SurfaceloadRateEnum748 syn keyword cConstant SurfaceloadIceThicknessRateEnum749 syn keyword cConstant SurfaceloadWaterHeightRateEnum750 syn keyword cConstant SurfaceloadOtherRateEnum751 752 syn keyword cConstant SealevelchangeIndicesEnum 752 753 syn keyword cConstant SealevelchangeGEnum … … 917 918 syn keyword cConstant ThicknessPositiveEnum 918 919 syn keyword cConstant ThicknessResidualEnum 920 syn keyword cConstant TransientAccumulatedDeltaIceThicknessEnum 919 921 syn keyword cConstant VelEnum 920 922 syn keyword cConstant VxAverageEnum … … 938 940 syn keyword cConstant WaterheightEnum 939 941 syn keyword cConstant WeightsSurfaceObservationEnum 942 syn keyword cConstant OldAccumulatedDeltaBottomPressureEnum 943 syn keyword cConstant OldAccumulatedDeltaIceThicknessEnum 944 syn keyword cConstant OldAccumulatedDeltaTwsEnum 940 945 syn keyword cConstant Outputdefinition1Enum 941 946 syn keyword cConstant Outputdefinition10Enum … … 1152 1157 syn keyword cConstant GenericParamEnum 1153 1158 syn keyword cConstant GenericExternalResultEnum 1154 syn keyword cConstant GiaAnalysisEnum1155 syn keyword cConstant GiaSolutionEnum1156 1159 syn keyword cConstant Gradient1Enum 1157 1160 syn keyword cConstant Gradient2Enum … … 1273 1276 syn keyword cConstant NyeH2OEnum 1274 1277 syn keyword cConstant NumericalfluxEnum 1278 syn keyword cConstant OceantransportAnalysisEnum 1279 syn keyword cConstant OceantransportSolutionEnum 1275 1280 syn keyword cConstant OldGradientEnum 1276 1281 syn keyword cConstant OneLayerP4zEnum … … 1335 1340 syn keyword cConstant SealevelUmotionEnum 1336 1341 syn keyword cConstant SealevelchangeAnalysisEnum 1337 syn keyword cConstant SealevelchangeSolutionEnum1338 1342 syn keyword cConstant SegEnum 1339 1343 syn keyword cConstant SegInputEnum … … 1562 1566 syn keyword cType FreeSurfaceTopAnalysis 1563 1567 syn keyword cType GLheightadvectionAnalysis 1564 syn keyword cType GiaAnalysis1565 1568 syn keyword cType HydrologyDCEfficientAnalysis 1566 1569 syn keyword cType HydrologyDCInefficientAnalysis … … 1569 1572 syn keyword cType HydrologyShaktiAnalysis 1570 1573 syn keyword cType HydrologyShreveAnalysis 1574 syn keyword cType HydrologyTwsAnalysis 1571 1575 syn keyword cType L2ProjectionBaseAnalysis 1572 1576 syn keyword cType L2ProjectionEPLAnalysis … … 1575 1579 syn keyword cType MasstransportAnalysis 1576 1580 syn keyword cType MeltingAnalysis 1581 syn keyword cType OceantransportAnalysis 1577 1582 syn keyword cType SamplingAnalysis 1578 1583 syn keyword cType SealevelchangeAnalysis -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r26004 r26047 136 136 SolidearthExternalModelidEnum, 137 137 SolidearthExternalNummodelsEnum, 138 DslComputeFingerprintsEnum,138 SolidearthSettingsComputeBpGrdEnum, 139 139 EarthIdEnum, 140 ElasticEnum, 140 141 EplZigZagCounterEnum, 141 142 EsaHElasticEnum, … … 167 168 FrontalForcingsNumberofBasinsEnum, 168 169 FrontalForcingsParamEnum, 169 GiaModelEnum, 170 GiaModelidEnum, 171 GiaNummodelsEnum, 172 GiaCrossSectionShapeEnum, 170 GrdModelEnum, 173 171 GroundinglineFrictionInterpolationEnum, 174 172 GroundinglineMeltInterpolationEnum, … … 241 239 InversionStepThresholdEnum, 242 240 InversionTypeEnum, 241 IvinsEnum, 242 IsSlcCouplingEnum, 243 243 LevelsetKillIcebergsEnum, 244 244 LevelsetReinitFrequencyEnum, … … 269 269 MaterialsHeatcapacityEnum, 270 270 MaterialsLatentheatEnum, 271 MaterialsLithosphereDensityEnum,272 MaterialsLithosphereShearModulusEnum,273 MaterialsMantleDensityEnum,274 MaterialsMantleShearModulusEnum,275 271 MaterialsMeltingpointEnum, 276 272 MaterialsMixedLayerCapacityEnum, … … 341 337 SolidearthPlanetAreaEnum, 342 338 SolidearthSettingsAbstolEnum, 339 SolidearthSettingsCrossSectionShapeEnum, 343 340 RotationalAngularVelocityEnum, 344 341 SolidearthSettingsElasticEnum, … … 480 477 ToolkitsTypesEnum, 481 478 TransientAmrFrequencyEnum, 482 TransientIscouplerEnum,483 479 TransientIsdamageevolutionEnum, 484 480 TransientIsesaEnum, … … 486 482 TransientIsgroundinglineEnum, 487 483 TransientIshydrologyEnum, 488 TransientIsmasstransportEnum, 484 TransientIsmasstransportEnum, 485 TransientIsoceantransportEnum, 489 486 TransientIsmovingfrontEnum, 490 487 TransientIsoceancouplingEnum, … … 502 499 InputsSTARTEnum, 503 500 /*Inputs{{{*/ 501 AccumulatedDeltaBottomPressureEnum, 502 AccumulatedDeltaIceThicknessEnum, 503 AccumulatedDeltaTwsEnum, 504 504 AdjointEnum, 505 505 AdjointpEnum, … … 544 544 BedSlopeXEnum, 545 545 BedSlopeYEnum, 546 BottomPressureEnum, 547 BottomPressureOldEnum, 546 548 CalvingCalvingrateEnum, 547 549 CalvingHabFractionEnum, … … 565 567 DegreeOfChannelizationEnum, 566 568 DepthBelowSurfaceEnum, 569 DeltaIceThicknessEnum, 570 DeltaTwsEnum, 571 DeltaBottomPressureEnum, 572 DeltaDslEnum, 573 DslOldEnum, 574 DslEnum, 575 DeltaStrEnum, 576 StrOldEnum, 577 StrEnum, 567 578 DeviatoricStresseffectiveEnum, 568 579 DeviatoricStressxxEnum, … … 582 593 DrivingStressXEnum, 583 594 DrivingStressYEnum, 584 DslGlobalAverageThermostericSeaLevelChangeEnum,585 DslSeaSurfaceHeightChangeAboveGeoidEnum,586 DslSeaWaterPressureChangeAtSeaFloorEnum,587 DslStericRateEnum,588 DslDynamicRateEnum,589 GiaMmeNgiaEnum,590 GiaMmeUgiaEnum,591 595 DummyEnum, 592 596 EffectivePressureEnum, … … 601 605 EplHeadSubstepEnum, 602 606 EplHeadTransientEnum, 603 EsaDeltathicknessEnum,604 607 EsaEmotionEnum, 605 608 EsaNmotionEnum, … … 631 634 FrontalForcingsThermalForcingEnum, 632 635 GeometryHydrostaticRatioEnum, 633 GiaLithosphereThicknessEnum,634 GiaMantleViscosityEnum,635 636 NGiaEnum, 636 637 NGiaRateEnum, … … 665 666 HydrologySheetThicknessEnum, 666 667 HydrologySheetThicknessOldEnum, 668 HydrologyTwsEnum, 669 HydrologyTwsSpcEnum, 670 HydrologyTwsAnalysisEnum, 667 671 HydrologyWatercolumnMaxEnum, 668 672 HydrologyWaterVxEnum, … … 705 709 NodeEnum, 706 710 OmegaAbsGradientEnum, 711 OceantransportSpcbottompressureEnum, 712 OceantransportSpcstrEnum, 713 OceantransportSpcdslEnum, 707 714 P0Enum, 708 715 P1Enum, … … 735 742 SealevelRSLBarystaticEnum, 736 743 SealevelRSLRateEnum, 744 SealevelUGrdEnum, 745 SealevelNGrdEnum, 737 746 SealevelUEastEsaEnum, 738 SealevelUEsaEnum,739 SealevelUEsaRateEnum,740 747 SealevelUNorthEsaEnum, 741 SealevelchangeCumDeltathicknessEnum,742 SealevelchangeCumDeltathicknessOldEnum,743 SurfaceloadRateEnum,744 SurfaceloadIceThicknessRateEnum,745 SurfaceloadWaterHeightRateEnum,746 SurfaceloadOtherRateEnum,747 748 SealevelchangeIndicesEnum, 748 749 SealevelchangeGEnum, … … 914 915 ThicknessPositiveEnum, 915 916 ThicknessResidualEnum, 917 TransientAccumulatedDeltaIceThicknessEnum, 916 918 VelEnum, 917 919 VxAverageEnum, … … 935 937 WaterheightEnum, 936 938 WeightsSurfaceObservationEnum, 939 OldAccumulatedDeltaBottomPressureEnum, 940 OldAccumulatedDeltaIceThicknessEnum, 941 OldAccumulatedDeltaTwsEnum, 937 942 Outputdefinition1Enum, 938 943 Outputdefinition10Enum, … … 1151 1156 GenericParamEnum, 1152 1157 GenericExternalResultEnum, 1153 GiaAnalysisEnum,1154 GiaSolutionEnum,1155 1158 Gradient1Enum, 1156 1159 Gradient2Enum, … … 1272 1275 NyeH2OEnum, 1273 1276 NumericalfluxEnum, 1277 OceantransportAnalysisEnum, 1278 OceantransportSolutionEnum, 1274 1279 OldGradientEnum, 1275 1280 OneLayerP4zEnum, … … 1334 1339 SealevelUmotionEnum, 1335 1340 SealevelchangeAnalysisEnum, 1336 SealevelchangeSolutionEnum,1337 1341 SegEnum, 1338 1342 SegInputEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r26004 r26047 144 144 case SolidearthExternalModelidEnum : return "SolidearthExternalModelid"; 145 145 case SolidearthExternalNummodelsEnum : return "SolidearthExternalNummodels"; 146 case DslComputeFingerprintsEnum : return "DslComputeFingerprints";146 case SolidearthSettingsComputeBpGrdEnum : return "SolidearthSettingsComputeBpGrd"; 147 147 case EarthIdEnum : return "EarthId"; 148 case ElasticEnum : return "Elastic"; 148 149 case EplZigZagCounterEnum : return "EplZigZagCounter"; 149 150 case EsaHElasticEnum : return "EsaHElastic"; … … 175 176 case FrontalForcingsNumberofBasinsEnum : return "FrontalForcingsNumberofBasins"; 176 177 case FrontalForcingsParamEnum : return "FrontalForcingsParam"; 177 case GiaModelEnum : return "GiaModel"; 178 case GiaModelidEnum : return "GiaModelid"; 179 case GiaNummodelsEnum : return "GiaNummodels"; 180 case GiaCrossSectionShapeEnum : return "GiaCrossSectionShape"; 178 case GrdModelEnum : return "GrdModel"; 181 179 case GroundinglineFrictionInterpolationEnum : return "GroundinglineFrictionInterpolation"; 182 180 case GroundinglineMeltInterpolationEnum : return "GroundinglineMeltInterpolation"; … … 249 247 case InversionStepThresholdEnum : return "InversionStepThreshold"; 250 248 case InversionTypeEnum : return "InversionType"; 249 case IvinsEnum : return "Ivins"; 250 case IsSlcCouplingEnum : return "IsSlcCoupling"; 251 251 case LevelsetKillIcebergsEnum : return "LevelsetKillIcebergs"; 252 252 case LevelsetReinitFrequencyEnum : return "LevelsetReinitFrequency"; … … 277 277 case MaterialsHeatcapacityEnum : return "MaterialsHeatcapacity"; 278 278 case MaterialsLatentheatEnum : return "MaterialsLatentheat"; 279 case MaterialsLithosphereDensityEnum : return "MaterialsLithosphereDensity";280 case MaterialsLithosphereShearModulusEnum : return "MaterialsLithosphereShearModulus";281 case MaterialsMantleDensityEnum : return "MaterialsMantleDensity";282 case MaterialsMantleShearModulusEnum : return "MaterialsMantleShearModulus";283 279 case MaterialsMeltingpointEnum : return "MaterialsMeltingpoint"; 284 280 case MaterialsMixedLayerCapacityEnum : return "MaterialsMixedLayerCapacity"; … … 349 345 case SolidearthPlanetAreaEnum : return "SolidearthPlanetArea"; 350 346 case SolidearthSettingsAbstolEnum : return "SolidearthSettingsAbstol"; 347 case SolidearthSettingsCrossSectionShapeEnum : return "SolidearthSettingsCrossSectionShape"; 351 348 case RotationalAngularVelocityEnum : return "RotationalAngularVelocity"; 352 349 case SolidearthSettingsElasticEnum : return "SolidearthSettingsElastic"; … … 488 485 case ToolkitsTypesEnum : return "ToolkitsTypes"; 489 486 case TransientAmrFrequencyEnum : return "TransientAmrFrequency"; 490 case TransientIscouplerEnum : return "TransientIscoupler";491 487 case TransientIsdamageevolutionEnum : return "TransientIsdamageevolution"; 492 488 case TransientIsesaEnum : return "TransientIsesa"; … … 495 491 case TransientIshydrologyEnum : return "TransientIshydrology"; 496 492 case TransientIsmasstransportEnum : return "TransientIsmasstransport"; 493 case TransientIsoceantransportEnum : return "TransientIsoceantransport"; 497 494 case TransientIsmovingfrontEnum : return "TransientIsmovingfront"; 498 495 case TransientIsoceancouplingEnum : return "TransientIsoceancoupling"; … … 508 505 case ParametersENDEnum : return "ParametersEND"; 509 506 case InputsSTARTEnum : return "InputsSTART"; 507 case AccumulatedDeltaBottomPressureEnum : return "AccumulatedDeltaBottomPressure"; 508 case AccumulatedDeltaIceThicknessEnum : return "AccumulatedDeltaIceThickness"; 509 case AccumulatedDeltaTwsEnum : return "AccumulatedDeltaTws"; 510 510 case AdjointEnum : return "Adjoint"; 511 511 case AdjointpEnum : return "Adjointp"; … … 550 550 case BedSlopeXEnum : return "BedSlopeX"; 551 551 case BedSlopeYEnum : return "BedSlopeY"; 552 case BottomPressureEnum : return "BottomPressure"; 553 case BottomPressureOldEnum : return "BottomPressureOld"; 552 554 case CalvingCalvingrateEnum : return "CalvingCalvingrate"; 553 555 case CalvingHabFractionEnum : return "CalvingHabFraction"; … … 571 573 case DegreeOfChannelizationEnum : return "DegreeOfChannelization"; 572 574 case DepthBelowSurfaceEnum : return "DepthBelowSurface"; 575 case DeltaIceThicknessEnum : return "DeltaIceThickness"; 576 case DeltaTwsEnum : return "DeltaTws"; 577 case DeltaBottomPressureEnum : return "DeltaBottomPressure"; 578 case DeltaDslEnum : return "DeltaDsl"; 579 case DslOldEnum : return "DslOld"; 580 case DslEnum : return "Dsl"; 581 case DeltaStrEnum : return "DeltaStr"; 582 case StrOldEnum : return "StrOld"; 583 case StrEnum : return "Str"; 573 584 case DeviatoricStresseffectiveEnum : return "DeviatoricStresseffective"; 574 585 case DeviatoricStressxxEnum : return "DeviatoricStressxx"; … … 588 599 case DrivingStressXEnum : return "DrivingStressX"; 589 600 case DrivingStressYEnum : return "DrivingStressY"; 590 case DslGlobalAverageThermostericSeaLevelChangeEnum : return "DslGlobalAverageThermostericSeaLevelChange";591 case DslSeaSurfaceHeightChangeAboveGeoidEnum : return "DslSeaSurfaceHeightChangeAboveGeoid";592 case DslSeaWaterPressureChangeAtSeaFloorEnum : return "DslSeaWaterPressureChangeAtSeaFloor";593 case DslStericRateEnum : return "DslStericRate";594 case DslDynamicRateEnum : return "DslDynamicRate";595 case GiaMmeNgiaEnum : return "GiaMmeNgia";596 case GiaMmeUgiaEnum : return "GiaMmeUgia";597 601 case DummyEnum : return "Dummy"; 598 602 case EffectivePressureEnum : return "EffectivePressure"; … … 607 611 case EplHeadSubstepEnum : return "EplHeadSubstep"; 608 612 case EplHeadTransientEnum : return "EplHeadTransient"; 609 case EsaDeltathicknessEnum : return "EsaDeltathickness";610 613 case EsaEmotionEnum : return "EsaEmotion"; 611 614 case EsaNmotionEnum : return "EsaNmotion"; … … 637 640 case FrontalForcingsThermalForcingEnum : return "FrontalForcingsThermalForcing"; 638 641 case GeometryHydrostaticRatioEnum : return "GeometryHydrostaticRatio"; 639 case GiaLithosphereThicknessEnum : return "GiaLithosphereThickness";640 case GiaMantleViscosityEnum : return "GiaMantleViscosity";641 642 case NGiaEnum : return "NGia"; 642 643 case NGiaRateEnum : return "NGiaRate"; … … 671 672 case HydrologySheetThicknessEnum : return "HydrologySheetThickness"; 672 673 case HydrologySheetThicknessOldEnum : return "HydrologySheetThicknessOld"; 674 case HydrologyTwsEnum : return "HydrologyTws"; 675 case HydrologyTwsSpcEnum : return "HydrologyTwsSpc"; 676 case HydrologyTwsAnalysisEnum : return "HydrologyTwsAnalysis"; 673 677 case HydrologyWatercolumnMaxEnum : return "HydrologyWatercolumnMax"; 674 678 case HydrologyWaterVxEnum : return "HydrologyWaterVx"; … … 711 715 case NodeEnum : return "Node"; 712 716 case OmegaAbsGradientEnum : return "OmegaAbsGradient"; 717 case OceantransportSpcbottompressureEnum : return "OceantransportSpcbottompressure"; 718 case OceantransportSpcstrEnum : return "OceantransportSpcstr"; 719 case OceantransportSpcdslEnum : return "OceantransportSpcdsl"; 713 720 case P0Enum : return "P0"; 714 721 case P1Enum : return "P1"; … … 741 748 case SealevelRSLBarystaticEnum : return "SealevelRSLBarystatic"; 742 749 case SealevelRSLRateEnum : return "SealevelRSLRate"; 750 case SealevelUGrdEnum : return "SealevelUGrd"; 751 case SealevelNGrdEnum : return "SealevelNGrd"; 743 752 case SealevelUEastEsaEnum : return "SealevelUEastEsa"; 744 case SealevelUEsaEnum : return "SealevelUEsa";745 case SealevelUEsaRateEnum : return "SealevelUEsaRate";746 753 case SealevelUNorthEsaEnum : return "SealevelUNorthEsa"; 747 case SealevelchangeCumDeltathicknessEnum : return "SealevelchangeCumDeltathickness";748 case SealevelchangeCumDeltathicknessOldEnum : return "SealevelchangeCumDeltathicknessOld";749 case SurfaceloadRateEnum : return "SurfaceloadRate";750 case SurfaceloadIceThicknessRateEnum : return "SurfaceloadIceThicknessRate";751 case SurfaceloadWaterHeightRateEnum : return "SurfaceloadWaterHeightRate";752 case SurfaceloadOtherRateEnum : return "SurfaceloadOtherRate";753 754 case SealevelchangeIndicesEnum : return "SealevelchangeIndices"; 754 755 case SealevelchangeGEnum : return "SealevelchangeG"; … … 919 920 case ThicknessPositiveEnum : return "ThicknessPositive"; 920 921 case ThicknessResidualEnum : return "ThicknessResidual"; 922 case TransientAccumulatedDeltaIceThicknessEnum : return "TransientAccumulatedDeltaIceThickness"; 921 923 case VelEnum : return "Vel"; 922 924 case VxAverageEnum : return "VxAverage"; … … 940 942 case WaterheightEnum : return "Waterheight"; 941 943 case WeightsSurfaceObservationEnum : return "WeightsSurfaceObservation"; 944 case OldAccumulatedDeltaBottomPressureEnum : return "OldAccumulatedDeltaBottomPressure"; 945 case OldAccumulatedDeltaIceThicknessEnum : return "OldAccumulatedDeltaIceThickness"; 946 case OldAccumulatedDeltaTwsEnum : return "OldAccumulatedDeltaTws"; 942 947 case Outputdefinition1Enum : return "Outputdefinition1"; 943 948 case Outputdefinition10Enum : return "Outputdefinition10"; … … 1154 1159 case GenericParamEnum : return "GenericParam"; 1155 1160 case GenericExternalResultEnum : return "GenericExternalResult"; 1156 case GiaAnalysisEnum : return "GiaAnalysis";1157 case GiaSolutionEnum : return "GiaSolution";1158 1161 case Gradient1Enum : return "Gradient1"; 1159 1162 case Gradient2Enum : return "Gradient2"; … … 1275 1278 case NyeH2OEnum : return "NyeH2O"; 1276 1279 case NumericalfluxEnum : return "Numericalflux"; 1280 case OceantransportAnalysisEnum : return "OceantransportAnalysis"; 1281 case OceantransportSolutionEnum : return "OceantransportSolution"; 1277 1282 case OldGradientEnum : return "OldGradient"; 1278 1283 case OneLayerP4zEnum : return "OneLayerP4z"; … … 1337 1342 case SealevelUmotionEnum : return "SealevelUmotion"; 1338 1343 case SealevelchangeAnalysisEnum : return "SealevelchangeAnalysis"; 1339 case SealevelchangeSolutionEnum : return "SealevelchangeSolution";1340 1344 case SegEnum : return "Seg"; 1341 1345 case SegInputEnum : return "SegInput"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r26004 r26047 147 147 else if (strcmp(name,"SolidearthExternalModelid")==0) return SolidearthExternalModelidEnum; 148 148 else if (strcmp(name,"SolidearthExternalNummodels")==0) return SolidearthExternalNummodelsEnum; 149 else if (strcmp(name," DslComputeFingerprints")==0) return DslComputeFingerprintsEnum;149 else if (strcmp(name,"SolidearthSettingsComputeBpGrd")==0) return SolidearthSettingsComputeBpGrdEnum; 150 150 else if (strcmp(name,"EarthId")==0) return EarthIdEnum; 151 else if (strcmp(name,"Elastic")==0) return ElasticEnum; 151 152 else if (strcmp(name,"EplZigZagCounter")==0) return EplZigZagCounterEnum; 152 153 else if (strcmp(name,"EsaHElastic")==0) return EsaHElasticEnum; … … 178 179 else if (strcmp(name,"FrontalForcingsNumberofBasins")==0) return FrontalForcingsNumberofBasinsEnum; 179 180 else if (strcmp(name,"FrontalForcingsParam")==0) return FrontalForcingsParamEnum; 180 else if (strcmp(name,"GiaModel")==0) return GiaModelEnum; 181 else if (strcmp(name,"GiaModelid")==0) return GiaModelidEnum; 182 else if (strcmp(name,"GiaNummodels")==0) return GiaNummodelsEnum; 183 else if (strcmp(name,"GiaCrossSectionShape")==0) return GiaCrossSectionShapeEnum; 181 else if (strcmp(name,"GrdModel")==0) return GrdModelEnum; 184 182 else if (strcmp(name,"GroundinglineFrictionInterpolation")==0) return GroundinglineFrictionInterpolationEnum; 185 183 else if (strcmp(name,"GroundinglineMeltInterpolation")==0) return GroundinglineMeltInterpolationEnum; … … 252 250 else if (strcmp(name,"InversionStepThreshold")==0) return InversionStepThresholdEnum; 253 251 else if (strcmp(name,"InversionType")==0) return InversionTypeEnum; 252 else if (strcmp(name,"Ivins")==0) return IvinsEnum; 253 else if (strcmp(name,"IsSlcCoupling")==0) return IsSlcCouplingEnum; 254 254 else if (strcmp(name,"LevelsetKillIcebergs")==0) return LevelsetKillIcebergsEnum; 255 255 else if (strcmp(name,"LevelsetReinitFrequency")==0) return LevelsetReinitFrequencyEnum; … … 283 283 else if (strcmp(name,"MaterialsHeatcapacity")==0) return MaterialsHeatcapacityEnum; 284 284 else if (strcmp(name,"MaterialsLatentheat")==0) return MaterialsLatentheatEnum; 285 else if (strcmp(name,"MaterialsLithosphereDensity")==0) return MaterialsLithosphereDensityEnum;286 else if (strcmp(name,"MaterialsLithosphereShearModulus")==0) return MaterialsLithosphereShearModulusEnum;287 else if (strcmp(name,"MaterialsMantleDensity")==0) return MaterialsMantleDensityEnum;288 else if (strcmp(name,"MaterialsMantleShearModulus")==0) return MaterialsMantleShearModulusEnum;289 285 else if (strcmp(name,"MaterialsMeltingpoint")==0) return MaterialsMeltingpointEnum; 290 286 else if (strcmp(name,"MaterialsMixedLayerCapacity")==0) return MaterialsMixedLayerCapacityEnum; … … 355 351 else if (strcmp(name,"SolidearthPlanetArea")==0) return SolidearthPlanetAreaEnum; 356 352 else if (strcmp(name,"SolidearthSettingsAbstol")==0) return SolidearthSettingsAbstolEnum; 353 else if (strcmp(name,"SolidearthSettingsCrossSectionShape")==0) return SolidearthSettingsCrossSectionShapeEnum; 357 354 else if (strcmp(name,"RotationalAngularVelocity")==0) return RotationalAngularVelocityEnum; 358 355 else if (strcmp(name,"SolidearthSettingsElastic")==0) return SolidearthSettingsElasticEnum; … … 383 380 else if (strcmp(name,"SealevelchangeRunCount")==0) return SealevelchangeRunCountEnum; 384 381 else if (strcmp(name,"SealevelchangeTransitions")==0) return SealevelchangeTransitionsEnum; 382 else if (strcmp(name,"SealevelchangeUElastic")==0) return SealevelchangeUElasticEnum; 383 else if (strcmp(name,"SettingsIoGather")==0) return SettingsIoGatherEnum; 384 else if (strcmp(name,"SettingsNumResultsOnNodes")==0) return SettingsNumResultsOnNodesEnum; 385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"SealevelchangeUElastic")==0) return SealevelchangeUElasticEnum; 389 else if (strcmp(name,"SettingsIoGather")==0) return SettingsIoGatherEnum; 390 else if (strcmp(name,"SettingsNumResultsOnNodes")==0) return SettingsNumResultsOnNodesEnum; 391 else if (strcmp(name,"SettingsOutputFrequency")==0) return SettingsOutputFrequencyEnum; 388 if (strcmp(name,"SettingsOutputFrequency")==0) return SettingsOutputFrequencyEnum; 392 389 else if (strcmp(name,"SettingsCheckpointFrequency")==0) return SettingsCheckpointFrequencyEnum; 393 390 else if (strcmp(name,"SettingsResultsOnNodes")==0) return SettingsResultsOnNodesEnum; … … 497 494 else if (strcmp(name,"ToolkitsTypes")==0) return ToolkitsTypesEnum; 498 495 else if (strcmp(name,"TransientAmrFrequency")==0) return TransientAmrFrequencyEnum; 499 else if (strcmp(name,"TransientIscoupler")==0) return TransientIscouplerEnum;500 496 else if (strcmp(name,"TransientIsdamageevolution")==0) return TransientIsdamageevolutionEnum; 501 497 else if (strcmp(name,"TransientIsesa")==0) return TransientIsesaEnum; … … 504 500 else if (strcmp(name,"TransientIshydrology")==0) return TransientIshydrologyEnum; 505 501 else if (strcmp(name,"TransientIsmasstransport")==0) return TransientIsmasstransportEnum; 502 else if (strcmp(name,"TransientIsoceantransport")==0) return TransientIsoceantransportEnum; 506 503 else if (strcmp(name,"TransientIsmovingfront")==0) return TransientIsmovingfrontEnum; 507 504 else if (strcmp(name,"TransientIsoceancoupling")==0) return TransientIsoceancouplingEnum; 505 else if (strcmp(name,"TransientIssampling")==0) return TransientIssamplingEnum; 506 else if (strcmp(name,"TransientIsslc")==0) return TransientIsslcEnum; 507 else if (strcmp(name,"TransientIssmb")==0) return TransientIssmbEnum; 508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"TransientIssampling")==0) return TransientIssamplingEnum; 512 else if (strcmp(name,"TransientIsslc")==0) return TransientIsslcEnum; 513 else if (strcmp(name,"TransientIssmb")==0) return TransientIssmbEnum; 514 else if (strcmp(name,"TransientIsstressbalance")==0) return TransientIsstressbalanceEnum; 511 if (strcmp(name,"TransientIsstressbalance")==0) return TransientIsstressbalanceEnum; 515 512 else if (strcmp(name,"TransientIsthermal")==0) return TransientIsthermalEnum; 516 513 else if (strcmp(name,"TransientNumRequestedOutputs")==0) return TransientNumRequestedOutputsEnum; … … 520 517 else if (strcmp(name,"ParametersEND")==0) return ParametersENDEnum; 521 518 else if (strcmp(name,"InputsSTART")==0) return InputsSTARTEnum; 519 else if (strcmp(name,"AccumulatedDeltaBottomPressure")==0) return AccumulatedDeltaBottomPressureEnum; 520 else if (strcmp(name,"AccumulatedDeltaIceThickness")==0) return AccumulatedDeltaIceThicknessEnum; 521 else if (strcmp(name,"AccumulatedDeltaTws")==0) return AccumulatedDeltaTwsEnum; 522 522 else if (strcmp(name,"Adjoint")==0) return AdjointEnum; 523 523 else if (strcmp(name,"Adjointp")==0) return AdjointpEnum; … … 562 562 else if (strcmp(name,"BedSlopeX")==0) return BedSlopeXEnum; 563 563 else if (strcmp(name,"BedSlopeY")==0) return BedSlopeYEnum; 564 else if (strcmp(name,"BottomPressure")==0) return BottomPressureEnum; 565 else if (strcmp(name,"BottomPressureOld")==0) return BottomPressureOldEnum; 564 566 else if (strcmp(name,"CalvingCalvingrate")==0) return CalvingCalvingrateEnum; 565 567 else if (strcmp(name,"CalvingHabFraction")==0) return CalvingHabFractionEnum; … … 583 585 else if (strcmp(name,"DegreeOfChannelization")==0) return DegreeOfChannelizationEnum; 584 586 else if (strcmp(name,"DepthBelowSurface")==0) return DepthBelowSurfaceEnum; 587 else if (strcmp(name,"DeltaIceThickness")==0) return DeltaIceThicknessEnum; 588 else if (strcmp(name,"DeltaTws")==0) return DeltaTwsEnum; 589 else if (strcmp(name,"DeltaBottomPressure")==0) return DeltaBottomPressureEnum; 590 else if (strcmp(name,"DeltaDsl")==0) return DeltaDslEnum; 591 else if (strcmp(name,"DslOld")==0) return DslOldEnum; 592 else if (strcmp(name,"Dsl")==0) return DslEnum; 593 else if (strcmp(name,"DeltaStr")==0) return DeltaStrEnum; 594 else if (strcmp(name,"StrOld")==0) return StrOldEnum; 595 else if (strcmp(name,"Str")==0) return StrEnum; 585 596 else if (strcmp(name,"DeviatoricStresseffective")==0) return DeviatoricStresseffectiveEnum; 586 597 else if (strcmp(name,"DeviatoricStressxx")==0) return DeviatoricStressxxEnum; … … 600 611 else if (strcmp(name,"DrivingStressX")==0) return DrivingStressXEnum; 601 612 else if (strcmp(name,"DrivingStressY")==0) return DrivingStressYEnum; 602 else if (strcmp(name,"DslGlobalAverageThermostericSeaLevelChange")==0) return DslGlobalAverageThermostericSeaLevelChangeEnum;603 else if (strcmp(name,"DslSeaSurfaceHeightChangeAboveGeoid")==0) return DslSeaSurfaceHeightChangeAboveGeoidEnum;604 else if (strcmp(name,"DslSeaWaterPressureChangeAtSeaFloor")==0) return DslSeaWaterPressureChangeAtSeaFloorEnum;605 else if (strcmp(name,"DslStericRate")==0) return DslStericRateEnum;606 else if (strcmp(name,"DslDynamicRate")==0) return DslDynamicRateEnum;607 else if (strcmp(name,"GiaMmeNgia")==0) return GiaMmeNgiaEnum;608 else if (strcmp(name,"GiaMmeUgia")==0) return GiaMmeUgiaEnum;609 613 else if (strcmp(name,"Dummy")==0) return DummyEnum; 610 614 else if (strcmp(name,"EffectivePressure")==0) return EffectivePressureEnum; … … 619 623 else if (strcmp(name,"EplHeadSubstep")==0) return EplHeadSubstepEnum; 620 624 else if (strcmp(name,"EplHeadTransient")==0) return EplHeadTransientEnum; 621 else if (strcmp(name,"EsaDeltathickness")==0) return EsaDeltathicknessEnum;622 625 else if (strcmp(name,"EsaEmotion")==0) return EsaEmotionEnum; 623 626 else if (strcmp(name,"EsaNmotion")==0) return EsaNmotionEnum; … … 626 629 else if (strcmp(name,"EsaStrainratexy")==0) return EsaStrainratexyEnum; 627 630 else if (strcmp(name,"EsaStrainrateyy")==0) return EsaStrainrateyyEnum; 628 else if (strcmp(name,"EsaUmotion")==0) return EsaUmotionEnum;629 else if (strcmp(name,"EsaXmotion")==0) return EsaXmotionEnum;630 else if (strcmp(name,"EsaYmotion")==0) return EsaYmotionEnum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"EtaDiff")==0) return EtaDiffEnum; 634 if (strcmp(name,"EsaUmotion")==0) return EsaUmotionEnum; 635 else if (strcmp(name,"EsaXmotion")==0) return EsaXmotionEnum; 636 else if (strcmp(name,"EsaYmotion")==0) return EsaYmotionEnum; 637 else if (strcmp(name,"EtaDiff")==0) return EtaDiffEnum; 635 638 else if (strcmp(name,"FlowequationBorderFS")==0) return FlowequationBorderFSEnum; 636 639 else if (strcmp(name,"FrictionAs")==0) return FrictionAsEnum; … … 652 655 else if (strcmp(name,"FrontalForcingsThermalForcing")==0) return FrontalForcingsThermalForcingEnum; 653 656 else if (strcmp(name,"GeometryHydrostaticRatio")==0) return GeometryHydrostaticRatioEnum; 654 else if (strcmp(name,"GiaLithosphereThickness")==0) return GiaLithosphereThicknessEnum;655 else if (strcmp(name,"GiaMantleViscosity")==0) return GiaMantleViscosityEnum;656 657 else if (strcmp(name,"NGia")==0) return NGiaEnum; 657 658 else if (strcmp(name,"NGiaRate")==0) return NGiaRateEnum; … … 686 687 else if (strcmp(name,"HydrologySheetThickness")==0) return HydrologySheetThicknessEnum; 687 688 else if (strcmp(name,"HydrologySheetThicknessOld")==0) return HydrologySheetThicknessOldEnum; 689 else if (strcmp(name,"HydrologyTws")==0) return HydrologyTwsEnum; 690 else if (strcmp(name,"HydrologyTwsSpc")==0) return HydrologyTwsSpcEnum; 691 else if (strcmp(name,"HydrologyTwsAnalysis")==0) return HydrologyTwsAnalysisEnum; 688 692 else if (strcmp(name,"HydrologyWatercolumnMax")==0) return HydrologyWatercolumnMaxEnum; 689 693 else if (strcmp(name,"HydrologyWaterVx")==0) return HydrologyWaterVxEnum; … … 726 730 else if (strcmp(name,"Node")==0) return NodeEnum; 727 731 else if (strcmp(name,"OmegaAbsGradient")==0) return OmegaAbsGradientEnum; 732 else if (strcmp(name,"OceantransportSpcbottompressure")==0) return OceantransportSpcbottompressureEnum; 733 else if (strcmp(name,"OceantransportSpcstr")==0) return OceantransportSpcstrEnum; 734 else if (strcmp(name,"OceantransportSpcdsl")==0) return OceantransportSpcdslEnum; 728 735 else if (strcmp(name,"P0")==0) return P0Enum; 729 736 else if (strcmp(name,"P1")==0) return P1Enum; … … 745 752 else if (strcmp(name,"Sealevel")==0) return SealevelEnum; 746 753 else if (strcmp(name,"SealevelBarystaticMask")==0) return SealevelBarystaticMaskEnum; 747 else if (strcmp(name,"SealevelBarystaticOceanMask")==0) return SealevelBarystaticOceanMaskEnum; 754 else stage=7; 755 } 756 if(stage==7){ 757 if (strcmp(name,"SealevelBarystaticOceanMask")==0) return SealevelBarystaticOceanMaskEnum; 748 758 else if (strcmp(name,"SealevelNEsa")==0) return SealevelNEsaEnum; 749 759 else if (strcmp(name,"SealevelNEsaRate")==0) return SealevelNEsaRateEnum; … … 752 762 else if (strcmp(name,"BslcIce")==0) return BslcIceEnum; 753 763 else if (strcmp(name,"BslcHydro")==0) return BslcHydroEnum; 754 else stage=7; 755 } 756 if(stage==7){ 757 if (strcmp(name,"BslcRate")==0) return BslcRateEnum; 764 else if (strcmp(name,"BslcRate")==0) return BslcRateEnum; 758 765 else if (strcmp(name,"Gmtslc")==0) return GmtslcEnum; 759 766 else if (strcmp(name,"SealevelRSLBarystatic")==0) return SealevelRSLBarystaticEnum; 760 767 else if (strcmp(name,"SealevelRSLRate")==0) return SealevelRSLRateEnum; 768 else if (strcmp(name,"SealevelUGrd")==0) return SealevelUGrdEnum; 769 else if (strcmp(name,"SealevelNGrd")==0) return SealevelNGrdEnum; 761 770 else if (strcmp(name,"SealevelUEastEsa")==0) return SealevelUEastEsaEnum; 762 else if (strcmp(name,"SealevelUEsa")==0) return SealevelUEsaEnum;763 else if (strcmp(name,"SealevelUEsaRate")==0) return SealevelUEsaRateEnum;764 771 else if (strcmp(name,"SealevelUNorthEsa")==0) return SealevelUNorthEsaEnum; 765 else if (strcmp(name,"SealevelchangeCumDeltathickness")==0) return SealevelchangeCumDeltathicknessEnum;766 else if (strcmp(name,"SealevelchangeCumDeltathicknessOld")==0) return SealevelchangeCumDeltathicknessOldEnum;767 else if (strcmp(name,"SurfaceloadRate")==0) return SurfaceloadRateEnum;768 else if (strcmp(name,"SurfaceloadIceThicknessRate")==0) return SurfaceloadIceThicknessRateEnum;769 else if (strcmp(name,"SurfaceloadWaterHeightRate")==0) return SurfaceloadWaterHeightRateEnum;770 else if (strcmp(name,"SurfaceloadOtherRate")==0) return SurfaceloadOtherRateEnum;771 772 else if (strcmp(name,"SealevelchangeIndices")==0) return SealevelchangeIndicesEnum; 772 773 else if (strcmp(name,"SealevelchangeG")==0) return SealevelchangeGEnum; … … 874 875 else if (strcmp(name,"SmbTemperaturesLgm")==0) return SmbTemperaturesLgmEnum; 875 876 else if (strcmp(name,"SmbTemperaturesPresentday")==0) return SmbTemperaturesPresentdayEnum; 876 else if (strcmp(name,"SmbTemperaturesReconstructed")==0) return SmbTemperaturesReconstructedEnum;877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"SmbTini")==0) return SmbTiniEnum; 880 if (strcmp(name,"SmbTemperaturesReconstructed")==0) return SmbTemperaturesReconstructedEnum; 881 else if (strcmp(name,"SmbTini")==0) return SmbTiniEnum; 881 882 else if (strcmp(name,"SmbTmean")==0) return SmbTmeanEnum; 882 883 else if (strcmp(name,"SmbTz")==0) return SmbTzEnum; … … 940 941 else if (strcmp(name,"ThicknessPositive")==0) return ThicknessPositiveEnum; 941 942 else if (strcmp(name,"ThicknessResidual")==0) return ThicknessResidualEnum; 943 else if (strcmp(name,"TransientAccumulatedDeltaIceThickness")==0) return TransientAccumulatedDeltaIceThicknessEnum; 942 944 else if (strcmp(name,"Vel")==0) return VelEnum; 943 945 else if (strcmp(name,"VxAverage")==0) return VxAverageEnum; … … 961 963 else if (strcmp(name,"Waterheight")==0) return WaterheightEnum; 962 964 else if (strcmp(name,"WeightsSurfaceObservation")==0) return WeightsSurfaceObservationEnum; 965 else if (strcmp(name,"OldAccumulatedDeltaBottomPressure")==0) return OldAccumulatedDeltaBottomPressureEnum; 966 else if (strcmp(name,"OldAccumulatedDeltaIceThickness")==0) return OldAccumulatedDeltaIceThicknessEnum; 967 else if (strcmp(name,"OldAccumulatedDeltaTws")==0) return OldAccumulatedDeltaTwsEnum; 963 968 else if (strcmp(name,"Outputdefinition1")==0) return Outputdefinition1Enum; 964 969 else if (strcmp(name,"Outputdefinition10")==0) return Outputdefinition10Enum; … … 993 998 else if (strcmp(name,"Outputdefinition38")==0) return Outputdefinition38Enum; 994 999 else if (strcmp(name,"Outputdefinition39")==0) return Outputdefinition39Enum; 995 else if (strcmp(name,"Outputdefinition3")==0) return Outputdefinition3Enum; 1000 else stage=9; 1001 } 1002 if(stage==9){ 1003 if (strcmp(name,"Outputdefinition3")==0) return Outputdefinition3Enum; 996 1004 else if (strcmp(name,"Outputdefinition40")==0) return Outputdefinition40Enum; 997 1005 else if (strcmp(name,"Outputdefinition41")==0) return Outputdefinition41Enum; 998 1006 else if (strcmp(name,"Outputdefinition42")==0) return Outputdefinition42Enum; 999 1007 else if (strcmp(name,"Outputdefinition43")==0) return Outputdefinition43Enum; 1000 else stage=9; 1001 } 1002 if(stage==9){ 1003 if (strcmp(name,"Outputdefinition44")==0) return Outputdefinition44Enum; 1008 else if (strcmp(name,"Outputdefinition44")==0) return Outputdefinition44Enum; 1004 1009 else if (strcmp(name,"Outputdefinition45")==0) return Outputdefinition45Enum; 1005 1010 else if (strcmp(name,"Outputdefinition46")==0) return Outputdefinition46Enum; … … 1116 1121 else if (strcmp(name,"ControlInputGrad")==0) return ControlInputGradEnum; 1117 1122 else if (strcmp(name,"ControlInputMaxs")==0) return ControlInputMaxsEnum; 1118 else if (strcmp(name,"ControlInputMins")==0) return ControlInputMinsEnum; 1123 else stage=10; 1124 } 1125 if(stage==10){ 1126 if (strcmp(name,"ControlInputMins")==0) return ControlInputMinsEnum; 1119 1127 else if (strcmp(name,"ControlInputValues")==0) return ControlInputValuesEnum; 1120 1128 else if (strcmp(name,"CrouzeixRaviart")==0) return CrouzeixRaviartEnum; 1121 1129 else if (strcmp(name,"Cuffey")==0) return CuffeyEnum; 1122 1130 else if (strcmp(name,"CuffeyTemperate")==0) return CuffeyTemperateEnum; 1123 else stage=10; 1124 } 1125 if(stage==10){ 1126 if (strcmp(name,"DamageEvolutionAnalysis")==0) return DamageEvolutionAnalysisEnum; 1131 else if (strcmp(name,"DamageEvolutionAnalysis")==0) return DamageEvolutionAnalysisEnum; 1127 1132 else if (strcmp(name,"DamageEvolutionSolution")==0) return DamageEvolutionSolutionEnum; 1128 1133 else if (strcmp(name,"DataSet")==0) return DataSetEnum; … … 1181 1186 else if (strcmp(name,"GenericParam")==0) return GenericParamEnum; 1182 1187 else if (strcmp(name,"GenericExternalResult")==0) return GenericExternalResultEnum; 1183 else if (strcmp(name,"GiaAnalysis")==0) return GiaAnalysisEnum;1184 else if (strcmp(name,"GiaSolution")==0) return GiaSolutionEnum;1185 1188 else if (strcmp(name,"Gradient1")==0) return Gradient1Enum; 1186 1189 else if (strcmp(name,"Gradient2")==0) return Gradient2Enum; … … 1241 1244 else if (strcmp(name,"LliboutryDuval")==0) return LliboutryDuvalEnum; 1242 1245 else if (strcmp(name,"Loads")==0) return LoadsEnum; 1243 else if (strcmp(name,"LoveAnalysis")==0) return LoveAnalysisEnum;1244 else if (strcmp(name,"LoveHi")==0) return LoveHiEnum;1245 else if (strcmp(name,"LoveHr")==0) return LoveHrEnum;1246 1246 else stage=11; 1247 1247 } 1248 1248 if(stage==11){ 1249 if (strcmp(name,"LoveKernelsImag")==0) return LoveKernelsImagEnum; 1249 if (strcmp(name,"LoveAnalysis")==0) return LoveAnalysisEnum; 1250 else if (strcmp(name,"LoveHi")==0) return LoveHiEnum; 1251 else if (strcmp(name,"LoveHr")==0) return LoveHrEnum; 1252 else if (strcmp(name,"LoveKernelsImag")==0) return LoveKernelsImagEnum; 1250 1253 else if (strcmp(name,"LoveKernelsReal")==0) return LoveKernelsRealEnum; 1251 1254 else if (strcmp(name,"LoveKi")==0) return LoveKiEnum; … … 1305 1308 else if (strcmp(name,"NyeH2O")==0) return NyeH2OEnum; 1306 1309 else if (strcmp(name,"Numericalflux")==0) return NumericalfluxEnum; 1310 else if (strcmp(name,"OceantransportAnalysis")==0) return OceantransportAnalysisEnum; 1311 else if (strcmp(name,"OceantransportSolution")==0) return OceantransportSolutionEnum; 1307 1312 else if (strcmp(name,"OldGradient")==0) return OldGradientEnum; 1308 1313 else if (strcmp(name,"OneLayerP4z")==0) return OneLayerP4zEnum; … … 1362 1367 else if (strcmp(name,"SealevelEmotion")==0) return SealevelEmotionEnum; 1363 1368 else if (strcmp(name,"SealevelInertiaTensorXZ")==0) return SealevelInertiaTensorXZEnum; 1364 else if (strcmp(name,"SealevelInertiaTensorYZ")==0) return SealevelInertiaTensorYZEnum; 1369 else stage=12; 1370 } 1371 if(stage==12){ 1372 if (strcmp(name,"SealevelInertiaTensorYZ")==0) return SealevelInertiaTensorYZEnum; 1365 1373 else if (strcmp(name,"SealevelInertiaTensorZZ")==0) return SealevelInertiaTensorZZEnum; 1366 1374 else if (strcmp(name,"SealevelNmotion")==0) return SealevelNmotionEnum; 1367 1375 else if (strcmp(name,"SealevelUmotion")==0) return SealevelUmotionEnum; 1368 1376 else if (strcmp(name,"SealevelchangeAnalysis")==0) return SealevelchangeAnalysisEnum; 1369 else stage=12;1370 }1371 if(stage==12){1372 if (strcmp(name,"SealevelchangeSolution")==0) return SealevelchangeSolutionEnum;1373 1377 else if (strcmp(name,"Seg")==0) return SegEnum; 1374 1378 else if (strcmp(name,"SegInput")==0) return SegInputEnum; -
issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.cpp
r25976 r26047 168 168 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 169 169 } 170 else if(strcmp(string_in," SurfaceloadIceThicknessRate")==0){171 const char* field = "md. solidearth.surfaceload.icethicknesschange";172 input_enum = SurfaceloadIceThicknessRateEnum;170 else if(strcmp(string_in,"IceLoad")==0){ 171 const char* field = "md.masstransport.spcthickness"; 172 input_enum = MasstransportSpcthicknessEnum; 173 173 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 174 174 } … … 178 178 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 179 179 } 180 else if(strcmp(string_in,"DslGlobalAverageThermostericSeaLevelChange")==0){ 181 const char* field = "md.dsl.global_average_thermosteric_sea_level_change"; 182 input_enum = DslGlobalAverageThermostericSeaLevelChangeEnum; 183 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 184 } 185 else if(strcmp(string_in,"SurfaceloadWaterHeightRate")==0){ 186 const char* field = "md.solidearth.surfaceload.waterheightchange"; 187 input_enum = SurfaceloadWaterHeightRateEnum; 180 else if(strcmp(string_in,"DslGlobalAverageThermostericSeaLevel")==0){ 181 const char* field = "md.dsl.global_average_thermosteric_sea_level"; 182 input_enum = OceantransportSpcstrEnum; 183 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 184 } 185 else if(strcmp(string_in,"DslSeaWaterPressureAtSeaFloor")==0){ 186 const char* field = "md.dsl.sea_water_pressure_at_sea_floor"; 187 input_enum = OceantransportSpcbottompressureEnum; 188 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 189 } 190 else if(strcmp(string_in,"DslSeaSurfaceHeightAboveGeoid")==0){ 191 const char* field = "md.dsl.sea_surface_height_above_geoid"; 192 input_enum = OceantransportSpcdslEnum; 193 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 194 } 195 else if(strcmp(string_in,"TwsLoad")==0){ 196 const char* field = "md.hydrology.spcwatercolumn"; 197 input_enum = HydrologyTwsSpcEnum; 188 198 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 189 199 } … … 273 283 case 4: return HydrologypismEnum; 274 284 case 5: return HydrologyGlaDSEnum; 285 case 6: return HydrologyTwsEnum; 275 286 default: _error_("Marshalled hydrology code \""<<enum_in<<"\" not supported yet"); 276 287 } … … 312 323 case 2: return AmrNeopzEnum; 313 324 default: _error_("Marshalled AMR code \""<<enum_in<<"\" not supported yet"); 325 } 326 }/*}}}*/ 327 int IoCodeToEnumGrd(int enum_in){/*{{{*/ 328 switch(enum_in){ 329 case 0: return NoneEnum; 330 case 1: return ElasticEnum; 331 case 2: return IvinsEnum; 332 default: _error_("Marshalled GRD code \""<<enum_in<<"\" not supported yet"); 314 333 } 315 334 }/*}}}*/ -
issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.h
r24750 r26047 13 13 int IoCodeToEnumTimestepping(int enum_in); 14 14 int IoCodeToEnumAmr(int enum_in); 15 int IoCodeToEnumGrd(int enum_in); 15 16 16 17 int IoCodeToEnumVertexEquation(int enum_in); -
issm/trunk-jpl/src/m/boundaryconditions/SetIceSheetBC.m
r19527 r26047 33 33 md.basalforcings = initialize(md.basalforcings,md); 34 34 35 %Initialize ocean forcings and sealevel 36 md.dsl= initialize(md.dsl,md); 37 35 38 %Deal with other boundary conditions 36 39 if isnan(md.balancethickness.thickening_rate), -
issm/trunk-jpl/src/m/classes/dsl.m
r25956 r26047 7 7 properties (SetAccess=public) 8 8 9 global_average_thermosteric_sea_level_change; %corresponds to zostoga field in CMIP5 archives. Specified as a temporally variable global rate (mm/yr) 10 sea_surface_height_change_above_geoid; %corresponds to zos field in CMIP5 archives. Spatial average is 0. Specified as a spatio-temporally variable rate (mm/yr) 11 sea_water_pressure_change_at_sea_floor; %corresponds to bpo field in CMIP5 archives. Specified as a spatio-temporally variable rate (in mm/yr equivalent, not in Pa/yr!) for each ensemble 12 compute_fingerprints; %do we use the sea water pressure change to compute fingerprints and correct sea_surface_height_change_above_geoid 9 global_average_thermosteric_sea_level; %corresponds to zostoga field in CMIP5 archives. Specified as a temporally variable quantity (in m) 10 sea_surface_height_above_geoid; %corresponds to zos field in CMIP5 archives. Spatial average is 0. Specified as a spatio-temporally variable (in m) 11 sea_water_pressure_at_sea_floor; %corresponds to bpo field in CMIP5 archives. Specified as a spatio-temporally variable quantity (in m equivalent, not in Pa!) 13 12 14 13 end 15 14 methods 16 15 function self = extrude(self,md) % {{{ 17 self.sea_surface_height_ change_above_geoid=project3d(md,'vector',self.sea_surface_height_change_above_geoid,'type','node','layer',1);18 self.sea_water_pressure_ change_at_sea_floor=project3d(md,'vector',self.sea_water_pressure_change_at_sea_floor,'type','node','layer',1);16 self.sea_surface_height_above_geoid=project3d(md,'vector',self.sea_surface_height_above_geoid,'type','node','layer',1); 17 self.sea_water_pressure_at_sea_floor=project3d(md,'vector',self.sea_water_pressure_at_sea_floor,'type','node','layer',1); 19 18 end % }}} 20 19 function self = dsl(varargin) % {{{ … … 30 29 function self = setdefaultparameters(self) % {{{ 31 30 32 self.global_average_thermosteric_sea_level_change=0; 33 self.sea_surface_height_change_above_geoid=NaN; 34 self.sea_water_pressure_change_at_sea_floor=NaN; 35 self.compute_fingerprints=0; 31 self.global_average_thermosteric_sea_level=NaN; 32 self.sea_surface_height_above_geoid=NaN; 33 self.sea_water_pressure_at_sea_floor=NaN; 36 34 37 35 end % }}} … … 41 39 if ~ismember('SealevelchangeAnalysis',analyses), return; end 42 40 if (strcmp(solution,'TransientSolution') & md.transient.isslc == 0), return; end 43 md = checkfield(md,'fieldname','dsl.global_average_thermosteric_sea_level_change','NaN',1,'Inf',1); 44 md = checkfield(md,'fieldname','dsl.sea_surface_height_change_above_geoid','NaN',1,'Inf',1,'timeseries',1); 45 md = checkfield(md,'fieldname','dsl.sea_water_pressure_change_at_sea_floor','NaN',1,'Inf',1,'timeseries',1); 46 md = checkfield(md,'fieldname','dsl.compute_fingerprints','NaN',1,'Inf',1,'values',[0,1]); 47 if self.compute_fingerprints, 48 %check geodetic flag of is on: 49 if md.solidearth.settings.isgrd==0, 50 error('DSL checkconsistency error message: if bottom pressure fingerprints computations are requested, solidearth class should have grd flag on'); 51 end 41 md = checkfield(md,'fieldname','dsl.global_average_thermosteric_sea_level','NaN',1,'Inf',1); 42 md = checkfield(md,'fieldname','dsl.sea_surface_height_above_geoid','NaN',1,'Inf',1,'timeseries',1); 43 md = checkfield(md,'fieldname','dsl.sea_water_pressure_at_sea_floor','NaN',1,'Inf',1,'timeseries',1); 44 45 if md.solidearth.settings.compute_bp_grd==1, 46 md = checkfield(md,'fieldname','dsl.sea_water_pressure_at_sea_floor','empty',1); 52 47 end 53 48 54 49 end % }}} 55 50 function disp(self) % {{{ 56 51 57 52 disp(sprintf(' dsl parameters:')); 58 fielddisplay(self,'global_average_thermosteric_sea_level_change','corresponds to zostoga field in CMIP5 archives. Specified as a temporally variable global rate (mm/yr)'); 59 fielddisplay(self,'sea_surface_height_change_above_geoid','corresponds to zos field in CMIP5 archives. Spatial average is 0. Specified as a spatio-temporally variable rate (mm/yr)'); 60 fielddisplay(self,'sea_water_pressure_change_at_sea_floor','corresponds to bpo field in CMIP5 archives. Specified as a spatio-temporally variable rate (in Pa/yr)'); 61 fielddisplay(self,'compute_fingerprints','%do we use the sea water pressure change to compute fingerprints and correct sea_surface_height_change_above_geoid'); 53 fielddisplay(self,'global_average_thermosteric_sea_level','corresponds to zostoga field in CMIP5 archives. Specified as a temporally variable quantity (in m)'); 54 fielddisplay(self,'sea_surface_height_above_geoid','corresponds to zos field in CMIP5 archives. Spatial average is 0. Specified as a spatio-temporally quantity (in m)'); 55 fielddisplay(self,'sea_water_pressure_at_sea_floor','corresponds to bpo field in CMIP5 archives. Specified as a spatio-temporally variable quantity (in m equivalent)'); 62 56 63 57 end % }}} … … 65 59 66 60 WriteData(fid,prefix,'name','md.dsl.model','data',1,'format','Integer'); 67 WriteData(fid,prefix,'object',self,'fieldname','compute_fingerprints','format','Integer'); 68 WriteData(fid,prefix,'object',self,'fieldname','global_average_thermosteric_sea_level_change','format','DoubleMat','mattype',1,'timeseries',1,'timeserieslength',2,'yts',md.constants.yts,'scale',1e-3/md.constants.yts); 69 WriteData(fid,prefix,'object',self,'fieldname','sea_water_pressure_change_at_sea_floor','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 70 WriteData(fid,prefix,'object',self,'fieldname','sea_surface_height_change_above_geoid','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 61 WriteData(fid,prefix,'object',self,'fieldname','global_average_thermosteric_sea_level','format','DoubleMat','mattype',2,'timeseries',1,'timeserieslength',2,'yts',md.constants.yts); %mattype 2, because we are sending a GMSL value identical everywhere on each element. 62 WriteData(fid,prefix,'object',self,'fieldname','sea_surface_height_above_geoid','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); %mattype 1 because we specify DSL at vertex locations. 63 WriteData(fid,prefix,'object',self,'fieldname','sea_water_pressure_at_sea_floor','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); %mattype 1 because we specify bottom pressure at vertex locations. 71 64 72 65 end % }}} 73 66 function savemodeljs(self,fid,modelname) % {{{ 74 67 75 writejs1Darray(fid,[modelname '.dsl.global_average_thermosteric_sea_level_change'],self.global_average_thermosteric_sea_level_change); 76 writejs1Darray(fid,[modelname '.dsl.compute_fingerprints'],self.compute_fingerprints); 77 writejs1Darray(fid,[modelname '.dsl.sea_surface_height_change_above_geoid'],self.sea_surface_height_change_above_geoid); 78 writejs1Darray(fid,[modelname '.dsl.sea_water_pressure_change_at_sea_floor'],self.sea_water_pressure_change_at_sea_floor); 68 writejs1Darray(fid,[modelname '.dsl.global_average_thermosteric_sea_level'],self.global_average_thermosteric_sea_level); 69 writejs1Darray(fid,[modelname '.dsl.sea_surface_height_above_geoid'],self.sea_surface_height_above_geoid); 70 writejs1Darray(fid,[modelname '.dsl.sea_water_pressure_at_sea_floor'],self.sea_water_pressure_at_sea_floor); 79 71 80 72 end % }}} 73 function self = initialize(self,md) % {{{ 74 75 if isnan(self.global_average_thermosteric_sea_level) 76 self.global_average_thermosteric_sea_level=[0;0]; 77 disp(' no dsl.global_average_thermosteric_sea_level specified: transient values set at zero'); 78 end 79 if isnan(self.sea_surface_height_above_geoid) 80 self.sea_surface_height_above_geoid=[zeros(md.mesh.numberofvertices,1);0]; 81 disp(' no dsl.sea_surface_height_above_geoid specified: transient values set at zero'); 82 end 83 if isnan(self.sea_water_pressure_at_sea_floor) 84 self.sea_water_pressure_at_sea_floor=[zeros(md.mesh.numberofvertices,1);0]; 85 disp(' no dsl.sea_water_pressure_at_sea_floor specified: transient values set at zero'); 86 end 87 88 end % }}} 89 81 90 end 82 91 end -
issm/trunk-jpl/src/m/classes/dslmme.m
r25956 r26047 8 8 9 9 modelid; %index into the multi-model ensemble, determine which field will be used. 10 global_average_thermosteric_sea_level_change; %corresponds to zostoga fields in CMIP5 archives. Specified as a temporally variable global rate (mm/yr) for each ensemble. 11 sea_surface_height_change_above_geoid; %corresponds to zos fields in CMIP5 archives. Spatial average is 0. Specified as a spatio-temporally variable rate (mm/yr) for each ensemble 12 sea_water_pressure_change_at_sea_floor; %corresponds to bpo fields in CMIP5 archives. Specified as a spatio-temporally variable rate (in mm/yr equivalent, not in Pa/yr!) for each ensemble 13 compute_fingerprints; %do we use the sea water pressure change to compute fingerprints and correct sea_surface_height_change_above_geoid 10 global_average_thermosteric_sea_level; %corresponds to zostoga fields in CMIP5 archives. Specified as a temporally quantity (in m) for each ensemble. 11 sea_surface_height_above_geoid; %corresponds to zos fields in CMIP5 archives. Spatial average is 0. Specified as a spatio-temporally quantity (in m) for each ensemble 12 sea_water_pressure_at_sea_floor; %corresponds to bpo field in CMIP5 archives. Specified as a spatio-temporally variable quantity (in m equivalent, not in Pa!) for each ensemble 14 13 15 14 end … … 28 27 29 28 self.modelid=0; 30 self.global_average_thermosteric_sea_level_change={}; 31 self.sea_surface_height_change_above_geoid={}; 32 self.sea_water_pressure_change_at_sea_floor={}; 33 self.compute_fingerprints=0; 29 self.global_average_thermosteric_sea_level={}; 30 self.sea_surface_height_above_geoid={}; 31 self.sea_water_pressure_at_sea_floor={}; 34 32 35 33 end % }}} … … 39 37 if ~ismember('SealevelchangeAnalysis',analyses), return; end 40 38 if (strcmp(solution,'TransientSolution') & md.transient.isslc == 0), return; end 41 for i=1:length(self.global_average_thermosteric_sea_level _change),42 md = checkfield(md,'field',self.global_average_thermosteric_sea_level _change{i},'NaN',1,'Inf',1);43 md = checkfield(md,'field',self.sea_surface_height_ change_above_geoid{i},'NaN',1,'Inf',1,'timeseries',1);44 md = checkfield(md,'field',self.sea_water_pressure_ change_at_sea_floor{i},'NaN',1,'Inf',1,'timeseries',1);39 for i=1:length(self.global_average_thermosteric_sea_level), 40 md = checkfield(md,'field',self.global_average_thermosteric_sea_level{i},'NaN',1,'Inf',1); 41 md = checkfield(md,'field',self.sea_surface_height_above_geoid{i},'NaN',1,'Inf',1,'timeseries',1); 42 md = checkfield(md,'field',self.sea_water_pressure_at_sea_floor{i},'NaN',1,'Inf',1,'timeseries',1); 45 43 end 46 md = checkfield(md,'field',self.modelid,'NaN',1,'Inf',1,'>=',1,'<=',length(self.global_average_thermosteric_sea_level_change)); 47 if self.compute_fingerprints, 48 %check geodetic flag of solidearth is on: 49 if md.solidearth.settings.isgrd==0, 50 error('DSL checkconsistency error message: if bottom pressure fingerprints computations are requested, solidearth class should have geodetic flag on'); 51 end 44 md = checkfield(md,'field',self.modelid,'NaN',1,'Inf',1,'>=',1,'<=',length(self.global_average_thermosteric_sea_level)); 45 46 if md.solidearth.settings.compute_bp_grd==1, 47 md = checkfield(md,'fieldname','dsl.sea_water_pressure_at_sea_floor','empty',1); 52 48 end 53 54 49 55 50 end % }}} … … 58 53 disp(sprintf(' dsl mme parameters:')); 59 54 fielddisplay(self,'modelid','index into the multi-model ensemble, determine which field will be used.'); 60 fielddisplay(self,'global_average_thermosteric_sea_level_change','corresponds to zostoga fields in CMIP5 archives. Specified as a temporally variable global rate (mm/yr) for each ensemble.'); 61 fielddisplay(self,'sea_surface_height_change_above_geoid','corresponds to zos fields in CMIP5 archives. Spatial average is 0. Specified as a spatio-temporally variable rate (mm/yr) for each ensemble.'); 62 fielddisplay(self,'sea_water_pressure_change_at_sea_floor','corresponds to bpo fields in CMIP5 archives. Specified as a spatio-temporally variable rate (in mm/yr) for each ensemble.'); 63 fielddisplay(self,'compute_fingerprints','%do we use the sea water pressure change to compute fingerprints and correct sea_surface_height_change_above_geoid'); 55 fielddisplay(self,'global_average_thermosteric_sea_level','corresponds to zostoga fields in CMIP5 archives. Specified as a temporally variable quantity (in m) for each ensemble.'); 56 fielddisplay(self,'sea_surface_height_above_geoid','corresponds to zos fields in CMIP5 archives. Spatial average is 0. Specified as a spatio-temporally quantity (in m) for each ensemble.'); 57 fielddisplay(self,'sea_water_pressure_at_sea_floor','corresponds to bpo fields in CMIP5 archives. Specified as a spatio-temporally quantity (in m) for each ensemble.'); 64 58 end % }}} 65 59 function marshall(self,prefix,md,fid) % {{{ 66 60 67 61 WriteData(fid,prefix,'name','md.dsl.model','data',2,'format','Integer'); 68 WriteData(fid,prefix,'object',self,'fieldname','compute_fingerprints','format','Integer');69 62 WriteData(fid,prefix,'object',self,'fieldname','modelid','format','Double'); 70 WriteData(fid,prefix,'name','md.dsl.nummodels','data',length(self.global_average_thermosteric_sea_level _change),'format','Integer');71 WriteData(fid,prefix,'object',self,'fieldname','global_average_thermosteric_sea_level _change','format','MatArray','timeseries',1,'timeserieslength',2,'yts',md.constants.yts,'scale',1e-3/md.constants.yts);72 WriteData(fid,prefix,'object',self,'fieldname','sea_water_pressure_ change_at_sea_floor','format','MatArray','timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts,'scale',1e-3);73 WriteData(fid,prefix,'object',self,'fieldname','sea_surface_height_ change_above_geoid','format','MatArray','timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts,'scale',1e-3/md.constants.yts);63 WriteData(fid,prefix,'name','md.dsl.nummodels','data',length(self.global_average_thermosteric_sea_level),'format','Integer'); 64 WriteData(fid,prefix,'object',self,'fieldname','global_average_thermosteric_sea_level','format','MatArray','timeseries',1,'timeserieslength',2); 65 WriteData(fid,prefix,'object',self,'fieldname','sea_water_pressure_at_sea_floor','format','MatArray','timeserieslength',md.mesh.numberofvertices+1); 66 WriteData(fid,prefix,'object',self,'fieldname','sea_surface_height_above_geoid','format','MatArray','timeserieslength',md.mesh.numberofvertices+1); 74 67 75 68 end % }}} 76 69 function self = extrude(self,md) % {{{ 77 for i=1:length(self.global_average_thermosteric_sea_level _change),78 self.sea_surface_height_ change_above_geoid{i}=project3d(md,'vector',self.sea_surface_height_change_above_geoid{i},'type','node','layer',1);79 self.sea_water_pressure_ change_at_sea_floor{i}=project3d(md,'vector',self.sea_water_pressure_change_at_sea_floor{i},'type','node','layer',1);70 for i=1:length(self.global_average_thermosteric_sea_level), 71 self.sea_surface_height_above_geoid{i}=project3d(md,'vector',self.sea_surface_height_above_geoid{i},'type','node','layer',1); 72 self.sea_water_pressure_at_sea_floor{i}=project3d(md,'vector',self.sea_water_pressure_at_sea_floor{i},'type','node','layer',1); 80 73 end 81 74 end % }}} … … 83 76 84 77 writejsdouble(fid,[modelname '.dsl.modelid'],self.modelid); 85 writejscellarray(fid,[modelname '.dsl.global_average_thermosteric_sea_level _change'],self.global_average_thermosteric_sea_level_change);86 writejscellarray(fid,[modelname '.dsl.sea_surface_height_ change_above_geoid'],self.sea_surface_height_change_above_geoid);78 writejscellarray(fid,[modelname '.dsl.global_average_thermosteric_sea_level'],self.global_average_thermosteric_sea_level); 79 writejscellarray(fid,[modelname '.dsl.sea_surface_height_above_geoid'],self.sea_surface_height_above_geoid); 87 80 writejs1Darray(fid,[modelname '.dsl.compute_fingerprints'],self.compute_fingerprints); 88 writejscellarray(fid,[modelname '.dsl.sea_water_pressure_ change_at_sea_floor'],self.sea_water_pressure_change_at_sea_floor);81 writejscellarray(fid,[modelname '.dsl.sea_water_pressure_at_sea_floor'],self.sea_water_pressure_at_sea_floor); 89 82 90 83 end % }}} -
issm/trunk-jpl/src/m/classes/fourierlove.m
r25297 r26047 63 63 function md = checkconsistency(self,md,solution,analyses) % {{{ 64 64 65 if ~ismember('LoveAnalysis',analyses), return; end 66 65 67 md = checkfield(md,'fieldname','love.nfreq','NaN',1,'Inf',1,'numel',1,'>',0); 66 68 md = checkfield(md,'fieldname','love.frequencies','NaN',1,'Inf',1,'numel',md.love.nfreq); … … 76 78 error('Degree 1 not supported for Volumetric Potential forcing. Use sh_min>=2 for this kind of calculation.') 77 79 end 80 81 %need 'litho' material: 82 if ~isa(md.materials,'materials') 83 error('Need a ''litho'' material to run a Fourier Love number analysis'); 84 else 85 if ~sum(strcmpi(md.materials.nature,'litho')), 86 error('Need a ''litho'' material to run a Fourier Love number analysis'); 87 end 88 end 89 78 90 end % }}} 79 91 function marshall(self,prefix,md,fid) % {{{ -
issm/trunk-jpl/src/m/classes/geometry.m
r25956 r26047 53 53 function md = checkconsistency(self,md,solution,analyses) % {{{ 54 54 55 if (strcmp(solution,'TransientSolution') & md.transient.isgia) | strcmp(solution,'GiaSolution'), 56 md = checkfield(md,'fieldname','geometry.thickness','timeseries',1,'NaN',1,'Inf',1); 57 elseif strcmpi(solution,'SealevelchangeSolution'), 58 md = checkfield(md,'fieldname','geometry.bed','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]); 59 return; 60 elseif strcmpi(solution,'LoveSolution'), 55 if strcmpi(solution,'LoveSolution'), 61 56 return; 62 57 else … … 90 85 end % }}} 91 86 function marshall(self,prefix,md,fid) % {{{ 87 88 if (size(self.thickness==md.mesh.numberofvertices) | (self.thickness==md.mesh.numberofvertices+1)), 89 WriteData(fid,prefix,'object',self,'fieldname','thickness','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 90 elseif (size(self.thickness==md.mesh.numberofelements) | (self.thickness==md.mesh.numberofelements+1)), 91 WriteData(fid,prefix,'object',self,'fieldname','thickness','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofelements+1,'yts',md.constants.yts); 92 else 93 error('geometry thickness time series should be a vertex or element time series'); 94 end 95 92 96 WriteData(fid,prefix,'object',self,'fieldname','surface','format','DoubleMat','mattype',1); 93 WriteData(fid,prefix,'object',self,'fieldname','thickness','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);94 97 WriteData(fid,prefix,'object',self,'fieldname','base','format','DoubleMat','mattype',1); 95 98 WriteData(fid,prefix,'object',self,'fieldname','bed','format','DoubleMat','mattype',1); -
issm/trunk-jpl/src/m/classes/hydrologyshreve.m
r23093 r26047 34 34 end % }}} 35 35 function md = checkconsistency(self,md,solution,analyses) % {{{ 36 36 37 37 %Early return 38 if ~ismember('HydrologyShreveAnalysis',analyses) 39 return; 40 end 38 if ~ismember('HydrologyShreveAnalysis',analyses) | (strcmp(solution,'TransientSolution') & md.transient.ishydrology==0), return; end 41 39 42 40 md = checkfield(md,'fieldname','hydrology.spcwatercolumn','Inf',1,'timeseries',1); -
issm/trunk-jpl/src/m/classes/initialization.m
r26008 r26047 20 20 hydraulic_potential = NaN; 21 21 channelarea = NaN; 22 sealevel = NaN; 23 bottompressure = NaN; 22 24 sample = NaN; 23 25 end … … 35 37 self.epl_head=project3d(md,'vector',self.epl_head,'type','node','layer',1); 36 38 self.epl_thickness=project3d(md,'vector',self.epl_thickness,'type','node','layer',1); 39 self.sealevel=project3d(md,'vector',self.sealevel,'type','node','layer',1); 40 self.bottompressure=project3d(md,'vector',self.bottompressure,'type','node','layer',1); 37 41 38 42 %Lithostatic pressure by default … … 60 64 md = checkfield(md,'fieldname','initialization.vx','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]); 61 65 md = checkfield(md,'fieldname','initialization.vy','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]); 66 end 67 if ismember('OceantransportAnalysis',analyses) 68 if strcmp(solution,'TransientSolution') & md.transient.isslc & md.transient.isoceantransport, 69 md = checkfield(md,'fieldname','initialization.bottompressure','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]); 70 end 62 71 end 63 72 if ismember('BalancethicknessAnalysis',analyses) & strcmp(solution,'BalancethicknessSolution'), … … 89 98 if ismember('HydrologyShreveAnalysis',analyses), 90 99 if isa(md.hydrology,'hydrologyshreve'), 100 if strcmp(solution,'TransientSolution') & md.transient.ishydrology, 101 md = checkfield(md,'fieldname','initialization.watercolumn','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]); 102 end 103 if strcmp(solution,'HydrologySolution'), 104 md = checkfield(md,'fieldname','initialization.watercolumn','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]); 105 end 106 end 107 end 108 if ismember('HydrologyTwsAnalysis',analyses), 109 if isa(md.hydrology,'hydrologytws'), 91 110 md = checkfield(md,'fieldname','initialization.watercolumn','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]); 111 end 112 end 113 if ismember('SealevelchangeAnalysis',analyses) & ~(strcmp(solution,'TransientSolution') & md.transient.isslc == 0), 114 if strcmp(solution,'TransientSolution') & md.transient.isslc, 115 md = checkfield(md,'fieldname','initialization.sealevel','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]); 92 116 end 93 117 end … … 145 169 WriteData(fid,prefix,'object',self,'fieldname','vz','format','DoubleMat','mattype',1,'scale',1./yts); 146 170 WriteData(fid,prefix,'object',self,'fieldname','pressure','format','DoubleMat','mattype',1); 171 WriteData(fid,prefix,'object',self,'fieldname','sealevel','format','DoubleMat','mattype',1); 172 WriteData(fid,prefix,'object',self,'fieldname','bottompressure','format','DoubleMat','mattype',1); 147 173 WriteData(fid,prefix,'object',self,'fieldname','temperature','format','DoubleMat','mattype',1); 148 174 WriteData(fid,prefix,'object',self,'fieldname','waterfraction','format','DoubleMat','mattype',1); -
issm/trunk-jpl/src/m/classes/lovenumbers.m
r25956 r26047 63 63 error('lovenumbers error message: love numbers should be provided at the same level of accuracy'); 64 64 end 65 65 66 66 67 67 end % }}} -
issm/trunk-jpl/src/m/classes/matdamageice.m
r25956 r26047 22 22 rheology_n = NaN; 23 23 rheology_law = ''; 24 25 %giaivins:26 lithosphere_shear_modulus = 0.;27 lithosphere_density = 0.;28 mantle_shear_modulus = 0.;29 mantle_density = 0.;30 24 31 25 %slc … … 101 95 self.rheology_law='Paterson'; 102 96 103 % GIA:104 self.lithosphere_shear_modulus = 6.7*10^10; % (Pa)105 self.lithosphere_density = 3.32; % (g/cm^-3)106 self.mantle_shear_modulus = 1.45*10^11; % (Pa)107 self.mantle_density = 3.34; % (g/cm^-3)108 109 97 %SLR 110 98 self.earth_density= 5512; % average density of the Earth, (kg/m^3) … … 121 109 md = checkfield(md,'fieldname','materials.effectiveconductivity_averaging','numel',[1],'values',[0 1 2]); 122 110 123 if ismember('GiaAnalysis',analyses),124 md = checkfield(md,'fieldname','materials.lithosphere_shear_modulus','>',0,'numel',1);125 md = checkfield(md,'fieldname','materials.lithosphere_density','>',0,'numel',1);126 md = checkfield(md,'fieldname','materials.mantle_shear_modulus','>',0,'numel',1);127 md = checkfield(md,'fieldname','materials.mantle_density','>',0,'numel',1);128 end129 111 if ismember('SealevelchangeAnalysis',analyses), 130 112 md = checkfield(md,'fieldname','materials.earth_density','>',0,'numel',1); … … 152 134 fielddisplay(self,'rheology_n','Glen''s flow law exponent'); 153 135 fielddisplay(self,'rheology_law',['law for the temperature dependance of the rheology: ''None'', ''BuddJacka'', ''Cuffey'', ''CuffeyTemperate'', ''Paterson'', ''Arrhenius'' or ''LliboutryDuval''']); 154 fielddisplay(self,'lithosphere_shear_modulus','Lithosphere shear modulus [Pa]');155 fielddisplay(self,'lithosphere_density','Lithosphere density [g/cm^-3]');156 fielddisplay(self,'mantle_shear_modulus','Mantle shear modulus [Pa]');157 fielddisplay(self,'mantle_density','Mantle density [g/cm^-3]');158 136 fielddisplay(self,'earth_density','Mantle density [kg/m^-3]'); 159 137 end % }}} … … 177 155 WriteData(fid,prefix,'data',self.rheology_law,'name','md.materials.rheology_law','format','String'); 178 156 179 WriteData(fid,prefix,'object',self,'class','materials','fieldname','lithosphere_shear_modulus','format','Double');180 WriteData(fid,prefix,'object',self,'class','materials','fieldname','lithosphere_density','format','Double','scale',10^3);181 WriteData(fid,prefix,'object',self,'class','materials','fieldname','mantle_shear_modulus','format','Double');182 WriteData(fid,prefix,'object',self,'class','materials','fieldname','mantle_density','format','Double','scale',10^3);183 157 WriteData(fid,prefix,'object',self,'class','materials','fieldname','earth_density','format','Double'); 184 158 -
issm/trunk-jpl/src/m/classes/matenhancedice.m
r25956 r26047 23 23 rheology_n = NaN; 24 24 rheology_law = ''; 25 26 %giaivins:27 lithosphere_shear_modulus = 0.;28 lithosphere_density = 0.;29 mantle_shear_modulus = 0.;30 mantle_density = 0.;31 25 32 26 %slr … … 103 97 self.rheology_law='Paterson'; 104 98 105 % GIA:106 self.lithosphere_shear_modulus = 6.7*10^10; % (Pa)107 self.lithosphere_density = 3.32; % (g/cm^-3)108 self.mantle_shear_modulus = 1.45*10^11; % (Pa)109 self.mantle_density = 3.34; % (g/cm^-3)110 111 99 %SLR 112 100 self.earth_density= 5512; % average density of the Earth, (kg/m^3) … … 124 112 md = checkfield(md,'fieldname','materials.effectiveconductivity_averaging','numel',[1],'values',[0 1 2]); 125 113 126 if ismember('GiaAnalysis',analyses),127 md = checkfield(md,'fieldname','materials.lithosphere_shear_modulus','>',0,'numel',1);128 md = checkfield(md,'fieldname','materials.lithosphere_density','>',0,'numel',1);129 md = checkfield(md,'fieldname','materials.mantle_shear_modulus','>',0,'numel',1);130 md = checkfield(md,'fieldname','materials.mantle_density','>',0,'numel',1);131 end132 114 if ismember('SealevelchangeAnalysis',analyses), 133 115 md = checkfield(md,'fieldname','materials.earth_density','>',0,'numel',1); … … 155 137 fielddisplay(self,'rheology_n','Glen''s flow law exponent'); 156 138 fielddisplay(self,'rheology_law',['law for the temperature dependance of the rheology: ''None'', ''BuddJacka'', Cuffey'', ''CuffeyTemperate'', ''Paterson'', ''Arrhenius'' or ''LliboutryDuval''']); 157 fielddisplay(self,'lithosphere_shear_modulus','Lithosphere shear modulus [Pa]');158 fielddisplay(self,'lithosphere_density','Lithosphere density [g/cm^-3]');159 fielddisplay(self,'mantle_shear_modulus','Mantle shear modulus [Pa]');160 fielddisplay(self,'mantle_density','Mantle density [g/cm^-3]');161 139 fielddisplay(self,'earth_density','Mantle density [kg/m^-3]'); 162 140 end % }}} … … 181 159 WriteData(fid,prefix,'data',self.rheology_law,'name','md.materials.rheology_law','format','String'); 182 160 183 WriteData(fid,prefix,'object',self,'class','materials','fieldname','lithosphere_shear_modulus','format','Double');184 WriteData(fid,prefix,'object',self,'class','materials','fieldname','lithosphere_density','format','Double','scale',10^3);185 WriteData(fid,prefix,'object',self,'class','materials','fieldname','mantle_shear_modulus','format','Double');186 WriteData(fid,prefix,'object',self,'class','materials','fieldname','mantle_density','format','Double','scale',10^3);187 161 WriteData(fid,prefix,'object',self,'class','materials','fieldname','earth_density','format','Double'); 188 162 end % }}} … … 207 181 writejs1Darray(fid,[modelname '.materials.rheology_n'],self.rheology_n); 208 182 writejsstring(fid,[modelname '.materials.rheology_law'],self.rheology_law); 209 writejsdouble(fid,[modelname '.materials.lithosphere_shear_modulus'],self.lithosphere_shear_modulus);210 writejsdouble(fid,[modelname '.materials.lithosphere_density'],self.lithosphere_density);211 writejsdouble(fid,[modelname '.materials.mantle_shear_modulus'],self.mantle_shear_modulus);212 writejsdouble(fid,[modelname '.materials.mantle_density'],self.mantle_density);213 183 writejsdouble(fid,[modelname '.materials.earth_density'],self.earth_density); 214 184 -
issm/trunk-jpl/src/m/classes/materials.m
r25992 r26047 37 37 self.addprop('thermalconductivity'); 38 38 self.addprop('temperateiceconductivity'); 39 self.addprop('effectiveconductivity_averaging'); 39 40 self.addprop('meltingpoint'); 40 41 self.addprop('beta'); … … 59 60 self.addprop('rho_water'); 60 61 self.addprop('rho_freshwater'); 61 self.addprop('earth_density');62 62 otherwise 63 63 error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')'); 64 64 end 65 65 end 66 self.addprop('earth_density'); 67 66 68 %set default parameters: 67 69 self.setdefaultparameters(); … … 97 99 %wet ice thermal conductivity (W/m/K) 98 100 self.temperateiceconductivity=.24; 101 102 %computation of effective conductivity 103 self.effectiveconductivity_averaging=1; 99 104 100 105 %the melting point of ice at 1 atmosphere of pressure in K … … 113 118 %available: none, paterson and arrhenius 114 119 self.rheology_law='Paterson'; 120 121 %Rheology fields default: 122 self.rheology_B = 1*1e8; 123 self.rheology_n = 3; 124 115 125 116 126 case 'litho' … … 137 147 %ocean water density (kg/m^3) 138 148 self.rho_water=1023.; 139 % average density of the Earth (kg/m^3) 140 self.earth_density=5512; 141 149 142 150 %fresh water density (kg/m^3) 143 151 self.rho_freshwater=1000.; … … 146 154 error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')'); 147 155 end 156 157 % average density of the Earth (kg/m^3) 158 self.earth_density=5512; 159 148 160 end 149 161 end % }}} … … 251 263 WriteData(fid,prefix,'name','md.materials.nature','data',naturetointeger(self.nature),'format','IntMat','mattype',3); 252 264 WriteData(fid,prefix,'name','md.materials.type','data',5,'format','Integer'); %DANGER, this can evolve if you have classes. 253 254 265 for i=1:length(self.nature), 255 266 nat=self.nature{i}; … … 264 275 WriteData(fid,prefix,'object',self,'class','materials','fieldname','thermalconductivity','format','Double'); 265 276 WriteData(fid,prefix,'object',self,'class','materials','fieldname','temperateiceconductivity','format','Double'); 277 WriteData(fid,prefix,'object',self,'class','materials','fieldname','effectiveconductivity_averaging','format','Integer'); 266 278 WriteData(fid,prefix,'object',self,'class','materials','fieldname','meltingpoint','format','Double'); 267 279 WriteData(fid,prefix,'object',self,'class','materials','fieldname','beta','format','Double'); … … 282 294 WriteData(fid,prefix,'object',self,'class','materials','fieldname','burgers_viscosity','format','DoubleMat','mattype',3); 283 295 WriteData(fid,prefix,'object',self,'class','materials','fieldname','burgers_mu','format','DoubleMat','mattype',3); 296 %compute earth density compatible with our layer density distribution: 297 earth_density=0; 298 for i=1:self.numlayers, 299 earth_density=earth_density+ (self.radius(i+1)^3-self.radius(i)^3)*self.density(i); 300 end 301 earth_density=earth_density/self.radius(self.numlayers+1)^3; 302 self.earth_density=earth_density; 284 303 case 'hydro' 285 304 WriteData(fid,prefix,'object',self,'class','materials','fieldname','rho_ice','format','Double'); 286 305 WriteData(fid,prefix,'object',self,'class','materials','fieldname','rho_water','format','Double'); 287 WriteData(fid,prefix,'object',self,'class','materials','fieldname','earth_density','format','Double');288 306 WriteData(fid,prefix,'object',self,'class','materials','fieldname','rho_freshwater','format','Double'); 289 290 307 otherwise 291 308 error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')'); 292 309 end 293 310 end 311 WriteData(fid,prefix,'data',self.earth_density,'name','md.materials.earth_density','format','Double'); 294 312 end % }}} 295 313 function self = extrude(self,md) % {{{ … … 317 335 writejsdouble(fid,[modelname '.materials.thermalconductivity'],self.thermalconductivity); 318 336 writejsdouble(fid,[modelname '.materials.temperateiceconductivity'],self.temperateiceconductivity); 337 writejsdouble(fid,[modelname '.materials.effectiveconductivity_averaging'],self.effectiveconductivity_averaging); 319 338 writejsdouble(fid,[modelname '.materials.meltingpoint'],self.meltingpoint); 320 339 writejsdouble(fid,[modelname '.materials.beta'],self.beta); -
issm/trunk-jpl/src/m/classes/matestar.m
r25956 r26047 23 23 rheology_Es = NaN; 24 24 rheology_law = ''; 25 26 %giaivins:27 lithosphere_shear_modulus = 0.;28 lithosphere_density = 0.;29 mantle_shear_modulus = 0.;30 mantle_density = 0.;31 25 32 26 %slc … … 110 104 self.rheology_law='Paterson'; 111 105 112 % GIA:113 self.lithosphere_shear_modulus = 6.7*10^10; % (Pa)114 self.lithosphere_density = 3.32; % (g/cm^-3)115 self.mantle_shear_modulus = 1.45*10^11; % (Pa)116 self.mantle_density = 3.34; % (g/cm^-3)117 118 106 %SLR 119 107 self.earth_density= 5512; % average density of the Earth, (kg/m^3) … … 131 119 md = checkfield(md,'fieldname','materials.effectiveconductivity_averaging','numel',[1],'values',[0 1 2]); 132 120 133 if ismember('GiaAnalysis',analyses),134 md = checkfield(md,'fieldname','materials.lithosphere_shear_modulus','>',0,'numel',1);135 md = checkfield(md,'fieldname','materials.lithosphere_density','>',0,'numel',1);136 md = checkfield(md,'fieldname','materials.mantle_shear_modulus','>',0,'numel',1);137 md = checkfield(md,'fieldname','materials.mantle_density','>',0,'numel',1);138 end139 121 if ismember('SealevelchangeAnalysis',analyses), 140 122 md = checkfield(md,'fieldname','materials.earth_density','>',0,'numel',1); … … 162 144 fielddisplay(self,'rheology_Es','shear enhancement factor'); 163 145 fielddisplay(self,'rheology_law',['law for the temperature dependance of the rheology: ''None'', ''BuddJacka'', ''Cuffey'', ''CuffeyTemperate'', ''Paterson'', ''Arrhenius'' or ''LliboutryDuval''']); 164 fielddisplay(self,'lithosphere_shear_modulus','Lithosphere shear modulus [Pa]');165 fielddisplay(self,'lithosphere_density','Lithosphere density [g/cm^-3]');166 fielddisplay(self,'mantle_shear_modulus','Mantle shear modulus [Pa]');167 fielddisplay(self,'mantle_density','Mantle density [g/cm^-3]');168 146 fielddisplay(self,'earth_density','Mantle density [kg/m^-3]'); 169 147 end % }}} … … 188 166 WriteData(fid,prefix,'data',self.rheology_law,'name','md.materials.rheology_law','format','String'); 189 167 190 WriteData(fid,prefix,'object',self,'class','materials','fieldname','lithosphere_shear_modulus','format','Double');191 WriteData(fid,prefix,'object',self,'class','materials','fieldname','lithosphere_density','format','Double','scale',10^3);192 WriteData(fid,prefix,'object',self,'class','materials','fieldname','mantle_shear_modulus','format','Double');193 WriteData(fid,prefix,'object',self,'class','materials','fieldname','mantle_density','format','Double','scale',10^3);194 168 WriteData(fid,prefix,'object',self,'class','materials','fieldname','earth_density','format','Double'); 195 169 end % }}} … … 214 188 writejs1Darray(fid,[modelname '.materials.rheology_Es'],self.rheology_Es); 215 189 writejsstring(fid,[modelname '.materials.rheology_law'],self.rheology_law); 216 writejsdouble(fid,[modelname '.materials.lithosphere_shear_modulus'],self.lithosphere_shear_modulus);217 writejsdouble(fid,[modelname '.materials.lithosphere_density'],self.lithosphere_density);218 writejsdouble(fid,[modelname '.materials.mantle_shear_modulus'],self.mantle_shear_modulus);219 writejsdouble(fid,[modelname '.materials.mantle_density'],self.mantle_density);220 190 writejsdouble(fid,[modelname '.materials.earth_density'],self.earth_density); 221 191 -
issm/trunk-jpl/src/m/classes/matice.m
r25956 r26047 22 22 rheology_n = NaN; 23 23 rheology_law = ''; 24 25 %giaivins:26 lithosphere_shear_modulus = 0.;27 lithosphere_density = 0.;28 mantle_shear_modulus = 0.;29 mantle_density = 0.;30 24 31 25 %slc … … 101 95 self.rheology_law='Paterson'; 102 96 103 % GIA: 104 self.lithosphere_shear_modulus = 6.7*10^10; % (Pa) 105 self.lithosphere_density = 3.32; % (g/cm^-3) 106 self.mantle_shear_modulus = 1.45*10^11; % (Pa) 107 self.mantle_density = 3.34; % (g/cm^-3) 97 %Rheology for ice: 98 self.rheology_B=2.1*1e8; 99 self.rheology_n=3; 108 100 109 101 %SLR … … 112 104 end % }}} 113 105 function md = checkconsistency(self,md,solution,analyses) % {{{ 106 107 if strcmpi(solution,'TransientSolution') & md.transient.isslc, 108 md = checkfield(md,'fieldname','materials.earth_density','>',0,'numel',1); 109 return; 110 end 114 111 115 if ~strcmpi(solution,'SealevelchangeSolution'), 116 md = checkfield(md,'fieldname','materials.rho_ice','>',0); 117 md = checkfield(md,'fieldname','materials.rho_water','>',0); 118 md = checkfield(md,'fieldname','materials.rho_freshwater','>',0); 119 md = checkfield(md,'fieldname','materials.mu_water','>',0); 120 md = checkfield(md,'fieldname','materials.rheology_B','>',0,'universal',1,'NaN',1,'Inf',1); 121 md = checkfield(md,'fieldname','materials.rheology_n','>',0,'size',[md.mesh.numberofelements 1]); 122 md = checkfield(md,'fieldname','materials.rheology_law','values',{'None' 'BuddJacka' 'Cuffey' 'CuffeyTemperate' 'Paterson' 'Arrhenius' 'LliboutryDuval' 'NyeCO2' 'NyeH2O'}); 123 md = checkfield(md,'fieldname','materials.effectiveconductivity_averaging','numel',[1],'values',[0 1 2]); 124 end 125 126 if ismember('GiaAnalysis',analyses), 127 md = checkfield(md,'fieldname','materials.lithosphere_shear_modulus','>',0,'numel',1); 128 md = checkfield(md,'fieldname','materials.lithosphere_density','>',0,'numel',1); 129 md = checkfield(md,'fieldname','materials.mantle_shear_modulus','>',0,'numel',1); 130 md = checkfield(md,'fieldname','materials.mantle_density','>',0,'numel',1); 131 end 132 if ismember('SealevelchangeAnalysis',analyses), 133 md = checkfield(md,'fieldname','materials.earth_density','>',0,'numel',1); 134 end 112 md = checkfield(md,'fieldname','materials.rho_ice','>',0); 113 md = checkfield(md,'fieldname','materials.rho_water','>',0); 114 md = checkfield(md,'fieldname','materials.rho_freshwater','>',0); 115 md = checkfield(md,'fieldname','materials.mu_water','>',0); 116 md = checkfield(md,'fieldname','materials.rheology_B','>',0,'universal',1,'NaN',1,'Inf',1); 117 md = checkfield(md,'fieldname','materials.rheology_n','>',0,'universal',1,'NaN',1,'Inf',1); 118 md = checkfield(md,'fieldname','materials.rheology_law','values',{'None' 'BuddJacka' 'Cuffey' 'CuffeyTemperate' 'Paterson' 'Arrhenius' 'LliboutryDuval' 'NyeCO2' 'NyeH2O'}); 119 md = checkfield(md,'fieldname','materials.effectiveconductivity_averaging','numel',[1],'values',[0 1 2]); 135 120 136 121 end % }}} … … 154 139 fielddisplay(self,'rheology_n','Glen''s flow law exponent'); 155 140 fielddisplay(self,'rheology_law',['law for the temperature dependance of the rheology: ''None'', ''BuddJacka'', Cuffey'', ''CuffeyTemperate'', ''Paterson'', ''Arrhenius'', ''LliboutryDuval'', ''NyeH2O'', or ''NyeCO2''']); 156 fielddisplay(self,'lithosphere_shear_modulus','Lithosphere shear modulus [Pa]');157 fielddisplay(self,'lithosphere_density','Lithosphere density [g/cm^-3]');158 fielddisplay(self,'mantle_shear_modulus','Mantle shear modulus [Pa]');159 fielddisplay(self,'mantle_density','Mantle density [g/cm^-3]');160 141 fielddisplay(self,'earth_density','Mantle density [kg/m^-3]'); 161 142 end % }}} … … 183 164 WriteData(fid,prefix,'object',self,'class','materials','fieldname','rheology_n','format','DoubleMat','mattype',2); 184 165 WriteData(fid,prefix,'data',self.rheology_law,'name','md.materials.rheology_law','format','String'); 185 WriteData(fid,prefix,'object',self,'class','materials','fieldname','lithosphere_shear_modulus','format','Double');186 WriteData(fid,prefix,'object',self,'class','materials','fieldname','lithosphere_density','format','Double','scale',10^3);187 WriteData(fid,prefix,'object',self,'class','materials','fieldname','mantle_shear_modulus','format','Double');188 WriteData(fid,prefix,'object',self,'class','materials','fieldname','mantle_density','format','Double','scale',10^3);189 166 WriteData(fid,prefix,'object',self,'class','materials','fieldname','earth_density','format','Double'); 190 167 end % }}} … … 208 185 writejs1Darray(fid,[modelname '.materials.rheology_n'],self.rheology_n); 209 186 writejsstring(fid,[modelname '.materials.rheology_law'],self.rheology_law); 210 writejsdouble(fid,[modelname '.materials.lithosphere_shear_modulus'],self.lithosphere_shear_modulus);211 writejsdouble(fid,[modelname '.materials.lithosphere_density'],self.lithosphere_density);212 writejsdouble(fid,[modelname '.materials.mantle_shear_modulus'],self.mantle_shear_modulus);213 writejsdouble(fid,[modelname '.materials.mantle_density'],self.mantle_density);214 187 writejsdouble(fid,[modelname '.materials.earth_density'],self.earth_density); 215 188 -
issm/trunk-jpl/src/m/classes/model.m
r25996 r26047 43 43 frontalforcings = 0; 44 44 love = 0; 45 gia = 0;46 45 esa = 0; 47 46 sampling = 0; … … 241 240 md.calving = calving(); 242 241 md.frontalforcings = frontalforcings(); 243 md.gia = giamme();244 242 md.love = fourierlove(); 245 243 md.esa = esa(); … … 378 376 end 379 377 380 %giaivins381 if isa(md.gia,'giaivins'),382 if ~isnan(md.gia.mantle_viscosity), md.gia.mantle_viscosity=project2d(md,md.gia.mantle_viscosity,1); end383 if ~isnan(md.gia.lithosphere_thickness), md.gia.lithosphere_thickness=project2d(md,md.gia.lithosphere_thickness,1); end384 end385 378 386 379 %elementstype … … 1506 1499 disp(sprintf('%19s: %-22s -- %s','calving' ,['[1x1 ' class(self.calving) ']'],'parameters for calving')); 1507 1500 disp(sprintf('%19s: %-22s -- %s','frontalforcings' ,['[1x1 ' class(self.frontalforcings) ']'],'parameters for frontalforcings')); 1508 disp(sprintf('%19s: %-22s -- %s','gia' ,['[1x1 ' class(self.gia) ']'],'parameters for gia solution'));1509 1501 disp(sprintf('%19s: %-22s -- %s','esa' ,['[1x1 ' class(self.esa) ']'],'parameters for elastic adjustment solution')); 1510 1502 disp(sprintf('%19s: %-22s -- %s','love' ,['[1x1 ' class(self.love) ']'],'parameters for love solution')); -
issm/trunk-jpl/src/m/classes/sealevelmodel.m
r25956 r26047 79 79 end 80 80 end 81 82 %make sure grd is the same everywhere: 83 for i=1:length(slm.icecaps), 84 md= slm.icecaps{i}; 85 if md.solidearthsettings.isgrd~=slm.earth.solidearthsettings.isgrd), 86 error(sprintf('isgrd on ice cap %s is not the same as for the earth\n',md.miscellaneous.name)); 87 end 88 end 89 %make sure that there is no solid earth external forcing on the basins: 90 for i=1:length(slm.icecaps), 91 md= slm.icecaps{i}; 92 if ~isempty(md.solidearth.external), 93 error(sprintf('cannot run external forcings on an ice sheet when runing a coupling earth/ice sheet model'); 94 end 95 96 end 97 %make sure that we have the rigth grd model for computing ouf sealevel patterns: 98 for i=1:length(slm.icecaps), 99 md= slm.icecaps{i}; 100 if md.solidearth.settings.grdmodel~=0 101 error(sprintf('sealevelmodel checkconsistenty error message: ice sheets do not run GRD module, specify solidearth.settings.grdmodel=0 on ice cap %i',i)); 102 end 103 end 104 81 105 82 106 end -
issm/trunk-jpl/src/m/classes/solidearth.m
r25969 r26047 6 6 classdef solidearth 7 7 properties (SetAccess=public) 8 initialsealevel = NaN;9 8 settings = solidearthsettings(); 10 9 external = []; 11 surfaceload = surfaceload();12 10 lovenumbers = lovenumbers(); 13 11 rotational = rotational(); … … 71 69 end 72 70 73 md = checkfield(md,'fieldname','solidearth.initialsealevel','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]);74 71 md = checkfield(md,'fieldname','solidearth.requested_outputs','stringrow',1); 75 72 76 73 self.settings.checkconsistency(md,solution,analyses); 77 self.surfaceload.checkconsistency(md,solution,analyses);78 74 self.lovenumbers.checkconsistency(md,solution,analyses); 79 75 self.rotational.checkconsistency(md,solution,analyses); … … 93 89 disp(sprintf(' solidearth inputs, forcings and settings:')); 94 90 95 fielddisplay(self,'initialsealevel','sea level at the start of computation [m]');96 91 fielddisplay(self,'planetradius','planet radius [m]'); 97 92 fielddisplay(self,'transitions','indices into parts of the mesh that will be icecaps'); … … 101 96 if isempty(self.external), fielddisplay(self,'external','external solution, of the type solidearthsolution'); end 102 97 self.settings.disp(); 103 self.surfaceload.disp();104 98 self.lovenumbers.disp(); 105 99 self.rotational.disp(); … … 111 105 function marshall(self,prefix,md,fid) % {{{ 112 106 113 WriteData(fid,prefix,'object',self,'fieldname','initialsealevel','mattype',1,'format','DoubleMat','timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);114 107 WriteData(fid,prefix,'object',self,'fieldname','planetradius','format','Double'); 115 108 WriteData(fid,prefix,'object',self,'fieldname','transitions','format','MatArray'); … … 133 126 134 127 self.settings.marshall(prefix,md,fid); 135 self.surfaceload.marshall(prefix,md,fid);136 128 self.lovenumbers.marshall(prefix,md,fid); 137 129 self.rotational.marshall(prefix,md,fid); … … 155 147 function savemodeljs(self,fid,modelname) % {{{ 156 148 157 writejs1Darray(fid,[modelname '.solidearth.initialsealevel'],self.initialsealevel);158 149 self.settings.savemodeljs(fid,modelname); 159 self.surfaceload.savemodeljs(fid,modelname);160 150 self.lovenumbers.savemodeljs(fid,modelname); 161 151 self.rotational.savemodeljs(fid,modelname); … … 168 158 end % }}} 169 159 function self = extrude(self,md) % {{{ 170 self.initialsealevel=project3d(md,'vector',self.initialsealevel,'type','node');171 160 end % }}} 172 161 end -
issm/trunk-jpl/src/m/classes/solidearthsettings.m
r25956 r26047 16 16 computesealevelchange = 1; %will sea-level be coputed? 17 17 isgrd = 1; %will GRD patterns be computed? 18 compute_bp_grd = 1; %will GRD patterns for bottomo pressures be computed? 18 19 degacc = 0; %degree increment for resolution of Green tables 19 20 horiz = 0; %compute horizontal deformation 20 21 glfraction = 1; %barystatic contribution full or fractional (default fractional) 22 grdmodel = 0; %grd model (0 by default, 1 for elastic, 2 for Ivins) 23 cross_section_shape = 0; %cross section only used when grd model is Ivins 21 24 end 22 25 methods … … 43 46 self.rotation=1; 44 47 self.ocean_area_scaling=0; 45 self.isgrd=1; 48 self.compute_bp_grd=1; 49 self.isgrd=0; 46 50 self.computesealevelchange=1; 47 51 … … 57 61 %horizontal displacement? (not by default) 58 62 self.horiz=0; 63 64 %cross section for Ivins model 65 self.cross_section_shape=1; %square as default (see iedge in GiaDeflectionCorex) 66 67 %no grd model by default: 68 self.grdmodel=0; 69 59 70 end % }}} 60 71 function md = checkconsistency(self,md,solution,analyses) % {{{ … … 70 81 md = checkfield(md,'fieldname','solidearth.settings.horiz','NaN',1,'Inf',1,'values',[0 1]); 71 82 md = checkfield(md,'fieldname','solidearth.settings.glfraction','values',[0 1]); 83 md = checkfield(md,'fieldname','solidearth.settings.grdmodel','values',[1 2]); 84 md = checkfield(md,'fieldname','solidearth.settings.cross_section_shape','numel',[1],'values',[1,2]); 72 85 73 86 %checks on computational flags … … 76 89 end 77 90 78 %a coupler to a planet model is provided.91 %a GRD computation has been requested, makes somes checks on the nature of the meshes provided. 79 92 if self.isgrd, 80 if md.transient.iscoupler, 81 %we are good; 93 if strcmpi(class(md.mesh),'mesh3dsurface'), 94 if self.grdmodel==2, 95 error('model requires a 2D mesh to run gia Ivins computations (change mesh from mesh3dsurface to mesh2d)'); 96 end 82 97 else 83 if strcmpi(class(md.mesh),'mesh3dsurface'), 84 %we are good 85 else 86 error('model is requesting sealevel computations without being a mesh3dsurface, or being coupled to one!'); 98 if self.grdmodel==1, 99 error('model requires a 3D surface mesh to run GRD computations ( change mesh from mesh2d to mesh3dsurface)'); 87 100 end 88 101 end 89 102 end 103 104 if self.compute_bp_grd==1 & md.solidearth.settings.isgrd==0, 105 error('solidearthsettings checkconsistency error message; if bottom pressure grd patterns are requested, solidearth settings class should have isgrd flag on'); 106 end 107 90 108 91 109 end % }}} … … 99 117 fielddisplay(self,'computesealevelchange','compute sealevel change (default 1)'); 100 118 fielddisplay(self,'isgrd','compute GRD patterns (default 1)'); 119 fielddisplay(self,'compute_bp_grd','compute GRD patterns for bottom pressure loads (default 1)'); 101 120 fielddisplay(self,'runfrequency','how many time steps we skip before we run solidearthsettings solver during transient (default: 1)'); 102 121 fielddisplay(self,'rigid','rigid earth graviational potential perturbation'); … … 105 124 fielddisplay(self,'degacc','accuracy (default .01 deg) for numerical discretization of the Green''s functions'); 106 125 fielddisplay(self,'glfraction','contribute fractionally (default, 1) to barystatic sea level'); 126 fielddisplay(self,'grdmodel','type of deformation model, 1 for elastic, 2 for visco-elastic from Ivins'); 127 fielddisplay(self,'cross_section_shape','1: square-edged (default). 2: elliptical. See iedge in GiaDeflectionCore'); 107 128 end % }}} 108 129 function marshall(self,prefix,md,fid) % {{{ … … 119 140 WriteData(fid,prefix,'object',self,'fieldname','computesealevelchange','name','md.solidearth.settings.computesealevelchange','format','Integer'); 120 141 WriteData(fid,prefix,'object',self,'fieldname','isgrd','name','md.solidearth.settings.isgrd','format','Integer'); 142 WriteData(fid,prefix,'object',self,'fieldname','compute_bp_grd','name','md.solidearth.settings.compute_bp_grd','format','Integer'); 121 143 WriteData(fid,prefix,'object',self,'fieldname','glfraction','name','md.solidearth.settings.glfraction','format','Integer'); 144 WriteData(fid,prefix,'object',self,'fieldname','grdmodel','name','md.solidearth.settings.grdmodel','format','Integer'); 145 WriteData(fid,prefix,'object',self,'fieldname','cross_section_shape','name','md.solidearth.settings.cross_section_shape','format','Integer'); 122 146 end % }}} 123 147 function savemodeljs(self,fid,modelname) % {{{ … … 133 157 writejsdouble(fid,[modelname '.solidearth.settings.degacc'],self.degacc); 134 158 writejsdouble(fid,[modelname '.solidearth.settings.glfraction'],self.glfraction); 159 writejsdouble(fid,[modelname '.solidearth.settings.cross_section_shape'],self.cross_section_shape); 135 160 end % }}} 136 161 function self = extrude(self,md) % {{{ -
issm/trunk-jpl/src/m/classes/transient.m
r26009 r26047 8 8 issmb = 0; 9 9 ismasstransport = 0; 10 isoceantransport = 0; 10 11 isstressbalance = 0; 11 12 isthermal = 0; 12 13 isgroundingline = 0; 13 isgia = 0;14 14 isesa = 0; 15 15 isdamageevolution = 0; … … 18 18 issampling = 0; 19 19 isslc = 0; 20 iscoupler = 0;21 20 amr_frequency = 0; 22 21 isoceancoupling = 0; … … 37 36 self.issmb = 0; 38 37 self.ismasstransport = 0; 38 self.isoceantransport= 0; 39 39 self.isstressbalance = 0; 40 40 self.isthermal = 0; 41 41 self.isgroundingline = 0; 42 self.isgia = 0;43 42 self.isesa = 0; 44 43 self.isdamageevolution = 0; … … 48 47 self.isslc = 0; 49 48 self.isoceancoupling = 0; 50 self.iscoupler = 0;51 49 self.amr_frequency = 0; 52 50 … … 59 57 self.issmb = 1; 60 58 self.ismasstransport = 1; 59 self.isoceantransport = 0; 61 60 self.isstressbalance = 1; 62 61 self.isthermal = 1; 63 62 self.isgroundingline = 0; 64 self.isgia = 0;65 63 self.isesa = 0; 66 64 self.isdamageevolution = 0; … … 70 68 self.isslc = 0; 71 69 self.isoceancoupling = 0; 72 self.iscoupler = 0;73 70 self.amr_frequency = 0; 74 71 … … 90 87 md = checkfield(md,'fieldname','transient.issmb','numel',[1],'values',[0 1]); 91 88 md = checkfield(md,'fieldname','transient.ismasstransport','numel',[1],'values',[0 1]); 89 md = checkfield(md,'fieldname','transient.isoceantransport','numel',[1],'values',[0 1]); 92 90 md = checkfield(md,'fieldname','transient.isstressbalance','numel',[1],'values',[0 1]); 93 91 md = checkfield(md,'fieldname','transient.isthermal','numel',[1],'values',[0 1]); 94 92 md = checkfield(md,'fieldname','transient.isgroundingline','numel',[1],'values',[0 1]); 95 md = checkfield(md,'fieldname','transient.isgia','numel',[1],'values',[0 1]);96 93 md = checkfield(md,'fieldname','transient.isesa','numel',[1],'values',[0 1]); 97 94 md = checkfield(md,'fieldname','transient.isdamageevolution','numel',[1],'values',[0 1]); … … 101 98 md = checkfield(md,'fieldname','transient.isslc','numel',[1],'values',[0 1]); 102 99 md = checkfield(md,'fieldname','transient.isoceancoupling','numel',[1],'values',[0 1]); 103 md = checkfield(md,'fieldname','transient.iscoupler','numel',[1],'values',[0 1]);104 100 md = checkfield(md,'fieldname','transient.issampling','numel',[1],'values',[0 1]); 105 101 md = checkfield(md,'fieldname','transient.amr_frequency','numel',[1],'>=',0,'NaN',1,'Inf',1); … … 117 113 fielddisplay(self,'issmb','indicates whether a surface mass balance solution is used in the transient'); 118 114 fielddisplay(self,'ismasstransport','indicates whether a masstransport solution is used in the transient'); 115 fielddisplay(self,'isoceantransport','indicates whether an ocean masstransport solution is used in the transient'); 119 116 fielddisplay(self,'isstressbalance','indicates whether a stressbalance solution is used in the transient'); 120 117 fielddisplay(self,'isthermal','indicates whether a thermal solution is used in the transient'); 121 118 fielddisplay(self,'isgroundingline','indicates whether a groundingline migration is used in the transient'); 122 fielddisplay(self,'isgia','indicates whether a postglacial rebound model is used in the transient');123 119 fielddisplay(self,'isesa','indicates whether an elastic adjustment model is used in the transient'); 124 120 fielddisplay(self,'isdamageevolution','indicates whether damage evolution is used in the transient'); … … 128 124 fielddisplay(self,'isslc','indicates whether a sea-level change solution is used in the transient'); 129 125 fielddisplay(self,'isoceancoupling','indicates whether a coupling with an ocean model is used in the transient'); 130 fielddisplay(self,'iscoupler','indicates whether different models are being run with need for coupling');131 126 fielddisplay(self,'amr_frequency','frequency at which mesh is refined in simulations with multiple time_steps'); 132 127 fielddisplay(self,'requested_outputs','list of additional outputs requested'); … … 136 131 WriteData(fid,prefix,'object',self,'fieldname','issmb','format','Boolean'); 137 132 WriteData(fid,prefix,'object',self,'fieldname','ismasstransport','format','Boolean'); 133 WriteData(fid,prefix,'object',self,'fieldname','isoceantransport','format','Boolean'); 138 134 WriteData(fid,prefix,'object',self,'fieldname','isstressbalance','format','Boolean'); 139 135 WriteData(fid,prefix,'object',self,'fieldname','isthermal','format','Boolean'); 140 136 WriteData(fid,prefix,'object',self,'fieldname','isgroundingline','format','Boolean'); 141 WriteData(fid,prefix,'object',self,'fieldname','isgia','format','Boolean');142 137 WriteData(fid,prefix,'object',self,'fieldname','isesa','format','Boolean'); 143 138 WriteData(fid,prefix,'object',self,'fieldname','isdamageevolution','format','Boolean'); … … 147 142 WriteData(fid,prefix,'object',self,'fieldname','isslc','format','Boolean'); 148 143 WriteData(fid,prefix,'object',self,'fieldname','isoceancoupling','format','Boolean'); 149 WriteData(fid,prefix,'object',self,'fieldname','iscoupler','format','Boolean');150 144 WriteData(fid,prefix,'object',self,'fieldname','amr_frequency','format','Integer'); 151 145 … … 163 157 writejsdouble(fid,[modelname '.trans.issmb'],self.issmb); 164 158 writejsdouble(fid,[modelname '.trans.ismasstransport'],self.ismasstransport); 159 writejsdouble(fid,[modelname '.trans.isoceantransport'],self.isoceantransport); 165 160 writejsdouble(fid,[modelname '.trans.isstressbalance'],self.isstressbalance); 166 161 writejsdouble(fid,[modelname '.trans.isthermal'],self.isthermal); 167 162 writejsdouble(fid,[modelname '.trans.isgroundingline'],self.isgroundingline); 168 writejsdouble(fid,[modelname '.trans.isgia'],self.isgia);169 163 writejsdouble(fid,[modelname '.trans.isesa'],self.isesa); 170 164 writejsdouble(fid,[modelname '.trans.isdamageevolution'],self.isdamageevolution); … … 174 168 writejsdouble(fid,[modelname '.trans.isslc'],self.isslc); 175 169 writejsdouble(fid,[modelname '.trans.isoceancoupling'],self.isoceancoupling); 176 writejsdouble(fid,[modelname '.trans.iscoupler'],self.iscoupler);177 170 writejsdouble(fid,[modelname '.trans.amr_frequency'],self.amr_frequency); 178 171 writejscellstring(fid,[modelname '.trans.requested_outputs'],self.requested_outputs); -
issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.m
r25996 r26047 52 52 elseif strcmp(solutiontype,'MasstransportSolution') 53 53 analyses={'MasstransportAnalysis'}; 54 elseif strcmp(solutiontype,'OceantransportSolution') 55 analyses={'OceantransportAnalysis'}; 54 56 elseif strcmp(solutiontype,'BalancethicknessSolution') 55 57 analyses={'BalancethicknessAnalysis'}; … … 71 73 analyses={'EsaAnalysis'}; 72 74 elseif strcmp(solutiontype,'TransientSolution') 73 analyses={'StressbalanceAnalysis','StressbalanceVerticalAnalysis','StressbalanceSIAAnalysis','L2ProjectionBaseAnalysis','ThermalAnalysis','MeltingAnalysis','EnthalpyAnalysis','MasstransportAnalysis',' HydrologyShaktiAnalysis','HydrologyGladsAnalysis','HydrologyDCInefficientAnalysis','HydrologyDCEfficientAnalysis','SealevelchangeAnalysis'};75 analyses={'StressbalanceAnalysis','StressbalanceVerticalAnalysis','StressbalanceSIAAnalysis','L2ProjectionBaseAnalysis','ThermalAnalysis','MeltingAnalysis','EnthalpyAnalysis','MasstransportAnalysis','OceantransportAnalysis','HydrologyShaktiAnalysis','HydrologyGladsAnalysis','HydrologyShreveAnalysis','HydrologyTwsAnalysis','HydrologyDCInefficientAnalysis','HydrologyDCEfficientAnalysis','SealevelchangeAnalysis'}; 74 76 elseif strcmp(solutiontype,'SealevelchangeSolution') 75 77 analyses={'SealevelchangeAnalysis'}; 76 78 elseif strcmp(solutiontype,'HydrologySolution') 77 analyses={'L2ProjectionBaseAnalysis','HydrologyShreveAnalysis','HydrologyDCInefficientAnalysis','HydrologyDCEfficientAnalysis' };79 analyses={'L2ProjectionBaseAnalysis','HydrologyShreveAnalysis','HydrologyDCInefficientAnalysis','HydrologyDCEfficientAnalysis','HydrologyGladsAnalysis','HydrologyShaktiAnalysis','HydrologyTwsAnalysis'}; 78 80 elseif strcmp(solutiontype,'DamageEvolutionSolution') 79 81 analyses={'DamageEvolutionAnalysis'}; -
issm/trunk-jpl/src/m/dev/devpath.m
r26034 r26047 28 28 addpath(recursivepath([ISSM_DIR '/externalpackages/howatmask'])); 29 29 addpath(recursivepath([ISSM_DIR '/externalpackages/dem'])); 30 addpath(recursivepath([ISSM_DIR '/externalpackages/ mealpix']));30 addpath(recursivepath([ISSM_DIR '/externalpackages/pcatool'])); 31 31 clear ISSM_DIR; 32 32 -
issm/trunk-jpl/src/m/plot/radarpower.m
r25236 r26047 46 46 paths = {'/u/astrid-r1b/ModelData/MOG/mog100_r2_hp1.tif','/home/ModelData/Greenland/MOG/mog100_r2_hp1.tif'}; 47 47 else 48 paths = {'/u/astrid-r1b/ModelData/MOG/mog500_r2_hp1.tif','/home/ModelData/Greenland/MOG/mog500_r2_hp1.tif' };48 paths = {'/u/astrid-r1b/ModelData/MOG/mog500_r2_hp1.tif','/home/ModelData/Greenland/MOG/mog500_r2_hp1.tif','/Users/larour/ModelData/MOG/mog500_r2_hp1.tif'}; 49 49 end 50 50 else -
issm/trunk-jpl/src/m/solve/solve.m
r26004 r26047 10 10 % - 'Stressbalance' or 'sb' 11 11 % - 'Masstransport' or 'mt' 12 % - 'Oceantransport' or 'oceant' 12 13 % - 'Thermal' or 'th' 13 14 % - 'Steadystate' or 'ss' … … 22 23 % - 'Love' or 'lv' 23 24 % - 'Esa' or 'esa' 24 % - 'Sealevelchange' or 'slc'25 25 % - 'Sampling' or 'smp' 26 26 % … … 46 46 elseif strcmpi(solutionstring,'mt') || strcmpi(solutionstring,'Masstransport') 47 47 solutionstring = 'MasstransportSolution'; 48 elseif strcmpi(solutionstring,'oceanmt') || strcmpi(solutionstring,'Oceantransport') 49 solutionstring = 'OceantransportSolution'; 48 50 elseif strcmpi(solutionstring,'th') || strcmpi(solutionstring,'Thermal') 49 51 solutionstring = 'ThermalSolution'; … … 74 76 elseif strcmpi(solutionstring,'esa') || strcmpi(solutionstring,'Esa') 75 77 solutionstring = 'EsaSolution'; 76 elseif strcmpi(solutionstring,'slc') || strcmpi(solutionstring,'Sealevelchange')77 solutionstring = 'SealevelchangeSolution';78 78 elseif strcmpi(solutionstring,'smp') || strcmpi(solutionstring,'Sampling') 79 79 solutionstring = 'SamplingSolution'; -
issm/trunk-jpl/src/m/solve/solveslm.m
r25956 r26047 7 7 % 8 8 % solution types available comprise: 9 % - 'Sealevelchange'10 9 % - 'Transient' 11 10 % … … 18 17 if strcmpi(solutionstringi,'tr') || strcmpi(solutionstringi,'Transient') 19 18 solutionstring = 'TransientSolution'; 20 elseif strcmpi(solutionstringi,'slr') || strcmpi(solutionstringi,'Sealevelchange')21 solutionstring = 'SealevelchangeSolution';22 19 else 23 20 error(['solutionstring ' solutionstringi ' not supported!']); -
issm/trunk-jpl/test/NightlyRun/test2001.m
r25131 r26047 5 5 md=parameterize(md,'../Par/SquareSheetConstrained.par'); 6 6 7 %GIA: 8 md.gia=giaivins(); 9 md.gia.lithosphere_thickness=100.*ones(md.mesh.numberofvertices,1); % in km 10 md.gia.mantle_viscosity=1.0*10^21*ones(md.mesh.numberofvertices,1); % in Pa.s 11 md.materials.lithosphere_shear_modulus=6.7*10^10; % in Pa 12 md.materials.lithosphere_density=3.32; % in g/cm^-3 13 md.materials.mantle_shear_modulus=1.45*10^11; % in Pa 14 md.materials.mantle_density=3.34; % in g/cm^-3 7 %GIA Ivins, 2 layer model. 8 md.solidearth.settings.grdmodel=2; 15 9 16 %% indicate what you want to compute 17 md.gia.cross_section_shape=1; % for square-edged x-section 10 md.materials=materials('litho','ice'); 11 md.materials.numlayers=2; 12 md.materials.radius = [10 6271e3 6371e3]; 13 md.materials.density= [3.34e3 3.32e3]; 14 md.materials.lame_mu= [1.45e11 6.7e10]; 15 md.materials.viscosity=[1e21 0]; 16 md.initialization.sealevel=zeros(md.mesh.numberofvertices,1); 17 md.solidearth.settings.cross_section_shape=1; % for square-edged x-section 18 md.solidearth.settings.computesealevelchange=0; %do not compute sea level, only deformation 19 md.solidearth.requested_outputs={'Sealevel','SealevelUGrd'}; 18 20 19 %% define loading history 20 md.timestepping.start_time=2400000; %2,400 kyr :: EVALUATION TIME 21 %Loading history 22 md.timestepping.start_time=-2400000; %4,800 kyr :: EVALUATION TIME 23 md.timestepping.time_step= 2400000; %2,400 kyr :: EVALUATION TIME 21 24 % to get rid of default final_time: make sure final_time>start_time 22 md.timestepping.final_time=2 500000; %2,500 kyr23 md. geometry.thickness=[...24 [md.geometry.thickness; 0 .0],...25 [md.geometry.thickness; md.timestepping.start_time],...25 md.timestepping.final_time=2400000; %2,500 kyr 26 md.masstransport.spcthickness=[... 27 [md.geometry.thickness; 0],... 28 [md.geometry.thickness; 2400000]... 26 29 ]; 27 30 28 %% solve for GIA deflection 29 md.cluster=generic('name',oshostname(),'np',3); 30 md.verbose=verbose('1111111'); 31 md=solve(md,'Gia'); 31 %geometry at 0 initially: 32 md.geometry.thickness=zeros(md.mesh.numberofvertices,1); 33 md.geometry.surface=zeros(md.mesh.numberofvertices,1); 34 md.geometry.base=zeros(md.mesh.numberofvertices,1); 35 36 %Physics: 37 md.transient.issmb=0; 38 md.transient.isstressbalance=0; 39 md.transient.isthermal=0; 40 md.transient.ismasstransport=1; 41 md.transient.isslc=1; 42 43 % Solve for GIA deflection 44 md.cluster=generic('name',oshostname(),'np',1); 45 %md.cluster=generic('name',oshostname(),'np',3); 46 md.verbose=verbose('11111111111'); 47 md.verbose.solver=0; 48 md=solve(md,'tr'); 32 49 33 50 %Fields and tolerances to track changes 34 field_names ={'UG ia','UGiaRate'};35 field_tolerances={1e-13 ,1e-13};51 field_names ={'UGrd'}; 52 field_tolerances={1e-13}; 36 53 field_values={... 37 (md.results.GiaSolution.UGia),... 38 (md.results.GiaSolution.UGiaRate),... 54 (md.results.TransientSolution(1).SealevelUGrd) 39 55 }; -
issm/trunk-jpl/test/Par/SquareSheetConstrained.par
r25070 r26047 10 10 md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin)+0.1*(hmin-hmax)*(md.mesh.x-xmin)/(xmax-xmin); 11 11 md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+20.; 12 md.geometry.bed=md.geometry.base; 12 13 md.geometry.surface=md.geometry.base+md.geometry.thickness; 13 14
Note:
See TracChangeset
for help on using the changeset viewer.