Index: /issm/trunk-jpl/m4/analyses.m4
===================================================================
--- /issm/trunk-jpl/m4/analyses.m4	(revision 23794)
+++ /issm/trunk-jpl/m4/analyses.m4	(revision 23795)
@@ -11,964 +11,520 @@
 
 dnl with-AdjointBalancethickness2{{{
-
 AC_ARG_WITH([AdjointBalancethickness2],
-
 	AS_HELP_STRING([--with-AdjointBalancethickness2 = YES], [compile with AdjointBalancethickness2 capabilities (default is yes)]),
-
 	[ADJOINTBALANCETHICKNESS2=$withval],[ADJOINTBALANCETHICKNESS2=yes])
-
 AC_MSG_CHECKING(for AdjointBalancethickness2 capability compilation)
 
-
 HAVE_ADJOINTBALANCETHICKNESS2=no 
-
 if test "x$ADJOINTBALANCETHICKNESS2" = "xyes"; then
-
 	HAVE_ADJOINTBALANCETHICKNESS2=yes
-
 	AC_DEFINE([_HAVE_ADJOINTBALANCETHICKNESS2_],[1],[with AdjointBalancethickness2 capability])
-
-fi
-
+fi
 AM_CONDITIONAL([ADJOINTBALANCETHICKNESS2], [test x$HAVE_ADJOINTBALANCETHICKNESS2 = xyes])
-
 AC_MSG_RESULT($HAVE_ADJOINTBALANCETHICKNESS2)
-
 dnl }}}
 dnl with-AdjointBalancethickness{{{
-
 AC_ARG_WITH([AdjointBalancethickness],
-
 	AS_HELP_STRING([--with-AdjointBalancethickness = YES], [compile with AdjointBalancethickness capabilities (default is yes)]),
-
 	[ADJOINTBALANCETHICKNESS=$withval],[ADJOINTBALANCETHICKNESS=yes])
-
 AC_MSG_CHECKING(for AdjointBalancethickness capability compilation)
 
-
 HAVE_ADJOINTBALANCETHICKNESS=no 
-
 if test "x$ADJOINTBALANCETHICKNESS" = "xyes"; then
-
 	HAVE_ADJOINTBALANCETHICKNESS=yes
-
 	AC_DEFINE([_HAVE_ADJOINTBALANCETHICKNESS_],[1],[with AdjointBalancethickness capability])
-
-fi
-
+fi
 AM_CONDITIONAL([ADJOINTBALANCETHICKNESS], [test x$HAVE_ADJOINTBALANCETHICKNESS = xyes])
-
 AC_MSG_RESULT($HAVE_ADJOINTBALANCETHICKNESS)
-
 dnl }}}
 dnl with-AdjointHoriz{{{
-
 AC_ARG_WITH([AdjointHoriz],
-
 	AS_HELP_STRING([--with-AdjointHoriz = YES], [compile with AdjointHoriz capabilities (default is yes)]),
-
 	[ADJOINTHORIZ=$withval],[ADJOINTHORIZ=yes])
-
 AC_MSG_CHECKING(for AdjointHoriz capability compilation)
 
-
 HAVE_ADJOINTHORIZ=no 
-
 if test "x$ADJOINTHORIZ" = "xyes"; then
-
 	HAVE_ADJOINTHORIZ=yes
-
 	AC_DEFINE([_HAVE_ADJOINTHORIZ_],[1],[with AdjointHoriz capability])
-
-fi
-
+fi
 AM_CONDITIONAL([ADJOINTHORIZ], [test x$HAVE_ADJOINTHORIZ = xyes])
-
 AC_MSG_RESULT($HAVE_ADJOINTHORIZ)
-
 dnl }}}
 dnl with-Balancethickness2{{{
-
 AC_ARG_WITH([Balancethickness2],
-
 	AS_HELP_STRING([--with-Balancethickness2 = YES], [compile with Balancethickness2 capabilities (default is yes)]),
-
 	[BALANCETHICKNESS2=$withval],[BALANCETHICKNESS2=yes])
-
 AC_MSG_CHECKING(for Balancethickness2 capability compilation)
 
-
 HAVE_BALANCETHICKNESS2=no 
-
 if test "x$BALANCETHICKNESS2" = "xyes"; then
-
 	HAVE_BALANCETHICKNESS2=yes
-
 	AC_DEFINE([_HAVE_BALANCETHICKNESS2_],[1],[with Balancethickness2 capability])
-
-fi
-
+fi
 AM_CONDITIONAL([BALANCETHICKNESS2], [test x$HAVE_BALANCETHICKNESS2 = xyes])
-
 AC_MSG_RESULT($HAVE_BALANCETHICKNESS2)
-
 dnl }}}
 dnl with-Balancethickness{{{
-
 AC_ARG_WITH([Balancethickness],
-
 	AS_HELP_STRING([--with-Balancethickness = YES], [compile with Balancethickness capabilities (default is yes)]),
-
 	[BALANCETHICKNESS=$withval],[BALANCETHICKNESS=yes])
-
 AC_MSG_CHECKING(for Balancethickness capability compilation)
 
-
 HAVE_BALANCETHICKNESS=no 
-
 if test "x$BALANCETHICKNESS" = "xyes"; then
-
 	HAVE_BALANCETHICKNESS=yes
-
 	AC_DEFINE([_HAVE_BALANCETHICKNESS_],[1],[with Balancethickness capability])
-
-fi
-
+fi
 AM_CONDITIONAL([BALANCETHICKNESS], [test x$HAVE_BALANCETHICKNESS = xyes])
-
 AC_MSG_RESULT($HAVE_BALANCETHICKNESS)
-
 dnl }}}
 dnl with-BalancethicknessSoft{{{
-
 AC_ARG_WITH([BalancethicknessSoft],
-
 	AS_HELP_STRING([--with-BalancethicknessSoft = YES], [compile with BalancethicknessSoft capabilities (default is yes)]),
-
 	[BALANCETHICKNESSSOFT=$withval],[BALANCETHICKNESSSOFT=yes])
-
 AC_MSG_CHECKING(for BalancethicknessSoft capability compilation)
 
-
 HAVE_BALANCETHICKNESSSOFT=no 
-
 if test "x$BALANCETHICKNESSSOFT" = "xyes"; then
-
 	HAVE_BALANCETHICKNESSSOFT=yes
-
 	AC_DEFINE([_HAVE_BALANCETHICKNESSSOFT_],[1],[with BalancethicknessSoft capability])
-
-fi
-
+fi
 AM_CONDITIONAL([BALANCETHICKNESSSOFT], [test x$HAVE_BALANCETHICKNESSSOFT = xyes])
-
 AC_MSG_RESULT($HAVE_BALANCETHICKNESSSOFT)
-
 dnl }}}
 dnl with-Balancevelocity{{{
-
 AC_ARG_WITH([Balancevelocity],
-
 	AS_HELP_STRING([--with-Balancevelocity = YES], [compile with Balancevelocity capabilities (default is yes)]),
-
 	[BALANCEVELOCITY=$withval],[BALANCEVELOCITY=yes])
-
 AC_MSG_CHECKING(for Balancevelocity capability compilation)
 
-
 HAVE_BALANCEVELOCITY=no 
-
 if test "x$BALANCEVELOCITY" = "xyes"; then
-
 	HAVE_BALANCEVELOCITY=yes
-
 	AC_DEFINE([_HAVE_BALANCEVELOCITY_],[1],[with Balancevelocity capability])
-
-fi
-
+fi
 AM_CONDITIONAL([BALANCEVELOCITY], [test x$HAVE_BALANCEVELOCITY = xyes])
-
 AC_MSG_RESULT($HAVE_BALANCEVELOCITY)
-
 dnl }}}
 dnl with-DamageEvolution{{{
-
 AC_ARG_WITH([DamageEvolution],
-
 	AS_HELP_STRING([--with-DamageEvolution = YES], [compile with DamageEvolution capabilities (default is yes)]),
-
 	[DAMAGEEVOLUTION=$withval],[DAMAGEEVOLUTION=yes])
-
 AC_MSG_CHECKING(for DamageEvolution capability compilation)
 
-
 HAVE_DAMAGEEVOLUTION=no 
-
 if test "x$DAMAGEEVOLUTION" = "xyes"; then
-
 	HAVE_DAMAGEEVOLUTION=yes
-
 	AC_DEFINE([_HAVE_DAMAGEEVOLUTION_],[1],[with DamageEvolution capability])
-
-fi
-
+fi
 AM_CONDITIONAL([DAMAGEEVOLUTION], [test x$HAVE_DAMAGEEVOLUTION = xyes])
-
 AC_MSG_RESULT($HAVE_DAMAGEEVOLUTION)
-
 dnl }}}
 dnl with-DepthAverage{{{
-
 AC_ARG_WITH([DepthAverage],
-
 	AS_HELP_STRING([--with-DepthAverage = YES], [compile with DepthAverage capabilities (default is yes)]),
-
 	[DEPTHAVERAGE=$withval],[DEPTHAVERAGE=yes])
-
 AC_MSG_CHECKING(for DepthAverage capability compilation)
 
-
 HAVE_DEPTHAVERAGE=no 
-
 if test "x$DEPTHAVERAGE" = "xyes"; then
-
 	HAVE_DEPTHAVERAGE=yes
-
 	AC_DEFINE([_HAVE_DEPTHAVERAGE_],[1],[with DepthAverage capability])
-
-fi
-
+fi
 AM_CONDITIONAL([DEPTHAVERAGE], [test x$HAVE_DEPTHAVERAGE = xyes])
-
 AC_MSG_RESULT($HAVE_DEPTHAVERAGE)
-
 dnl }}}
 dnl with-Enthalpy{{{
-
 AC_ARG_WITH([Enthalpy],
-
 	AS_HELP_STRING([--with-Enthalpy = YES], [compile with Enthalpy capabilities (default is yes)]),
-
 	[ENTHALPY=$withval],[ENTHALPY=yes])
-
 AC_MSG_CHECKING(for Enthalpy capability compilation)
 
-
 HAVE_ENTHALPY=no 
-
 if test "x$ENTHALPY" = "xyes"; then
-
 	HAVE_ENTHALPY=yes
-
 	AC_DEFINE([_HAVE_ENTHALPY_],[1],[with Enthalpy capability])
-
-fi
-
+fi
 AM_CONDITIONAL([ENTHALPY], [test x$HAVE_ENTHALPY = xyes])
-
 AC_MSG_RESULT($HAVE_ENTHALPY)
-
 dnl }}}
 dnl with-Esa{{{
-
 AC_ARG_WITH([Esa],
-
 	AS_HELP_STRING([--with-Esa = YES], [compile with Esa capabilities (default is yes)]),
-
 	[ESA=$withval],[ESA=yes])
-
 AC_MSG_CHECKING(for Esa capability compilation)
 
-
 HAVE_ESA=no 
-
 if test "x$ESA" = "xyes"; then
-
 	HAVE_ESA=yes
-
 	AC_DEFINE([_HAVE_ESA_],[1],[with Esa capability])
-
-fi
-
+fi
 AM_CONDITIONAL([ESA], [test x$HAVE_ESA = xyes])
-
 AC_MSG_RESULT($HAVE_ESA)
-
 dnl }}}
 dnl with-Extrapolation{{{
-
 AC_ARG_WITH([Extrapolation],
-
 	AS_HELP_STRING([--with-Extrapolation = YES], [compile with Extrapolation capabilities (default is yes)]),
-
 	[EXTRAPOLATION=$withval],[EXTRAPOLATION=yes])
-
 AC_MSG_CHECKING(for Extrapolation capability compilation)
 
-
 HAVE_EXTRAPOLATION=no 
-
 if test "x$EXTRAPOLATION" = "xyes"; then
-
 	HAVE_EXTRAPOLATION=yes
-
 	AC_DEFINE([_HAVE_EXTRAPOLATION_],[1],[with Extrapolation capability])
-
-fi
-
+fi
 AM_CONDITIONAL([EXTRAPOLATION], [test x$HAVE_EXTRAPOLATION = xyes])
-
 AC_MSG_RESULT($HAVE_EXTRAPOLATION)
-
 dnl }}}
 dnl with-ExtrudeFromBase{{{
-
 AC_ARG_WITH([ExtrudeFromBase],
-
 	AS_HELP_STRING([--with-ExtrudeFromBase = YES], [compile with ExtrudeFromBase capabilities (default is yes)]),
-
 	[EXTRUDEFROMBASE=$withval],[EXTRUDEFROMBASE=yes])
-
 AC_MSG_CHECKING(for ExtrudeFromBase capability compilation)
 
-
 HAVE_EXTRUDEFROMBASE=no 
-
 if test "x$EXTRUDEFROMBASE" = "xyes"; then
-
 	HAVE_EXTRUDEFROMBASE=yes
-
 	AC_DEFINE([_HAVE_EXTRUDEFROMBASE_],[1],[with ExtrudeFromBase capability])
-
-fi
-
+fi
 AM_CONDITIONAL([EXTRUDEFROMBASE], [test x$HAVE_EXTRUDEFROMBASE = xyes])
-
 AC_MSG_RESULT($HAVE_EXTRUDEFROMBASE)
-
 dnl }}}
 dnl with-ExtrudeFromTop{{{
-
 AC_ARG_WITH([ExtrudeFromTop],
-
 	AS_HELP_STRING([--with-ExtrudeFromTop = YES], [compile with ExtrudeFromTop capabilities (default is yes)]),
-
 	[EXTRUDEFROMTOP=$withval],[EXTRUDEFROMTOP=yes])
-
 AC_MSG_CHECKING(for ExtrudeFromTop capability compilation)
 
-
 HAVE_EXTRUDEFROMTOP=no 
-
 if test "x$EXTRUDEFROMTOP" = "xyes"; then
-
 	HAVE_EXTRUDEFROMTOP=yes
-
 	AC_DEFINE([_HAVE_EXTRUDEFROMTOP_],[1],[with ExtrudeFromTop capability])
-
-fi
-
+fi
 AM_CONDITIONAL([EXTRUDEFROMTOP], [test x$HAVE_EXTRUDEFROMTOP = xyes])
-
 AC_MSG_RESULT($HAVE_EXTRUDEFROMTOP)
-
 dnl }}}
 dnl with-FreeSurfaceBase{{{
-
 AC_ARG_WITH([FreeSurfaceBase],
-
 	AS_HELP_STRING([--with-FreeSurfaceBase = YES], [compile with FreeSurfaceBase capabilities (default is yes)]),
-
 	[FREESURFACEBASE=$withval],[FREESURFACEBASE=yes])
-
 AC_MSG_CHECKING(for FreeSurfaceBase capability compilation)
 
-
 HAVE_FREESURFACEBASE=no 
-
 if test "x$FREESURFACEBASE" = "xyes"; then
-
 	HAVE_FREESURFACEBASE=yes
-
 	AC_DEFINE([_HAVE_FREESURFACEBASE_],[1],[with FreeSurfaceBase capability])
-
-fi
-
+fi
 AM_CONDITIONAL([FREESURFACEBASE], [test x$HAVE_FREESURFACEBASE = xyes])
-
 AC_MSG_RESULT($HAVE_FREESURFACEBASE)
-
 dnl }}}
 dnl with-FreeSurfaceTop{{{
-
 AC_ARG_WITH([FreeSurfaceTop],
-
 	AS_HELP_STRING([--with-FreeSurfaceTop = YES], [compile with FreeSurfaceTop capabilities (default is yes)]),
-
 	[FREESURFACETOP=$withval],[FREESURFACETOP=yes])
-
 AC_MSG_CHECKING(for FreeSurfaceTop capability compilation)
 
-
 HAVE_FREESURFACETOP=no 
-
 if test "x$FREESURFACETOP" = "xyes"; then
-
 	HAVE_FREESURFACETOP=yes
-
 	AC_DEFINE([_HAVE_FREESURFACETOP_],[1],[with FreeSurfaceTop capability])
-
-fi
-
+fi
 AM_CONDITIONAL([FREESURFACETOP], [test x$HAVE_FREESURFACETOP = xyes])
-
 AC_MSG_RESULT($HAVE_FREESURFACETOP)
-
 dnl }}}
 dnl with-GLheightadvection{{{
-
 AC_ARG_WITH([GLheightadvection],
-
 	AS_HELP_STRING([--with-GLheightadvection = YES], [compile with GLheightadvection capabilities (default is yes)]),
-
 	[GLHEIGHTADVECTION=$withval],[GLHEIGHTADVECTION=yes])
-
 AC_MSG_CHECKING(for GLheightadvection capability compilation)
 
-
 HAVE_GLHEIGHTADVECTION=no 
-
 if test "x$GLHEIGHTADVECTION" = "xyes"; then
-
 	HAVE_GLHEIGHTADVECTION=yes
-
 	AC_DEFINE([_HAVE_GLHEIGHTADVECTION_],[1],[with GLheightadvection capability])
-
-fi
-
+fi
 AM_CONDITIONAL([GLHEIGHTADVECTION], [test x$HAVE_GLHEIGHTADVECTION = xyes])
-
 AC_MSG_RESULT($HAVE_GLHEIGHTADVECTION)
-
 dnl }}}
 dnl with-GiaIvins{{{
-
 AC_ARG_WITH([GiaIvins],
-
 	AS_HELP_STRING([--with-GiaIvins = YES], [compile with GiaIvins capabilities (default is yes)]),
-
 	[GIAIVINS=$withval],[GIAIVINS=yes])
-
 AC_MSG_CHECKING(for GiaIvins capability compilation)
 
-
 HAVE_GIAIVINS=no 
-
 if test "x$GIAIVINS" = "xyes"; then
-
 	HAVE_GIAIVINS=yes
-
 	AC_DEFINE([_HAVE_GIAIVINS_],[1],[with GiaIvins capability])
-
-fi
-
+fi
 AM_CONDITIONAL([GIAIVINS], [test x$HAVE_GIAIVINS = xyes])
-
 AC_MSG_RESULT($HAVE_GIAIVINS)
-
 dnl }}}
 dnl with-HydrologyDCEfficient{{{
-
 AC_ARG_WITH([HydrologyDCEfficient],
-
 	AS_HELP_STRING([--with-HydrologyDCEfficient = YES], [compile with HydrologyDCEfficient capabilities (default is yes)]),
-
 	[HYDROLOGYDCEFFICIENT=$withval],[HYDROLOGYDCEFFICIENT=yes])
-
 AC_MSG_CHECKING(for HydrologyDCEfficient capability compilation)
 
-
 HAVE_HYDROLOGYDCEFFICIENT=no 
-
 if test "x$HYDROLOGYDCEFFICIENT" = "xyes"; then
-
 	HAVE_HYDROLOGYDCEFFICIENT=yes
-
 	AC_DEFINE([_HAVE_HYDROLOGYDCEFFICIENT_],[1],[with HydrologyDCEfficient capability])
-
-fi
-
+fi
 AM_CONDITIONAL([HYDROLOGYDCEFFICIENT], [test x$HAVE_HYDROLOGYDCEFFICIENT = xyes])
-
 AC_MSG_RESULT($HAVE_HYDROLOGYDCEFFICIENT)
-
 dnl }}}
 dnl with-HydrologyDCInefficient{{{
-
 AC_ARG_WITH([HydrologyDCInefficient],
-
 	AS_HELP_STRING([--with-HydrologyDCInefficient = YES], [compile with HydrologyDCInefficient capabilities (default is yes)]),
-
 	[HYDROLOGYDCINEFFICIENT=$withval],[HYDROLOGYDCINEFFICIENT=yes])
-
 AC_MSG_CHECKING(for HydrologyDCInefficient capability compilation)
 
-
 HAVE_HYDROLOGYDCINEFFICIENT=no 
-
 if test "x$HYDROLOGYDCINEFFICIENT" = "xyes"; then
-
 	HAVE_HYDROLOGYDCINEFFICIENT=yes
-
 	AC_DEFINE([_HAVE_HYDROLOGYDCINEFFICIENT_],[1],[with HydrologyDCInefficient capability])
-
-fi
-
+fi
 AM_CONDITIONAL([HYDROLOGYDCINEFFICIENT], [test x$HAVE_HYDROLOGYDCINEFFICIENT = xyes])
-
 AC_MSG_RESULT($HAVE_HYDROLOGYDCINEFFICIENT)
-
 dnl }}}
 dnl with-HydrologyShreve{{{
-
 AC_ARG_WITH([HydrologyShreve],
-
 	AS_HELP_STRING([--with-HydrologyShreve = YES], [compile with HydrologyShreve capabilities (default is yes)]),
-
 	[HYDROLOGYSHREVE=$withval],[HYDROLOGYSHREVE=yes])
-
 AC_MSG_CHECKING(for HydrologyShreve capability compilation)
 
-
 HAVE_HYDROLOGYSHREVE=no 
-
 if test "x$HYDROLOGYSHREVE" = "xyes"; then
-
 	HAVE_HYDROLOGYSHREVE=yes
-
 	AC_DEFINE([_HAVE_HYDROLOGYSHREVE_],[1],[with HydrologyShreve capability])
-
-fi
-
+fi
 AM_CONDITIONAL([HYDROLOGYSHREVE], [test x$HAVE_HYDROLOGYSHREVE = xyes])
-
 AC_MSG_RESULT($HAVE_HYDROLOGYSHREVE)
-
 dnl }}}
 dnl with-HydrologyShakti{{{
-
 AC_ARG_WITH([HydrologyShakti],
-
 	AS_HELP_STRING([--with-HydrologyShakti = YES], [compile with HydrologyShakti capabilities (default is yes)]),
-
 	[HYDROLOGYSHAKTI=$withval],[HYDROLOGYSHAKTI=yes])
-
 AC_MSG_CHECKING(for HydrologyShakti capability compilation)
 
-
 HAVE_HYDROLOGYSHAKTI=no 
-
 if test "x$HYDROLOGYSHAKTI" = "xyes"; then
-
 	HAVE_HYDROLOGYSHAKTI=yes
-
 	AC_DEFINE([_HAVE_HYDROLOGYSHAKTI_],[1],[with HydrologyShakti capability])
-
-fi
-
+fi
 AM_CONDITIONAL([HYDROLOGYSHAKTI], [test x$HAVE_HYDROLOGYSHAKTI = xyes])
-
 AC_MSG_RESULT($HAVE_HYDROLOGYSHAKTI)
-
 dnl }}}
 dnl with-HydrologyPism{{{
-
 AC_ARG_WITH([HydrologyPism],
-
 	AS_HELP_STRING([--with-HydrologyPism = YES], [compile with HydrologyPism capabilities (default is yes)]),
-
 	[HYDROLOGYPISM=$withval],[HYDROLOGYPISM=yes])
-
 AC_MSG_CHECKING(for HydrologyPism capability compilation)
 
-
 HAVE_HYDROLOGYPISM=no 
-
 if test "x$HYDROLOGYPISM" = "xyes"; then
-
 	HAVE_HYDROLOGYPISM=yes
-
 	AC_DEFINE([_HAVE_HYDROLOGYPISM_],[1],[with HydrologyPism capability])
-
-fi
-
+fi
 AM_CONDITIONAL([HYDROLOGYPISM], [test x$HAVE_HYDROLOGYPISM = xyes])
-
 AC_MSG_RESULT($HAVE_HYDROLOGYPISM)
-
 dnl }}}
 dnl with-L2ProjectionBase{{{
-
 AC_ARG_WITH([L2ProjectionBase],
-
 	AS_HELP_STRING([--with-L2ProjectionBase = YES], [compile with L2ProjectionBase capabilities (default is yes)]),
-
 	[L2PROJECTIONBASE=$withval],[L2PROJECTIONBASE=yes])
-
 AC_MSG_CHECKING(for L2ProjectionBase capability compilation)
 
-
 HAVE_L2PROJECTIONBASE=no 
-
 if test "x$L2PROJECTIONBASE" = "xyes"; then
-
 	HAVE_L2PROJECTIONBASE=yes
-
 	AC_DEFINE([_HAVE_L2PROJECTIONBASE_],[1],[with L2ProjectionBase capability])
-
-fi
-
+fi
 AM_CONDITIONAL([L2PROJECTIONBASE], [test x$HAVE_L2PROJECTIONBASE = xyes])
-
 AC_MSG_RESULT($HAVE_L2PROJECTIONBASE)
-
 dnl }}}
 dnl with-L2ProjectionEPL{{{
-
 AC_ARG_WITH([L2ProjectionEPL],
-
 	AS_HELP_STRING([--with-L2ProjectionEPL = YES], [compile with L2ProjectionEPL capabilities (default is yes)]),
-
 	[L2PROJECTIONEPL=$withval],[L2PROJECTIONEPL=yes])
-
 AC_MSG_CHECKING(for L2ProjectionEPL capability compilation)
 
-
 HAVE_L2PROJECTIONEPL=no 
-
 if test "x$L2PROJECTIONEPL" = "xyes"; then
-
 	HAVE_L2PROJECTIONEPL=yes
-
 	AC_DEFINE([_HAVE_L2PROJECTIONEPL_],[1],[with L2ProjectionEPL capability])
-
-fi
-
+fi
 AM_CONDITIONAL([L2PROJECTIONEPL], [test x$HAVE_L2PROJECTIONEPL = xyes])
-
 AC_MSG_RESULT($HAVE_L2PROJECTIONEPL)
-
 dnl }}}
 dnl with-Levelset{{{
-
 AC_ARG_WITH([Levelset],
-
 	AS_HELP_STRING([--with-Levelset = YES], [compile with Levelset capabilities (default is yes)]),
-
 	[LEVELSET=$withval],[LEVELSET=yes])
-
 AC_MSG_CHECKING(for Levelset capability compilation)
 
-
 HAVE_LEVELSET=no 
-
 if test "x$LEVELSET" = "xyes"; then
-
 	HAVE_LEVELSET=yes
-
 	AC_DEFINE([_HAVE_LEVELSET_],[1],[with Levelset capability])
-
-fi
-
+fi
 AM_CONDITIONAL([LEVELSET], [test x$HAVE_LEVELSET = xyes])
-
 AC_MSG_RESULT($HAVE_LEVELSET)
-
 dnl }}}
 dnl with-Love{{{
-
 AC_ARG_WITH([Love],
-
 	AS_HELP_STRING([--with-Love = YES], [compile with Love capabilities (default is yes)]),
-
 	[LOVE=$withval],[LOVE=yes])
-
 AC_MSG_CHECKING(for Love capability compilation)
 
-
 HAVE_LOVE=no 
-
 if test "x$LOVE" = "xyes"; then
-
 	HAVE_LOVE=yes
-
 	AC_DEFINE([_HAVE_LOVE_],[1],[with Love capability])
-
-fi
-
+fi
 AM_CONDITIONAL([LOVE], [test x$HAVE_LOVE = xyes])
-
 AC_MSG_RESULT($HAVE_LOVE)
-
 dnl }}}
 dnl with-Masstransport{{{
-
 AC_ARG_WITH([Masstransport],
-
 	AS_HELP_STRING([--with-Masstransport = YES], [compile with Masstransport capabilities (default is yes)]),
-
 	[MASSTRANSPORT=$withval],[MASSTRANSPORT=yes])
-
 AC_MSG_CHECKING(for Masstransport capability compilation)
 
-
 HAVE_MASSTRANSPORT=no 
-
 if test "x$MASSTRANSPORT" = "xyes"; then
-
 	HAVE_MASSTRANSPORT=yes
-
 	AC_DEFINE([_HAVE_MASSTRANSPORT_],[1],[with Masstransport capability])
-
-fi
-
+fi
 AM_CONDITIONAL([MASSTRANSPORT], [test x$HAVE_MASSTRANSPORT = xyes])
-
 AC_MSG_RESULT($HAVE_MASSTRANSPORT)
-
 dnl }}}
 dnl with-Melting{{{
-
 AC_ARG_WITH([Melting],
-
 	AS_HELP_STRING([--with-Melting = YES], [compile with Melting capabilities (default is yes)]),
-
 	[MELTING=$withval],[MELTING=yes])
-
 AC_MSG_CHECKING(for Melting capability compilation)
 
-
 HAVE_MELTING=no 
-
 if test "x$MELTING" = "xyes"; then
-
 	HAVE_MELTING=yes
-
 	AC_DEFINE([_HAVE_MELTING_],[1],[with Melting capability])
-
-fi
-
+fi
 AM_CONDITIONAL([MELTING], [test x$HAVE_MELTING = xyes])
-
 AC_MSG_RESULT($HAVE_MELTING)
-
 dnl }}}
 dnl with-Sealevelrise{{{
-
 AC_ARG_WITH([Sealevelrise],
-
 	AS_HELP_STRING([--with-Sealevelrise = YES], [compile with Sealevelrise capabilities (default is yes)]),
-
 	[SEALEVELRISE=$withval],[SEALEVELRISE=yes])
-
 AC_MSG_CHECKING(for Sealevelrise capability compilation)
 
-
 HAVE_SEALEVELRISE=no 
-
 if test "x$SEALEVELRISE" = "xyes"; then
-
 	HAVE_SEALEVELRISE=yes
-
 	AC_DEFINE([_HAVE_SEALEVELRISE_],[1],[with Sealevelrise capability])
-
-fi
-
+fi
 AM_CONDITIONAL([SEALEVELRISE], [test x$HAVE_SEALEVELRISE = xyes])
-
 AC_MSG_RESULT($HAVE_SEALEVELRISE)
-
 dnl }}}
 dnl with-Smb{{{
-
 AC_ARG_WITH([Smb],
-
 	AS_HELP_STRING([--with-Smb = YES], [compile with Smb capabilities (default is yes)]),
-
 	[SMB=$withval],[SMB=yes])
-
 AC_MSG_CHECKING(for Smb capability compilation)
 
-
 HAVE_SMB=no 
-
 if test "x$SMB" = "xyes"; then
-
 	HAVE_SMB=yes
-
 	AC_DEFINE([_HAVE_SMB_],[1],[with Smb capability])
-
-fi
-
+fi
 AM_CONDITIONAL([SMB], [test x$HAVE_SMB = xyes])
-
 AC_MSG_RESULT($HAVE_SMB)
-
 dnl }}}
 dnl with-Smooth{{{
-
 AC_ARG_WITH([Smooth],
-
 	AS_HELP_STRING([--with-Smooth = YES], [compile with Smooth capabilities (default is yes)]),
-
 	[SMOOTH=$withval],[SMOOTH=yes])
-
 AC_MSG_CHECKING(for Smooth capability compilation)
 
-
 HAVE_SMOOTH=no 
-
 if test "x$SMOOTH" = "xyes"; then
-
 	HAVE_SMOOTH=yes
-
 	AC_DEFINE([_HAVE_SMOOTH_],[1],[with Smooth capability])
-
-fi
-
+fi
 AM_CONDITIONAL([SMOOTH], [test x$HAVE_SMOOTH = xyes])
-
 AC_MSG_RESULT($HAVE_SMOOTH)
-
 dnl }}}
 dnl with-Stressbalance{{{
-
 AC_ARG_WITH([Stressbalance],
-
 	AS_HELP_STRING([--with-Stressbalance = YES], [compile with Stressbalance capabilities (default is yes)]),
-
 	[STRESSBALANCE=$withval],[STRESSBALANCE=yes])
-
 AC_MSG_CHECKING(for Stressbalance capability compilation)
 
-
 HAVE_STRESSBALANCE=no 
-
 if test "x$STRESSBALANCE" = "xyes"; then
-
 	HAVE_STRESSBALANCE=yes
-
 	AC_DEFINE([_HAVE_STRESSBALANCE_],[1],[with Stressbalance capability])
-
-fi
-
+fi
 AM_CONDITIONAL([STRESSBALANCE], [test x$HAVE_STRESSBALANCE = xyes])
-
 AC_MSG_RESULT($HAVE_STRESSBALANCE)
-
 dnl }}}
 dnl with-StressbalanceSIA{{{
-
 AC_ARG_WITH([StressbalanceSIA],
-
 	AS_HELP_STRING([--with-StressbalanceSIA = YES], [compile with StressbalanceSIA capabilities (default is yes)]),
-
 	[STRESSBALANCESIA=$withval],[STRESSBALANCESIA=yes])
-
 AC_MSG_CHECKING(for StressbalanceSIA capability compilation)
 
-
 HAVE_STRESSBALANCESIA=no 
-
 if test "x$STRESSBALANCESIA" = "xyes"; then
-
 	HAVE_STRESSBALANCESIA=yes
-
 	AC_DEFINE([_HAVE_STRESSBALANCESIA_],[1],[with StressbalanceSIA capability])
-
-fi
-
+fi
 AM_CONDITIONAL([STRESSBALANCESIA], [test x$HAVE_STRESSBALANCESIA = xyes])
-
 AC_MSG_RESULT($HAVE_STRESSBALANCESIA)
-
 dnl }}}
 dnl with-StressbalanceVertical{{{
-
 AC_ARG_WITH([StressbalanceVertical],
-
 	AS_HELP_STRING([--with-StressbalanceVertical = YES], [compile with StressbalanceVertical capabilities (default is yes)]),
-
 	[STRESSBALANCEVERTICAL=$withval],[STRESSBALANCEVERTICAL=yes])
-
 AC_MSG_CHECKING(for StressbalanceVertical capability compilation)
 
-
 HAVE_STRESSBALANCEVERTICAL=no 
-
 if test "x$STRESSBALANCEVERTICAL" = "xyes"; then
-
 	HAVE_STRESSBALANCEVERTICAL=yes
-
 	AC_DEFINE([_HAVE_STRESSBALANCEVERTICAL_],[1],[with StressbalanceVertical capability])
-
-fi
-
+fi
 AM_CONDITIONAL([STRESSBALANCEVERTICAL], [test x$HAVE_STRESSBALANCEVERTICAL = xyes])
-
 AC_MSG_RESULT($HAVE_STRESSBALANCEVERTICAL)
-
 dnl }}}
 dnl with-Thermal{{{
-
 AC_ARG_WITH([Thermal],
-
 	AS_HELP_STRING([--with-Thermal = YES], [compile with Thermal capabilities (default is yes)]),
-
 	[THERMAL=$withval],[THERMAL=yes])
-
 AC_MSG_CHECKING(for Thermal capability compilation)
 
-
 HAVE_THERMAL=no 
-
 if test "x$THERMAL" = "xyes"; then
-
 	HAVE_THERMAL=yes
-
 	AC_DEFINE([_HAVE_THERMAL_],[1],[with Thermal capability])
-
-fi
-
+fi
 AM_CONDITIONAL([THERMAL], [test x$HAVE_THERMAL = xyes])
-
 AC_MSG_RESULT($HAVE_THERMAL)
-
 dnl }}}
 dnl with-UzawaPressure{{{
-
 AC_ARG_WITH([UzawaPressure],
-
 	AS_HELP_STRING([--with-UzawaPressure = YES], [compile with UzawaPressure capabilities (default is yes)]),
-
 	[UZAWAPRESSURE=$withval],[UZAWAPRESSURE=yes])
-
 AC_MSG_CHECKING(for UzawaPressure capability compilation)
 
-
 HAVE_UZAWAPRESSURE=no 
-
 if test "x$UZAWAPRESSURE" = "xyes"; then
-
 	HAVE_UZAWAPRESSURE=yes
-
 	AC_DEFINE([_HAVE_UZAWAPRESSURE_],[1],[with UzawaPressure capability])
-
-fi
-
+fi
 AM_CONDITIONAL([UZAWAPRESSURE], [test x$HAVE_UZAWAPRESSURE = xyes])
-
 AC_MSG_RESULT($HAVE_UZAWAPRESSURE)
-
 dnl }}}
 
