Index: /issm/trunk/src/m/utils/BC/SetIceSheetBC.m
===================================================================
--- /issm/trunk/src/m/utils/BC/SetIceSheetBC.m	(revision 1753)
+++ /issm/trunk/src/m/utils/BC/SetIceSheetBC.m	(revision 1754)
@@ -9,12 +9,11 @@
 %grid on Dirichlet
 pos=find(md.gridonboundary);
-md.gridondirichlet_diag=zeros(md.numberofgrids,1);
-md.gridondirichlet_diag(pos)=1;
+md.spcvelocity=zeros(md.numberofgrids,6);
+md.spcvelocity(pos,1:3)=1;
 
 %Dirichlet Values
-md.dirichletvalues_diag=zeros(md.numberofgrids,2);
 if (length(md.vx_obs)==md.numberofgrids & length(md.vy_obs)==md.numberofgrids)
 	disp('      boundary conditions for diagnostic model: spc set as observed velocities');
-	md.dirichletvalues_diag=[md.vx_obs md.vy_obs];
+	md.spcvelocity(:,4:5)=[md.vx_obs md.vy_obs]; %vz is zero
 else
 	disp('      boundary conditions for diagnostic model: spc set as zero');
@@ -22,6 +21,5 @@
 
 %segment on neumann (Ice Front) -> none
-md.segmentonneumann_diag=zeros(0,3);
-md.neumannvalues_diag=[];
+md.pressureload=zeros(0,3);
 
 %Create zeros melting and accumulation if not specified
@@ -36,13 +34,10 @@
 
 displaystring(md.debug,'%s',['      boundary conditions for prognostic model initialization']);
-md.gridondirichlet_prog=zeros(md.numberofgrids,1);
-md.dirichletvalues_prog=zeros(md.numberofgrids,1);
-md.segmentonneumann_prog=[];
-md.neumannvalues_prog=[];
+md.spcthickness=zeros(md.numberofgrids,2);
 
 if (length(md.observed_temperature)==md.numberofgrids),
 	displaystring(md.debug,'%s',['      boundary conditions for thermal model']);
-	md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature
-	md.dirichletvalues_thermal=md.observed_temperature;
+	md.spctemperature=ones(md.numberofgrids,2); %observed temperauture everywhere
+	md.spctemperature(:,2)=md.observed_temperature; %values of the spcs
 	if (length(md.geothermalflux)~=md.numberofgrids),
 		md.geothermalflux=50*10^-3*ones(md.numberofgrids,1); %50 mW/m^2
Index: /issm/trunk/src/m/utils/BC/SetIceShelfBC.m
===================================================================
--- /issm/trunk/src/m/utils/BC/SetIceShelfBC.m	(revision 1753)
+++ /issm/trunk/src/m/utils/BC/SetIceShelfBC.m	(revision 1754)
@@ -21,20 +21,18 @@
 gridonicefront=double(md.gridonboundary & gridinsideicefront);
 pos=find(md.gridonboundary & ~gridonicefront);
-md.gridondirichlet_diag=zeros(md.numberofgrids,1);
-md.gridondirichlet_diag(pos)=1;
+md.spcvelocity=zeros(md.numberofgrids,6);
+md.spcvelocity(pos,1:3)=1;
 
 %Dirichlet Values
-md.dirichletvalues_diag=zeros(md.numberofgrids,2);
 if (length(md.vx_obs)==md.numberofgrids & length(md.vy_obs)==md.numberofgrids)
 	disp('      boundary conditions for diagnostic model: spc set as observed velocities');
-	md.dirichletvalues_diag(pos,:)=[md.vx_obs(pos) md.vy_obs(pos)];
+	md.spcvelocity(pos,4:5)=[md.vx_obs(pos) md.vy_obs(pos)]; %zeros for vz
 else
 	disp('      boundary conditions for diagnostic model: spc set as zero');
 end
 
-%segment on Neumann (Ice Front)
+%segment on Ice Front
 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
