Index: /issm/trunk-jpl/src/m/classes/masstransport.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/masstransport.m	(revision 15767)
+++ /issm/trunk-jpl/src/m/classes/masstransport.m	(revision 15768)
@@ -14,4 +14,30 @@
 		 requested_outputs      = NaN;
 	end
+	methods (Static)
+		function obj = loadobj(obj) % {{{
+			% This function is directly called by matlab when a model object is
+			% loaded. If the input is a struct it is an old version of this class and
+			% old fields must be recovered (make sure they are in the deprecated
+			% model properties)
+
+			if verLessThan('matlab','7.9'),
+				disp('Warning: your matlab version is old and there is a risk that load does not work correctly');
+				disp('         if the model is not loaded correctly, rename temporarily loadobj so that matlab does not use it');
+
+				% This is a Matlab bug: all the fields of md have their default value
+				% Example of error message:
+				% Warning: Error loading an object of class 'model':
+				% Undefined function or method 'exist' for input arguments of type 'cell'
+				%
+				% This has been fixed in MATLAB 7.9 (R2009b) and later versions
+			end
+
+			if isstruct(obj)
+				disp('Recovering masstransport from older version');
+				objstruct = obj;
+				obj = structtoobj(masstransport(),objstruct);
+			end
+		end% }}}
+	end
 	methods
 		function obj = masstransport(varargin) % {{{
@@ -19,4 +45,14 @@
 				case 0
 					obj=setdefaultparameters(obj);
+				case 1
+					inputstruct=varargin{1};
+					list1 = properties('masstransport');
+					list2 = fieldnames(inputstruct);
+					for i=1:length(list1)
+						fieldname = list1{i};
+						if ismember(fieldname,list2),
+							obj.(fieldname) = inputstruct.(fieldname);
+						end
+					end
 				otherwise
 					error('constructor not supported');
Index: /issm/trunk-jpl/src/m/classes/model/model.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/model/model.m	(revision 15767)
+++ /issm/trunk-jpl/src/m/classes/model/model.m	(revision 15768)
@@ -865,5 +865,5 @@
 			if isfield(structmd,'max_steadystate_iterations'), md.steadystate.maxiter=structmd.max_steadystate_iterations; end
 			if isfield(structmd,'isdiagnostic'), md.transient.isdiagnostic=structmd.isdiagnostic; end
-			if isfield(structmd,'ismasstransport'), md.transient.ismasstransport=structmd.ismasstransport; end
+			if isfield(structmd,'isprognostic'), md.transient.ismasstransport=structmd.isprognostic; end
 			if isfield(structmd,'isthermal'), md.transient.isthermal=structmd.isthermal; end
 			if isfield(structmd,'control_analysis'), md.inversion.iscontrol=structmd.control_analysis; end
@@ -942,8 +942,5 @@
 				md.verbose=verbose;
 			end
-			if size(md.diagnostic.icefront,2)==3 || size(md.diagnostic.icefront,2)==5,
-				front=md.diagnostic.icefront;
-				md.diagnostic.icefront=[front 1*md.mask.elementonfloatingice(front(:,end))];
-			end
+
 			if isfield(structmd,'spcvelocity'), 
 				md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1);
@@ -1046,7 +1043,12 @@
 				md.diagnostic.referential=NaN*ones(md.mesh.numberofvertices,6);
 			end
-
 			if ~isfield(structmd,'loadingforce');
 				md.diagnostic.loadingforce=0*ones(md.mesh.numberofvertices,3);
+			end
+
+			%2013 August 9
+			if isfield(structmd,'prognostic') & isa(structmd.prognostic,'prognostic'),
+				disp('Recovering old prognostic class');
+				md.masstransport=masstransport(structmd.prognostic);
 			end
 		end% }}}
Index: /issm/trunk-jpl/src/m/classes/oldclasses/diagnostic.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/oldclasses/diagnostic.m	(revision 15767)
+++ /issm/trunk-jpl/src/m/classes/oldclasses/diagnostic.m	(revision 15768)
@@ -26,4 +26,29 @@
 		requested_outputs        = NaN;
 	end
+	methods (Static)
+		function obj = loadobj(obj) % {{{
+			% This function is directly called by matlab when a model object is
+			% loaded. If the input is a struct it is an old version of this class and
+			% old fields must be recovered (make sure they are in the deprecated
+			% model properties)
+
+			if verLessThan('matlab','7.9'),
+				disp('Warning: your matlab version is old and there is a risk that load does not work correctly');
+				disp('         if the model is not loaded correctly, rename temporarily loadobj so that matlab does not use it');
+
+				% This is a Matlab bug: all the fields of md have their default value
+				% Example of error message:
+				% Warning: Error loading an object of class 'model':
+				% Undefined function or method 'exist' for input arguments of type 'cell'
+				%
+				% This has been fixed in MATLAB 7.9 (R2009b) and later versions
+			end
+
+			if size(md.diagnostic.icefront,2)==3 || size(md.diagnostic.icefront,2)==5,
+				front=md.diagnostic.icefront;
+				md.diagnostic.icefront=[front 1*md.mask.elementonfloatingice(front(:,end))];
+			end
+		end% }}}
+	end
 	methods
 		function obj = diagnostic(varargin) % {{{
@@ -151,4 +176,5 @@
 
 		end % }}}
+
 		function marshall(obj,md,fid) % {{{
 			WriteData(fid,'object',obj,'fieldname','spcvx','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1);