Index: /issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.cpp	(revision 23794)
+++ /issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.cpp	(revision 23795)
@@ -107,4 +107,7 @@
 		case BasalforcingsPicoEnum:
 			iomodel->FetchDataToInput(elements,"md.basalforcings.basin_id",BasalforcingsPicoBasinIdEnum);
+			break;
+		case BasalforcingsIsmip6Enum:
+			iomodel->FetchDataToInput(elements,"md.basalforcings.basin_id",BasalforcingsIsmp6BasinIdEnum);
 			break;
 		default:
Index: /issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp	(revision 23794)
+++ /issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp	(revision 23795)
@@ -181,4 +181,5 @@
 		case BasalforcingsIsmip6Enum:{
 			//iomodel->FetchDataToInput(elements,"md.basalforcings.tf",BasalforcingsIsmp6TfEnum);
+			iomodel->FetchDataToInput(elements,"md.basalforcings.basin_id",BasalforcingsIsmp6BasinIdEnum);
 			IssmDouble** array3d = NULL;
 			int* Ms = NULL;
Index: /issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp	(revision 23794)
+++ /issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp	(revision 23795)
@@ -783,4 +783,7 @@
 				iomodel->FetchDataToInput(elements,"md.basalforcings.basin_id",BasalforcingsPicoBasinIdEnum);
 				break;
+			case BasalforcingsIsmip6Enum:
+				iomodel->FetchDataToInput(elements,"md.basalforcings.basin_id",BasalforcingsIsmp6BasinIdEnum);
+				break;
 			default:
 				_error_("Basal forcing model "<<EnumToStringx(basalforcing_model)<<" not supported yet");
Index: /issm/trunk-jpl/src/c/analyses/StressbalanceVerticalAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/StressbalanceVerticalAnalysis.cpp	(revision 23794)
+++ /issm/trunk-jpl/src/c/analyses/StressbalanceVerticalAnalysis.cpp	(revision 23795)
@@ -135,4 +135,8 @@
 			iomodel->FetchDataToInput(elements,"md.basalforcings.basin_id",BasalforcingsPicoBasinIdEnum);
 			break;
+		case BasalforcingsIsmip6Enum:
+			iomodel->FetchDataToInput(elements,"md.basalforcings.basin_id",BasalforcingsIsmp6BasinIdEnum);
+			break;
+
 		default:
 			_error_("Basal forcing model "<<EnumToStringx(basalforcing_model)<<" not supported yet");
Index: /issm/trunk-jpl/src/c/classes/Elements/Element.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Element.h	(revision 23794)
+++ /issm/trunk-jpl/src/c/classes/Elements/Element.h	(revision 23795)
@@ -252,4 +252,5 @@
 		virtual bool       IsFaceOnBoundary(void)=0;
 		virtual bool       IsIcefront(void)=0;
+		virtual void       Ismip6FloatingiceMeltingRate(void)=0;
 		virtual bool       IsNodeOnShelfFromFlags(IssmDouble* flags)=0;
 		virtual bool       IsOnBase()=0;
Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.h	(revision 23794)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.h	(revision 23795)
@@ -93,4 +93,5 @@
 		IssmDouble     IceVolume(bool scaled);
 		IssmDouble     IceVolumeAboveFloatation(bool scaled);
+		void				Ismip6FloatingiceMeltingRate(void){_error_("not implemented yet");};
 		void           InputDepthAverageAtBase(int enum_type,int average_enum_type);
 		void	         InputExtrude(int enum_type,int start);
Index: /issm/trunk-jpl/src/c/classes/Elements/Seg.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Seg.h	(revision 23794)
+++ /issm/trunk-jpl/src/c/classes/Elements/Seg.h	(revision 23795)
@@ -88,4 +88,5 @@
 		bool        IsFaceOnBoundary(void){_error_("not implemented yet");};
 		bool		   IsIcefront(void);
+		void		   Ismip6FloatingiceMeltingRate(void){_error_("not implemented yet");};
 		bool        IsNodeOnShelfFromFlags(IssmDouble* flags){_error_("not implemented yet");};
 		bool        IsOnBase(){_error_("not implemented yet");};
Index: /issm/trunk-jpl/src/c/classes/Elements/Tetra.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tetra.h	(revision 23794)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tetra.h	(revision 23795)
@@ -88,4 +88,5 @@
 		IssmDouble  IceVolume(bool scaled){_error_("not implemented yet");};
 		IssmDouble  IceVolumeAboveFloatation(bool scaled){_error_("not implemented yet");};
+		void			Ismip6FloatingiceMeltingRate(void){_error_("not implemented yet");};
 		bool        IsFaceOnBoundary(void){_error_("not implemented yet");};
 		bool		   IsIcefront(void);
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 23794)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 23795)
@@ -2273,5 +2273,5 @@
 		values[i]=solution[doflist[i]];
 		if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
