Index: /issm/trunk-jpl/src/m/classes/frontalforcings.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/frontalforcings.py	(revision 23653)
+++ /issm/trunk-jpl/src/m/classes/frontalforcings.py	(revision 23653)
@@ -0,0 +1,78 @@
+from fielddisplay import fielddisplay
+from project3d import project3d
+from checkfield import checkfield
+from WriteData import WriteData
+
+class frontalforcings(object):
+	"""
+	FRONTAL FORCINGS class definition
+
+	   Usage:
+	      frontalforcings=frontalforcings();
+	"""
+
+	def __init__(self): # {{{
+
+		self.meltingrate   = float('NaN')
+		self.melt_parameterization   = 0.
+                self.basin = float('NaN')
+                self.numberofbasins = float('NaN')
+                self.subglacial_discharge = float('NaN')
+                self.thermalforcings = float('NaN')
+
+		#set defaults
+		self.setdefaultparameters()
+
+		#}}}
+	def __repr__(self): # {{{
+		string='   Frontalforcings parameters:'
+		string="%s\n%s"%(string,fielddisplay(self,'melt_parameterization','0: no, 1: Rignot melt parameterization (Rignot et al.,2016)'))
+                if self.melt_parameterization==0:
+                    string="%s\n%s"%(string,fielddisplay(self,'meltingrate','melting rate at given location [m/a]'))
+                elif self.melt_parameterization==1: 
+                    string="%s\n%s"%(string,fielddisplay(self,'basin','basin ID for vertices'))
+                    string="%s\n%s"%(string,fielddisplay(self,'numberofbasins','number of basins'))
+                    string="%s\n%s"%(string,fielddisplay(self,'subglacial_discharge','sum of subglacial discharge for each basin [m/d]'))
+                    string="%s\n%s"%(string,fielddisplay(self,'thermalforcing','thermal forcing [∘C]'))
+
+		return string
+		#}}}
+	def extrude(self,md): # {{{
+		self.meltingrate=project3d(md,'vector',self.meltingrate,'type','node')
+		return self
+	#}}}
+	def setdefaultparameters(self): # {{{
+
+		return self
+	#}}}
+	def checkconsistency(self,md,solution,analyses):    # {{{
+
+		#Early return
+		if (solution!='TransientSolution') or (not md.transient.ismovingfront):
+			return md
+			
+                md = checkfield(md,'fieldname','frontalforcings.melt_parameterization','numel',[1],'values',[0,1]);
+                if self.melt_parameterization==0:
+                    md = checkfield(md,'fieldname','frontalforcings.meltingrate','NaN',1,'Inf',1,'timeseries',1,'>=',0);
+                elif self.melt_parameterization==1:
+                    md = checkfield(md,'fieldname','frontalforcings.basin','>',0,'nan',1,'Inf',1);
+                    md = checkfield(md,'fieldname','frontalforcings.numberofbasins','numel',[1]);
+                    md = checkfield(md,'fieldname','frontalforcings.subglacial_discharge','>=',0,'nan',1,'Inf',1,'timeseries',1);
+                    md = checkfield(md,'fieldname','frontalforcings.thermalforcing','nan',1,'Inf',1,'timeseries',1);
+
+		return md
+	# }}}
+	def marshall(self,prefix,md,fid):    # {{{
+
+		yts=md.constants.yts
+
+                WriteData(fid,prefix,'object',self,'fieldname','melt_parameterization','format','Integer');
+                if self.melt_parameterization==0:
+                    WriteData(fid,prefix,'object',self,'fieldname','meltingrate','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts,'scale',1./yts);
+                elif self.melt_parameterization==1:
+                    WriteData(fid,prefix,'object',self,'fieldname','basin','format','DoubleMat','mattype',1);
+                    WriteData(fid,prefix,'object',self,'fieldname','numberofbasins','format','Integer');
+                    WriteData(fid,prefix,'object',self,'fieldname','subglacial_discharge','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
+                    WriteData(fid,prefix,'object',self,'fieldname','thermalforcing','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
+
+        # }}}
Index: /issm/trunk-jpl/src/m/classes/model.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/model.py	(revision 23652)
+++ /issm/trunk-jpl/src/m/classes/model.py	(revision 23653)
@@ -111,5 +111,6 @@
 		self.levelset         = levelset()
 		self.calving          = calving()
-		self.gia              = giaivins()
+	        self.frontalforcings  = frontalforcings()
+                self.gia              = giaivins()
 		self.love             = fourierlove()
 		self.esa	      = esa()
@@ -117,5 +118,5 @@
 		self.inversion        = inversion()
 		self.qmu              = qmu()
-		self.amr					 = amr()
+		self.amr	      = amr()
 
 		self.results          = results()
@@ -156,4 +157,5 @@
 		        'levelset',
 		        'calving',
+                        'frontalforcings',
 			'love',
 			'gia',
@@ -200,4 +202,5 @@
 		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("levelset","[%s,%s]" % ("1x1",obj.levelset.__class__.__name__),"parameters for moving boundaries (level-set method)"))
 		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("calving","[%s,%s]" % ("1x1",obj.calving.__class__.__name__),"parameters for calving"))
+		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("frontalforcings","[%s,%s]" % ("1x1",obj.frontalforcings.__class__.__name__),"parameters for frontalforcings"))
 		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("gia","[%s,%s]" % ("1x1",obj.gia.__class__.__name__),"parameters for gia solution"))
 		string="%s\n%s" % (string,'%19s: %-22s -- %s' % ("love","[%s,%s]" % ("1x1",obj.love.__class__.__name__),"parameters for love solution"))
