Index: /issm/branches/trunk-larour-GRL2017/src/m/classes/massconaxpby.m
===================================================================
--- /issm/branches/trunk-larour-GRL2017/src/m/classes/massconaxpby.m	(revision 21604)
+++ /issm/branches/trunk-larour-GRL2017/src/m/classes/massconaxpby.m	(revision 21605)
@@ -3,5 +3,5 @@
 %   Usage:
 %      massconaxpby=massconaxpby();
-%      massconsumaxpby=massconaxpby('name','MassCon58+35','namex','MassCon58','alpha',.5,'namey','MassCon35','beta',.5); 
+%      massconaxpby=massconaxpby('name','MassCon58+35','namex','MassCon58','alpha',.5,'namey','MassCon35','beta',.5); 
 % 
 %   where name is the name of the massconaxpby object, namex is the name of the first masscon, namey the name of the second masscon and alpha,beta the 
@@ -77,11 +77,10 @@
 		function md = marshall(self,prefix,md,fid) % {{{
 
-		WriteData(fid,prefix,'object',self,'fieldname','name','format','String');
-		WriteData(fid,prefix,'object',self,'fieldname','definitionstring','format','Integer');
-		WriteData(fid,prefix,'object',self,'fieldname','namex','format','String');
-		WriteData(fid,prefix,'object',self,'fieldname','namey','format','String');
-		WriteData(fid,prefix,'object',self,'fieldname','alpha','format','Double');
-		WriteData(fid,prefix,'object',self,'fieldname','beta','format','Double');
-
+		WriteData(fid,prefix,'data',self.name,'name','md.massconaxpby.name','format','String');
+		WriteData(fid,prefix,'data',self.definitionstring,'name','md.massconaxpby.definitionstring','format','String');
+		WriteData(fid,prefix,'data',self.namex,'name','md.massconaxpby.namex','format','String');
+		WriteData(fid,prefix,'data',self.namey,'name','md.massconaxpby.namey','format','String');
+		WriteData(fid,prefix,'data',self.alpha,'name','md.massconaxpby.alpha','format','Double');
+		WriteData(fid,prefix,'data',self.beta,'name','md.massconaxpby.beta','format','Double');
 		end % }}}
 	end
Index: /issm/branches/trunk-larour-GRL2017/src/m/classes/misfit.m
===================================================================
--- /issm/branches/trunk-larour-GRL2017/src/m/classes/misfit.m	(revision 21604)
+++ /issm/branches/trunk-larour-GRL2017/src/m/classes/misfit.m	(revision 21605)
@@ -71,5 +71,9 @@
 			md = checkfield(md,'fieldname','self.observation','field',self.observation,'timeseries',1,'NaN',1,'Inf',1);
 			md = checkfield(md,'fieldname','self.timeinterpolation','field',self.timeinterpolation,'values',{'nearestneighbor'});
-			md = checkfield(md,'fieldname','self.weights','field',self.weights,'timeseries',1,'NaN',1,'Inf',1);
+			md = checkfield(md,'fieldname','self.weights','field',self.weights,'timeseries',1,'NaN',1,'Inf',1); 
+
+			if ~ischar(self.definitionstring) | ~ischar(self.model_string) | ~ischar(self.observation_string) | ~ischar(self.weights_string),
+				error('one of definitionstring, model_string, observation_string or weights_string is empty!');
+			end
 
 		end % }}}
Index: /issm/branches/trunk-larour-GRL2017/src/m/coordsystems/gdalinfo.m
===================================================================
--- /issm/branches/trunk-larour-GRL2017/src/m/coordsystems/gdalinfo.m	(revision 21605)
+++ /issm/branches/trunk-larour-GRL2017/src/m/coordsystems/gdalinfo.m	(revision 21605)
@@ -0,0 +1,39 @@
+function info=gdalinfo(imagename)
+%GDALINFO - retrieve information from a geotiff or georeferenced image
+%
+%   Usage:
+%      gdalinfo(imagename)
+%
+%
+
+	%first, get pixel size: 
+	[s,r]=system(sprintf('gdalinfo %s | grep "Pixel Size"',imagename));
+	if s, error('gdalinfo error message: could not run system command gdalinfo'); end
+	d=sscanf(r,'Pixel Size = (%g,%g)');
+	info.dx=abs(d(1)); info.dy=abs(d(2));
+
+	%get upper left: 
+	[s,r]=system(sprintf('gdalinfo %s | grep "Upper Left"',imagename));
+	if s, error('gdalinfo error message: could not run system command gdalinfo'); end
+	d=sscanf(r,'Upper Left ( %g,%g) %s');
+	info.xmin=d(1);
+	info.ymax=d(2);
+	
+	%get lower right: 
+	[s,r]=system(sprintf('gdalinfo %s | grep "Lower Right"',imagename));
+	if s, error('gdalinfo error message: could not run system command gdalinfo'); end
+	d=sscanf(r,'Lower Right ( %g,%g) %s');
+	info.xmax=d(1);
+	info.ymin=d(2);
+
+	%Size: 
+	[s,r]=system(sprintf('gdalinfo %s | grep "Size is"',imagename));
+	if s, error('gdalinfo error message: could not run system command gdalinfo'); end
+	d=sscanf(r,'Size is %g, %g');
+	info.nx=d(1);
+	info.ny=d(2);
+
+	%Name: 
+	[pathstr,name,ext] = fileparts(imagename);
+	info.rootname=name;
+	info.ext=ext;