-		if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in solution vector");
+		if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in solution vector, ID = " << this->Sid());
 	}
 
@@ -2403,4 +2403,55 @@
 	return isicefront;
 }/*}}}*/
+void       Tria::Ismip6FloatingiceMeltingRate(void){/*{{{*/
+
+	if(!this->IsIceInElement() || !this->IsFloating()) return;
+
+	int         basinid,num_basins,M,N;
+	IssmDouble  tf,gamma0,base,delta_t_basin,mean_tf_basin,absval;
+	IssmDouble  basalmeltrate[NUMVERTICES];
+	IssmDouble* delta_t = NULL;
+	IssmDouble* mean_tf = NULL;
+	IssmDouble* depths  = NULL;
+
+	/*Get variables*/
+	IssmDouble rhoi     = this->FindParam(MaterialsRhoIceEnum);
+	IssmDouble rhow     = this->FindParam(MaterialsRhoSeawaterEnum)+5;
+	IssmDouble lf       = this->FindParam(MaterialsLatentheatEnum);
+	IssmDouble cp       = this->FindParam(MaterialsMixedLayerCapacityEnum);
+
+	/* Get parameters and inputs */
+	this->inputs->GetInputValue(&basinid,BasalforcingsIsmp6BasinIdEnum);
+	this->parameters->FindParam(&num_basins,BasalforcingsIsmp6NumBasinsEnum);
+	this->parameters->FindParam(&gamma0,BasalforcingsIsmp6Gamma0Enum);
+	this->parameters->FindParam(&delta_t,&M,BasalforcingsIsmp6DeltaTEnum);    _assert_(M==num_basins);
+	this->parameters->FindParam(&mean_tf,&N,BasalforcingsIsmp6AverageTfEnum); _assert_(N==num_basins);
+	Input* tf_input=this->GetInput(BasalforcingsIsmp6TfShelfEnum);            _assert_(tf_input);
+	delta_t_basin = delta_t[basinid]; mean_tf_basin = mean_tf[basinid];
+
+   /* Compute melt rate */
+   Gauss* gauss=this->NewGauss();
+	for(int i=0;i<NUMVERTICES;i++){
+		gauss->GaussVertex(i);
+		tf_input->GetInputValue(&tf,gauss);
+		absval = mean_tf_basin+delta_t_basin;
+		if (absval<0) {absval = -1.*absval;}
+		basalmeltrate[i] = gamma0*pow((rhow*cp)/(rhoi*lf),2)*(tf+delta_t_basin)*absval;
+	}
+
+	cout << "meltrate = " << basalmeltrate[0] << endl;
+
+	/*Return basal melt rate*/
+	this->AddInput(BasalforcingsFloatingiceMeltingRateEnum,basalmeltrate,P1Enum);
+	_error_("STOP HERE");
+
+	/*Cleanup and return*/
+	delete gauss;
+	xDelete<IssmDouble>(delta_t);
+	xDelete<IssmDouble>(mean_tf);
+	xDelete<IssmDouble>(depths);
+
+	_error_("not implemented yet");
+
+	}/*}}}*/
 bool       Tria::IsNodeOnShelfFromFlags(IssmDouble* flags){/*{{{*/
 
@@ -3151,5 +3202,4 @@
 	/*Define arrays*/
 	IssmDouble basalmeltrates_shelf[NUMVERTICES];  //Basal melt-rate
-	//IssmDouble slope[NUMVERTICES];                 //Basal slope
 
 	/*Polynomial coefficients*/
@@ -3190,11 +3240,11 @@
 		baseslopey_input->GetInputValue(&slopey,gauss);
 
-		/*Compute ice shelf base slope*/
-		alpha = sqrt(slopex*slopex + slopey*slopey);
-
+		/*Compute ice shelf base slope (radians)*/
+		alpha = atan(sqrt(slopex*slopex + slopey*slopey));
+		if(alpha>=M_PI) alpha = M_PI - 0.001;               //ensure sin(alpha) > 0 for meltrate calculations
+	
 		/*Make necessary conversions*/
 		Toc = Toc-273.15;
-		alpha = atan(alpha);          
-		if(zgl>z_base) zgl=z_base-10;
+	   if(zgl>z_base) zgl=z_base;
 
 		/*Low bound for Toc to ensure X_hat is between 0 and 1*/
@@ -3222,5 +3272,6 @@
 		basalmeltrates_shelf[i] = (M*M_hat)/yts;                                     //Basal melt-rate (m/s)
 	}