@@ -661,4 +664,5 @@
 		md.levelset.extrude(md)
 		md.calving.extrude(md)
+		md.frontalforcings.extrude(md)
 
 		#connectivity
Index: /issm/trunk-jpl/test/NightlyRun/test540.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test540.py	(revision 23652)
+++ /issm/trunk-jpl/test/NightlyRun/test540.py	(revision 23653)
@@ -19,5 +19,5 @@
 md.mask.ice_levelset = 1e4 * (md.mask.ice_levelset + 0.5)
 md.calving = calvingvonmises()
-md.calving.meltingrate = np.zeros((md.mesh.numberofvertices,))
+md.frontalforcings.meltingrate = np.zeros((md.mesh.numberofvertices,))
 md.transient.ismovingfront = 1
 md.levelset.spclevelset = float('NaN') * np.ones((md.mesh.numberofvertices,))
Index: /issm/trunk-jpl/test/NightlyRun/test804.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test804.py	(revision 23652)
+++ /issm/trunk-jpl/test/NightlyRun/test804.py	(revision 23653)
@@ -25,5 +25,5 @@
 
 md.calving.calvingrate=1000.*np.ones((md.mesh.numberofvertices))
-md.calving.meltingrate=np.zeros((md.mesh.numberofvertices))
+md.frontalforcings.meltingrate=np.zeros((md.mesh.numberofvertices))
 
 md=solve(md,'Transient')
Index: /issm/trunk-jpl/test/NightlyRun/test805.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test805.py	(revision 23652)
+++ /issm/trunk-jpl/test/NightlyRun/test805.py	(revision 23653)
@@ -32,5 +32,5 @@
 
 md.calving.calvingrate=1000.*np.ones((md.mesh.numberofvertices))
-md.calving.meltingrate=np.zeros((md.mesh.numberofvertices))
+md.frontalforcings.meltingrate=np.zeros((md.mesh.numberofvertices))
 md.groundingline.melt_interpolation='SubelementMelt1'
 md.levelset.stabilization=2
Index: /issm/trunk-jpl/test/NightlyRun/test806.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test806.py	(revision 23652)
+++ /issm/trunk-jpl/test/NightlyRun/test806.py	(revision 23653)
@@ -37,5 +37,5 @@
 md.calving=calvinglevermann()
 md.calving.coeff=4.89e13*np.ones((md.mesh.numberofvertices))
-md.calving.meltingrate=np.zeros((md.mesh.numberofvertices))
+md.frontalforcings.meltingrate=np.zeros((md.mesh.numberofvertices))
 md.levelset.spclevelset=np.nan*np.ones((md.mesh.numberofvertices))
 
Index: /issm/trunk-jpl/test/NightlyRun/test807.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test807.py	(revision 23652)
+++ /issm/trunk-jpl/test/NightlyRun/test807.py	(revision 23653)
@@ -36,5 +36,5 @@
 
 md.calving.calvingrate=np.zeros((md.mesh.numberofvertices))
-md.calving.meltingrate=10000*np.ones((md.mesh.numberofvertices))
+md.forcings.meltingrate=10000*np.ones((md.mesh.numberofvertices))
 md.levelset.spclevelset=np.nan*np.ones((md.mesh.numberofvertices))
 
Index: /issm/trunk-jpl/test/NightlyRun/test808.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test808.py	(revision 23652)
+++ /issm/trunk-jpl/test/NightlyRun/test808.py	(revision 23653)
@@ -37,5 +37,5 @@
 md.calving = calvingminthickness()
 md.calving.min_thickness = 400
-md.calving.meltingrate = np.zeros((md.mesh.numberofvertices,))
+md.frontalforcings.meltingrate = np.zeros((md.mesh.numberofvertices,))
 md.levelset.spclevelset = float('NaN')* np.ones((md.mesh.numberofvertices,))
 md.levelset.reinit_frequency = 1