-md.segmentonneumann_diag=md.segments(pos,:);
-md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure)
+md.pressureload=md.segments(pos,:);
 
 %Create zeros melting and accumulation if not specified
@@ -49,13 +47,10 @@
 
 displaystring(md.debug,'%s',['      boundary conditions for prognostic model initialization']);
-md.gridondirichlet_prog=zeros(md.numberofgrids,1);
-md.dirichletvalues_prog=zeros(md.numberofgrids,1);
-md.segmentonneumann_prog=[];
-md.neumannvalues_prog=[];
+md.spcthickness=zeros(md.numberofgrids,1);
 
 if (length(md.observed_temperature)==md.numberofgrids),
 	displaystring(md.debug,'%s',['      boundary conditions for thermal model']);
-	md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature
-	md.dirichletvalues_thermal=md.observed_temperature;
+	md.spctemperature=ones(md.numberofgrids,2); %surface temperature
+	md.spctemperature(:,2)=md.observed_temperature; %values of the spcs
 	if (length(md.geothermalflux)~=md.numberofgrids),
 		md.geothermalflux=zeros(md.numberofgrids,1);
Index: /issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m
===================================================================
--- /issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m	(revision 1753)
+++ /issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m	(revision 1754)
@@ -33,12 +33,11 @@
 	error('SetMarineIceSheetBC error message: ice front all around the glacier, no dirichlet found. Set BC manually')
 end
-md.gridondirichlet_diag=zeros(md.numberofgrids,1);
-md.gridondirichlet_diag(pos)=1;
+md.spcvelocity=zeros(md.numberofgrids,6);
+md.spcvelocity(pos,1:3)=1;
 
 %Dirichlet Values
-md.dirichletvalues_diag=zeros(md.numberofgrids,2);
 if (length(md.vx_obs)==md.numberofgrids & length(md.vy_obs)==md.numberofgrids)
 	disp('      boundary conditions for diagnostic model: spc set as observed velocities');
-	md.dirichletvalues_diag(pos,:)=[md.vx_obs(pos) md.vy_obs(pos)];
+	md.spcvelocity(pos,4:5)=[md.vx_obs(pos) md.vy_obs(pos)]; %zeros for vz
 else
 	disp('      boundary conditions for diagnostic model: spc set as zero');
@@ -47,6 +46,5 @@
 %segment on Neumann (Ice Front)
 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
-md.segmentonneumann_diag=md.segments(pos,:);
-md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure)
+md.pressureload=md.segments(pos,:);
 
 %Create zeros melting and accumulation if not specified
@@ -61,13 +59,10 @@
 
 displaystring(md.debug,'%s',['      boundary conditions for prognostic model initialization']);
-md.gridondirichlet_prog=zeros(md.numberofgrids,1);
-md.dirichletvalues_prog=zeros(md.numberofgrids,1);
-md.segmentonneumann_prog=[];
-md.neumannvalues_prog=[];
+md.spcthickness=zeros(md.numberofgrids,2);
 
 if (length(md.observed_temperature)==md.numberofgrids),
 	displaystring(md.debug,'%s',['      boundary conditions for thermal model']);
-	md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature
-	md.dirichletvalues_thermal=md.observed_temperature;
+	md.spctemperature=ones(md.numberofgrids,2); %surface temperature
+	md.spctemperature(:,2)=md.observed_temperature; %values of the spcs
 	if (length(md.geothermalflux)~=md.numberofgrids),
 		md.geothermalflux=zeros(md.numberofgrids,1);
Index: /issm/trunk/src/m/utils/Mesh/zerothickness_icesheetfront.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/zerothickness_icesheetfront.m	(revision 1753)
+++ /issm/trunk/src/m/utils/Mesh/zerothickness_icesheetfront.m	(revision 1754)
@@ -13,5 +13,5 @@
 
 %retrieve elements on ice sheet front
-segments=md.segmentonneumann_diag;
+segments=md.pressureload;
 els=segments(:,3);
 pos=find(md.elementonicesheet(els));