-   /*Save computed melt-rate*/
+	  
+	/*Save computed melt-rate*/
    this->AddInput(BasalforcingsFloatingiceMeltingRateEnum,basalmeltrates_shelf,P1Enum);
 
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.h	(revision 23794)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.h	(revision 23795)
@@ -95,4 +95,5 @@
 		IssmDouble  IceVolume(bool scaled);
 		IssmDouble  IceVolumeAboveFloatation(bool scaled);
+		void        Ismip6FloatingiceMeltingRate(void);
 		void        InputDepthAverageAtBase(int enum_type,int average_enum_type);
 		void        InputExtrude(int enum_type,int start){_error_("not implemented"); /*For penta only*/};
Index: /issm/trunk-jpl/src/c/modules/FloatingiceMeltingRatex/FloatingiceMeltingRatex.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/FloatingiceMeltingRatex/FloatingiceMeltingRatex.cpp	(revision 23794)
+++ /issm/trunk-jpl/src/c/modules/FloatingiceMeltingRatex/FloatingiceMeltingRatex.cpp	(revision 23795)
@@ -73,11 +73,65 @@
 void FloatingiceMeltingRateIsmip6x(FemModel* femmodel){/*{{{*/
 
+
+	int         num_basins, basinid;
+	IssmDouble  area, tf, base, time;
+	IssmDouble  tf_test[3];
+
+   femmodel->parameters->FindParam(&num_basins,BasalforcingsIsmp6NumBasinsEnum);
+
+   IssmDouble* tf_weighted_avg     = xNewZeroInit<IssmDouble>(num_basins);
+	IssmDouble* tf_weighted_avg_cpu = xNewZeroInit<IssmDouble>(num_basins);
+   IssmDouble* areas_summed        = xNewZeroInit<IssmDouble>(num_basins);
+   IssmDouble* areas_summed_cpu    = xNewZeroInit<IssmDouble>(num_basins);
+
+	/*Find and save TF at each ice shelf point*/
+	//	element->parameters->FindParam(&time,TimeEnum);
+	//	Input* tf_input = element->GetInput(BasalforcingsIsmp6TfEnum); _assert_(tf_input);
+	//	tf_input->Echo();
+	//	Input* base_input = element->GetInput(BaseEnum);               _assert_(base_input);
+	//	Gauss* gauss=element->NewGauss(1); gauss->GaussPoint(0);
+	//	base_input->GetInputValue(&base,gauss);
+	//	//tf_input->GetInputValue(&tf,gauss,BasalforcingsIsmp6TfEnum);
+
+	/*TEST: Set tf=2 for all ice shelf elements*/
 	for(int i=0;i<femmodel->elements->Size();i++){
 		Element* element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i));
-		Input* temp = element->GetInput(BasalforcingsIsmp6TfEnum);
-		_assert_(temp); 
-		temp->Echo();
-		_error_("not implemented yet");
-		//element->MismipFloatingiceMeltingRate();
+		if(!element->IsIceInElement() || !element->IsFloating()) continue;
+		for(int k=0;k<3;k++) {tf_test[k] = 2.;}
+		element->AddInput(BasalforcingsIsmp6TfShelfEnum,tf_test,P1Enum);
+	}
+
+	/*Compute sums of tf*area and shelf-area per cpu*/
+	for(int i=0;i<femmodel->elements->Size();i++){
+		Element* element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i));
+		if(!element->IsIceInElement() || !element->IsFloating()) continue;
+		Input* tf_input=element->GetInput(BasalforcingsIsmp6TfShelfEnum); _assert_(tf_input);
+		element->inputs->GetInputValue(&basinid,BasalforcingsIsmp6BasinIdEnum);
+		Gauss* gauss=element->NewGauss(1); gauss->GaussPoint(0);
+		tf_input->GetInputValue(&tf,gauss);
+		delete gauss;
+		area=element->GetHorizontalSurfaceArea();
+		tf_weighted_avg[basinid]+=tf*area;
+		areas_summed[basinid]   +=area;
+	}
+
+	/*Syncronize across cpus*/
+	ISSM_MPI_Allreduce(tf_weighted_avg,tf_weighted_avg_cpu,num_basins,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,IssmComm::GetComm());
+	ISSM_MPI_Allreduce(areas_summed,areas_summed_cpu,num_basins,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,IssmComm::GetComm());
+
+	/*Compute weighted means and save*/
+	for(int k=0;k<num_basins;k++){tf_weighted_avg_cpu[k] = tf_weighted_avg_cpu[k]/areas_summed_cpu[k];}
+	femmodel->parameters->AddObject(new DoubleVecParam(BasalforcingsIsmp6AverageTfEnum,tf_weighted_avg_cpu,num_basins));
+
+	/*Cleanup and return */
+	xDelete<IssmDouble>(tf_weighted_avg);
+	xDelete<IssmDouble>(tf_weighted_avg_cpu);
+	xDelete<IssmDouble>(areas_summed);
+	xDelete<IssmDouble>(areas_summed_cpu);
+
+   /*Compute meltrates*/
+	for(int i=0;i<femmodel->elements->Size();i++){
+		Element* element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i));
+		element->Ismip6FloatingiceMeltingRate();
 	}
 }
Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 23794)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 23795)
@@ -210,22 +210,29 @@
 			break;
 		case BasalforcingsPicoEnum:
-				iomodel->FindConstant(&interp,"md.timestepping.interp_forcings");
-				parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.num_basins",BasalforcingsPicoNumBasinsEnum));
-				parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.maxboxcount",BasalforcingsPicoMaxboxcountEnum));
-				parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.overturning_coeff",BasalforcingsPicoOverturningCoeffEnum));
-				parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.gamma_T",BasalforcingsPicoGammaTEnum));
-				parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.isplume",BasalforcingsPicoIsplumeEnum));
-				iomodel->FetchData(&transparam,&M,&N,"md.basalforcings.farocean_temperature");
-				_assert_(M>=1 && N>=1); 
-				parameters->AddObject(new TransientArrayParam(BasalforcingsPicoFarOceantemperatureEnum,transparam,&transparam[N*(M-1)],interp,N,M));
-				xDelete<IssmDouble>(transparam);
-				iomodel->FetchData(&transparam,&M,&N,"md.basalforcings.farocean_salinity");
-				_assert_(M>=1 && N>=1); 
-				parameters->AddObject(new TransientArrayParam(BasalforcingsPicoFarOceansalinityEnum,transparam,&transparam[N*(M-1)],interp,N,M));
-				xDelete<IssmDouble>(transparam);
+			iomodel->FindConstant(&interp,"md.timestepping.interp_forcings");
+			parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.num_basins",BasalforcingsPicoNumBasinsEnum));
+			parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.maxboxcount",BasalforcingsPicoMaxboxcountEnum));
+			parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.overturning_coeff",BasalforcingsPicoOverturningCoeffEnum));
+			parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.gamma_T",BasalforcingsPicoGammaTEnum));
+			parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.isplume",BasalforcingsPicoIsplumeEnum));
+			iomodel->FetchData(&transparam,&M,&N,"md.basalforcings.farocean_temperature");
+			_assert_(M>=1 && N>=1); 
+			parameters->AddObject(new TransientArrayParam(BasalforcingsPicoFarOceantemperatureEnum,transparam,&transparam[N*(M-1)],interp,N,M));
+			xDelete<IssmDouble>(transparam);
+			iomodel->FetchData(&transparam,&M,&N,"md.basalforcings.farocean_salinity");
+			_assert_(M>=1 && N>=1); 
+			parameters->AddObject(new TransientArrayParam(BasalforcingsPicoFarOceansalinityEnum,transparam,&transparam[N*(M-1)],interp,N,M));
+			xDelete<IssmDouble>(transparam);
+			break;
 		case BasalforcingsIsmip6Enum:
-				iomodel->FindConstant(&interp,"md.timestepping.interp_forcings");
-				printf("-------------- file: CreateParameters.cpp line: %i\n",__LINE__); 
-				printf("== WARNING: needs to be implemented\n");
+			parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.num_basins",BasalforcingsIsmp6NumBasinsEnum));
+			parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.gamma_0",BasalforcingsIsmp6Gamma0Enum));
+			iomodel->FindConstant(&temp_n,"md.basalforcings.num_basins");
+			iomodel->FetchData(&transparam,NULL,&M,"md.basalforcings.delta_t");
+			parameters->AddObject(new DoubleVecParam(BasalforcingsIsmp6DeltaTEnum,transparam,temp_n));
+			xDelete<IssmDouble>(transparam);
+			iomodel->FetchData(&transparam,NULL,NULL,"md.basalforcings.tf_depths");
+			parameters->AddObject(new DoubleVecParam(BasalforcingsIsmp6TfDepthsEnum,transparam,3));
+			xDelete<IssmDouble>(transparam);
 			break;
 		default:
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 23794)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 23795)
@@ -63,4 +63,10 @@
 	BasalforcingsDtbgEnum,
 	BasalforcingsEnum,
+   BasalforcingsIsmp6BasinAreaEnum,
+   BasalforcingsIsmp6DeltaTEnum,
+   BasalforcingsIsmp6Gamma0Enum,
+   BasalforcingsIsmp6NumBasinsEnum,
+   BasalforcingsIsmp6TfDepthsEnum,
+	BasalforcingsIsmp6AverageTfEnum,
 	BasalforcingsLowercrustheatEnum,
 	BasalforcingsMantleconductivityEnum,
@@ -437,4 +443,6 @@
 	BasalforcingsGroundediceMeltingRateEnum,
 	BasalforcingsIsmp6TfEnum,
+	BasalforcingsIsmp6TfShelfEnum,
+	BasalforcingsIsmp6BasinIdEnum,
 	BasalforcingsPicoBasinIdEnum,
 	BasalforcingsPicoBoxIdEnum,
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 23794)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 23795)
@@ -71,4 +71,10 @@
 		case BasalforcingsDtbgEnum : return "BasalforcingsDtbg";
 		case BasalforcingsEnum : return "Basalforcings";
+		case BasalforcingsIsmp6BasinAreaEnum : return "BasalforcingsIsmp6BasinArea";
+		case BasalforcingsIsmp6DeltaTEnum : return "BasalforcingsIsmp6DeltaT";
+		case BasalforcingsIsmp6Gamma0Enum : return "BasalforcingsIsmp6Gamma0";
+		case BasalforcingsIsmp6NumBasinsEnum : return "BasalforcingsIsmp6NumBasins";
+		case BasalforcingsIsmp6TfDepthsEnum : return "BasalforcingsIsmp6TfDepths";
+		case BasalforcingsIsmp6AverageTfEnum : return "BasalforcingsIsmp6AverageTf";
 		case BasalforcingsLowercrustheatEnum : return "BasalforcingsLowercrustheat";
 		case BasalforcingsMantleconductivityEnum : return "BasalforcingsMantleconductivity";
@@ -443,4 +449,6 @@
 		case BasalforcingsGroundediceMeltingRateEnum : return "BasalforcingsGroundediceMeltingRate";
 		case BasalforcingsIsmp6TfEnum : return "BasalforcingsIsmp6Tf";
+		case BasalforcingsIsmp6TfShelfEnum : return "BasalforcingsIsmp6TfShelf";
+		case BasalforcingsIsmp6BasinIdEnum : return "BasalforcingsIsmp6BasinId";
 		case BasalforcingsPicoBasinIdEnum : return "BasalforcingsPicoBasinId";
 		case BasalforcingsPicoBoxIdEnum : return "BasalforcingsPicoBoxId";
Index: /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 23794)
+++ /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 23795)
@@ -71,4 +71,10 @@
 	      else if (strcmp(name,"BasalforcingsDtbg")==0) return BasalforcingsDtbgEnum;
 	      else if (strcmp(name,"Basalforcings")==0) return BasalforcingsEnum;
+	      else if (strcmp(name,"BasalforcingsIsmp6BasinArea")==0) return BasalforcingsIsmp6BasinAreaEnum;
+	      else if (strcmp(name,"BasalforcingsIsmp6DeltaT")==0) return BasalforcingsIsmp6DeltaTEnum;
+	      else if (strcmp(name,"BasalforcingsIsmp6Gamma0")==0) return BasalforcingsIsmp6Gamma0Enum;
+	      else if (strcmp(name,"BasalforcingsIsmp6NumBasins")==0) return BasalforcingsIsmp6NumBasinsEnum;
+	      else if (strcmp(name,"BasalforcingsIsmp6TfDepths")==0) return BasalforcingsIsmp6TfDepthsEnum;
+	      else if (strcmp(name,"BasalforcingsIsmp6AverageTf")==0) return BasalforcingsIsmp6AverageTfEnum;
 	      else if (strcmp(name,"BasalforcingsLowercrustheat")==0) return BasalforcingsLowercrustheatEnum;
 	      else if (strcmp(name,"BasalforcingsMantleconductivity")==0) return BasalforcingsMantleconductivityEnum;
@@ -131,5 +137,8 @@
 	      else if (strcmp(name,"FlowequationIsFS")==0) return FlowequationIsFSEnum;
 	      else if (strcmp(name,"FlowequationIsHO")==0) return FlowequationIsHOEnum;
-	      else if (strcmp(name,"FlowequationIsL1L2")==0) return FlowequationIsL1L2Enum;
+         else stage=2;
+   }
+   if(stage==2){
+	      if (strcmp(name,"FlowequationIsL1L2")==0) return FlowequationIsL1L2Enum;
 	      else if (strcmp(name,"FlowequationIsSIA")==0) return FlowequationIsSIAEnum;
 	      else if (strcmp(name,"FlowequationIsSSA")==0) return FlowequationIsSSAEnum;
@@ -137,8 +146,5 @@
 	      else if (strcmp(name,"FrictionF")==0) return FrictionFEnum;
 	      else if (strcmp(name,"FrictionGamma")==0) return FrictionGammaEnum;
-         else stage=2;
-   }
-   if(stage==2){
-	      if (strcmp(name,"FrictionLaw")==0) return FrictionLawEnum;
+	      else if (strcmp(name,"FrictionLaw")==0) return FrictionLawEnum;
 	      else if (strcmp(name,"FrictionPseudoplasticityExponent")==0) return FrictionPseudoplasticityExponentEnum;
 	      else if (strcmp(name,"FrictionThresholdSpeed")==0) return FrictionThresholdSpeedEnum;
@@ -254,5 +260,8 @@
 	      else if (strcmp(name,"MaterialsThermalconductivity")==0) return MaterialsThermalconductivityEnum;
 	      else if (strcmp(name,"MaterialsThermalExchangeVelocity")==0) return MaterialsThermalExchangeVelocityEnum;
-	      else if (strcmp(name,"MeltingOffset")==0) return MeltingOffsetEnum;
+         else stage=3;
+   }
+   if(stage==3){
+	      if (strcmp(name,"MeltingOffset")==0) return MeltingOffsetEnum;
 	      else if (strcmp(name,"MeshAverageVertexConnectivity")==0) return MeshAverageVertexConnectivityEnum;
 	      else if (strcmp(name,"MeshElementtype")==0) return MeshElementtypeEnum;
@@ -260,8 +269,5 @@
 	      else if (strcmp(name,"MeshNumberofvertices")==0) return MeshNumberofverticesEnum;
 	      else if (strcmp(name,"ModelId")==0) return ModelIdEnum;
-         else stage=3;
-   }
-   if(stage==3){
-	      if (strcmp(name,"Nodes")==0) return NodesEnum;
+	      else if (strcmp(name,"Nodes")==0) return NodesEnum;
 	      else if (strcmp(name,"NumModels")==0) return NumModelsEnum;
 	      else if (strcmp(name,"OceanGridNx")==0) return OceanGridNxEnum;
@@ -377,5 +383,8 @@
 	      else if (strcmp(name,"SteadystateNumRequestedOutputs")==0) return SteadystateNumRequestedOutputsEnum;
 	      else if (strcmp(name,"SteadystateReltol")==0) return SteadystateReltolEnum;
-	      else if (strcmp(name,"SteadystateRequestedOutputs")==0) return SteadystateRequestedOutputsEnum;
+         else stage=4;
+   }
+   if(stage==4){
+	      if (strcmp(name,"SteadystateRequestedOutputs")==0) return SteadystateRequestedOutputsEnum;
 	      else if (strcmp(name,"Step")==0) return StepEnum;
 	      else if (strcmp(name,"StressbalanceAbstol")==0) return StressbalanceAbstolEnum;
@@ -383,8 +392,5 @@
 	      else if (strcmp(name,"StressbalanceIsnewton")==0) return StressbalanceIsnewtonEnum;
 	      else if (strcmp(name,"StressbalanceMaxiter")==0) return StressbalanceMaxiterEnum;
-         else stage=4;
-   }
-   if(stage==4){
-	      if (strcmp(name,"StressbalanceNumRequestedOutputs")==0) return StressbalanceNumRequestedOutputsEnum;
+	      else if (strcmp(name,"StressbalanceNumRequestedOutputs")==0) return StressbalanceNumRequestedOutputsEnum;
 	      else if (strcmp(name,"StressbalancePenaltyFactor")==0) return StressbalancePenaltyFactorEnum;
 	      else if (strcmp(name,"StressbalanceReltol")==0) return StressbalanceReltolEnum;
@@ -452,4 +458,6 @@
 	      else if (strcmp(name,"BasalforcingsGroundediceMeltingRate")==0) return BasalforcingsGroundediceMeltingRateEnum;
 	      else if (strcmp(name,"BasalforcingsIsmp6Tf")==0) return BasalforcingsIsmp6TfEnum;
+	      else if (strcmp(name,"BasalforcingsIsmp6TfShelf")==0) return BasalforcingsIsmp6TfShelfEnum;
+	      else if (strcmp(name,"BasalforcingsIsmp6BasinId")==0) return BasalforcingsIsmp6BasinIdEnum;
 	      else if (strcmp(name,"BasalforcingsPicoBasinId")==0) return BasalforcingsPicoBasinIdEnum;
 	      else if (strcmp(name,"BasalforcingsPicoBoxId")==0) return BasalforcingsPicoBoxIdEnum;
@@ -498,5 +506,8 @@
 	      else if (strcmp(name,"EplHeadOld")==0) return EplHeadOldEnum;
 	      else if (strcmp(name,"EplHeadSlopeX")==0) return EplHeadSlopeXEnum;
-	      else if (strcmp(name,"EplHeadSlopeY")==0) return EplHeadSlopeYEnum;
+         else stage=5;
+   }
+   if(stage==5){
+	      if (strcmp(name,"EplHeadSlopeY")==0) return EplHeadSlopeYEnum;
 	      else if (strcmp(name,"EsaDeltathickness")==0) return EsaDeltathicknessEnum;
 	      else if (strcmp(name,"EsaEmotion")==0) return EsaEmotionEnum;
@@ -506,8 +517,5 @@
 	      else if (strcmp(name,"EsaYmotion")==0) return EsaYmotionEnum;
 	      else if (strcmp(name,"EtaDiff")==0) return EtaDiffEnum;
-         else stage=5;
-   }
-   if(stage==5){
-	      if (strcmp(name,"FrictionAs")==0) return FrictionAsEnum;
+	      else if (strcmp(name,"FrictionAs")==0) return FrictionAsEnum;
 	      else if (strcmp(name,"FrictionC")==0) return FrictionCEnum;
 	      else if (strcmp(name,"FrictionCoefficientcoulomb")==0) return FrictionCoefficientcoulombEnum;
@@ -621,5 +629,8 @@
 	      else if (strcmp(name,"SmbC")==0) return SmbCEnum;
 	      else if (strcmp(name,"SmbDailysnowfall")==0) return SmbDailysnowfallEnum;
-	      else if (strcmp(name,"SmbDailyrainfall")==0) return SmbDailyrainfallEnum;
+         else stage=6;
+   }
+   if(stage==6){
+	      if (strcmp(name,"SmbDailyrainfall")==0) return SmbDailyrainfallEnum;
 	      else if (strcmp(name,"SmbDailydsradiation")==0) return SmbDailydsradiationEnum;
 	      else if (strcmp(name,"SmbDailydlradiation")==0) return SmbDailydlradiationEnum;
@@ -629,8 +640,5 @@
 	      else if (strcmp(name,"SmbDailyairhumidity")==0) return SmbDailyairhumidityEnum;
 	      else if (strcmp(name,"SmbDailytemperature")==0) return SmbDailytemperatureEnum;
-         else stage=6;
-   }
-   if(stage==6){
-	      if (strcmp(name,"SmbD")==0) return SmbDEnum;
+	      else if (strcmp(name,"SmbD")==0) return SmbDEnum;
 	      else if (strcmp(name,"SmbDini")==0) return SmbDiniEnum;
 	      else if (strcmp(name,"SmbDlwrf")==0) return SmbDlwrfEnum;
@@ -744,5 +752,8 @@
 	      else if (strcmp(name,"WaterColumnOld")==0) return WaterColumnOldEnum;
 	      else if (strcmp(name,"WaterfractionDrainage")==0) return WaterfractionDrainageEnum;
-	      else if (strcmp(name,"WaterfractionDrainageIntegrated")==0) return WaterfractionDrainageIntegratedEnum;
+         else stage=7;
+   }
+   if(stage==7){
+	      if (strcmp(name,"WaterfractionDrainageIntegrated")==0) return WaterfractionDrainageIntegratedEnum;
 	      else if (strcmp(name,"Waterfraction")==0) return WaterfractionEnum;
 	      else if (strcmp(name,"Waterheight")==0) return WaterheightEnum;
@@ -752,8 +763,5 @@
 	      else if (strcmp(name,"AdaptiveTimestepping")==0) return AdaptiveTimesteppingEnum;
 	      else if (strcmp(name,"AdjointBalancethickness2Analysis")==0) return AdjointBalancethickness2AnalysisEnum;
-         else stage=7;
-   }
-   if(stage==7){
-	      if (strcmp(name,"AdjointBalancethicknessAnalysis")==0) return AdjointBalancethicknessAnalysisEnum;
+	      else if (strcmp(name,"AdjointBalancethicknessAnalysis")==0) return AdjointBalancethicknessAnalysisEnum;
 	      else if (strcmp(name,"AdjointHorizAnalysis")==0) return AdjointHorizAnalysisEnum;
 	      else if (strcmp(name,"Adjointp")==0) return AdjointpEnum;
@@ -867,5 +875,8 @@
 	      else if (strcmp(name,"GaussSeg")==0) return GaussSegEnum;
 	      else if (strcmp(name,"GaussTetra")==0) return GaussTetraEnum;
-	      else if (strcmp(name,"GaussTria")==0) return GaussTriaEnum;
+         else stage=8;
+   }
+   if(stage==8){
+	      if (strcmp(name,"GaussTria")==0) return GaussTriaEnum;
 	      else if (strcmp(name,"GenericOption")==0) return GenericOptionEnum;
 	      else if (strcmp(name,"GenericParam")==0) return GenericParamEnum;
@@ -875,8 +886,5 @@
 	      else if (strcmp(name,"Gradient1")==0) return Gradient1Enum;
 	      else if (strcmp(name,"Gradient2")==0) return Gradient2Enum;
-         else stage=8;
-   }
-   if(stage==8){
-	      if (strcmp(name,"Gradient3")==0) return Gradient3Enum;
+	      else if (strcmp(name,"Gradient3")==0) return Gradient3Enum;
 	      else if (strcmp(name,"GroundedArea")==0) return GroundedAreaEnum;
 	      else if (strcmp(name,"GroundedAreaScaled")==0) return GroundedAreaScaledEnum;
@@ -990,5 +998,8 @@
 	      else if (strcmp(name,"None")==0) return NoneEnum;
 	      else if (strcmp(name,"Numberedcostfunction")==0) return NumberedcostfunctionEnum;
-	      else if (strcmp(name,"Numericalflux")==0) return NumericalfluxEnum;
+         else stage=9;
+   }
+   if(stage==9){
+	      if (strcmp(name,"Numericalflux")==0) return NumericalfluxEnum;
 	      else if (strcmp(name,"OldGradient")==0) return OldGradientEnum;
 	      else if (strcmp(name,"OneLayerP4z")==0) return OneLayerP4zEnum;
@@ -998,8 +1009,5 @@
 	      else if (strcmp(name,"Outputdefinition10")==0) return Outputdefinition10Enum;
 	      else if (strcmp(name,"Outputdefinition11")==0) return Outputdefinition11Enum;
-         else stage=9;
-   }
-   if(stage==9){
-	      if (strcmp(name,"Outputdefinition12")==0) return Outputdefinition12Enum;
+	      else if (strcmp(name,"Outputdefinition12")==0) return Outputdefinition12Enum;
 	      else if (strcmp(name,"Outputdefinition13")==0) return Outputdefinition13Enum;
 	      else if (strcmp(name,"Outputdefinition14")==0) return Outputdefinition14Enum;
@@ -1113,5 +1121,8 @@
 	      else if (strcmp(name,"P2xP4")==0) return P2xP4Enum;
 	      else if (strcmp(name,"Paterson")==0) return PatersonEnum;
-	      else if (strcmp(name,"Pengrid")==0) return PengridEnum;
+         else stage=10;
+   }
+   if(stage==10){
+	      if (strcmp(name,"Pengrid")==0) return PengridEnum;
 	      else if (strcmp(name,"Penpair")==0) return PenpairEnum;
 	      else if (strcmp(name,"Penta")==0) return PentaEnum;
@@ -1121,8 +1132,5 @@
 	      else if (strcmp(name,"ProfilingCurrentMem")==0) return ProfilingCurrentMemEnum;
 	      else if (strcmp(name,"ProfilingSolutionTime")==0) return ProfilingSolutionTimeEnum;
-         else stage=10;
-   }
-   if(stage==10){
-	      if (strcmp(name,"Regionaloutput")==0) return RegionaloutputEnum;
+	      else if (strcmp(name,"Regionaloutput")==0) return RegionaloutputEnum;
 	      else if (strcmp(name,"Regular")==0) return RegularEnum;
 	      else if (strcmp(name,"Riftfront")==0) return RiftfrontEnum;
@@ -1236,5 +1244,8 @@
 	      else if (strcmp(name,"SealevelObs")==0) return SealevelObsEnum;
 	      else if (strcmp(name,"SealevelWeights")==0) return SealevelWeightsEnum;
-	      else if (strcmp(name,"StrainRate")==0) return StrainRateEnum;
+         else stage=11;
+   }
+   if(stage==11){
+	      if (strcmp(name,"StrainRate")==0) return StrainRateEnum;
 	      else if (strcmp(name,"StressbalanceViscosityOvershoot")==0) return StressbalanceViscosityOvershootEnum;
 	      else if (strcmp(name,"StressTensor")==0) return StressTensorEnum;
@@ -1243,5 +1254,5 @@
 	      else if (strcmp(name,"TriangleInterp")==0) return TriangleInterpEnum;
 	      else if (strcmp(name,"MaximumNumberOfDefinitions")==0) return MaximumNumberOfDefinitionsEnum;
-         else stage=11;
+         else stage=12;
    }
 	/*If we reach this point, the string provided has not been found*/
