Index: /issm/trunk-jpl/test/NightlyRun/test2002.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test2002.m	(revision 26247)
+++ /issm/trunk-jpl/test/NightlyRun/test2002.m	(revision 26248)
@@ -6,16 +6,11 @@
 
 %Geometry for the bed, arbitrary thickness of 1000: 
-md.geometry.bed=-ones(md.mesh.numberofvertices,1);
+md.geometry.bed=zeros(md.mesh.numberofvertices,1);
 md.geometry.base=md.geometry.bed;
-md.geometry.thickness=1000*ones(md.mesh.numberofvertices,1);
+md.geometry.thickness=100*ones(md.mesh.numberofvertices,1);
 md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
-
-%parameterize solidearth solution:
 %solidearth loading:  {{{
 md.masstransport.spcthickness=[md.geometry.thickness;0];
-md.dsl.global_average_thermosteric_sea_level=[0;0];
-md.dsl.sea_surface_height_above_geoid=zeros(md.mesh.numberofvertices+1,1);
-md.dsl.sea_water_pressure_at_sea_floor=zeros(md.mesh.numberofvertices+1,1);
 md.smb.mass_balance=zeros(md.mesh.numberofvertices,1);
 %antarctica
@@ -36,5 +31,5 @@
 
 %elastic loading from love numbers:
-md.solidearth.lovenumbers=lovenumbers('maxdeg',100);
+md.solidearth.lovenumbers=lovenumbers('maxdeg',1000);
 
 %}}}
@@ -57,4 +52,5 @@
 md.timestepping.final_time=1;
 
+%masstransport:
 md.basalforcings.groundedice_melting_rate=zeros(md.mesh.numberofvertices,1);
 md.basalforcings.floatingice_melting_rate=zeros(md.mesh.numberofvertices,1);
@@ -62,6 +58,4 @@
 md.initialization.vy=zeros(md.mesh.numberofvertices,1);
 md.initialization.sealevel=zeros(md.mesh.numberofvertices,1);
-md.initialization.bottompressure=zeros(md.mesh.numberofvertices,1);
-md.initialization.dsl=zeros(md.mesh.numberofvertices,1);
 md.initialization.str=0;
 
@@ -87,6 +81,5 @@
 md.transient.ismasstransport=1;
 md.transient.isslc=1;
-md.solidearth.requested_outputs={'Sealevel'};
-
+md.solidearth.requested_outputs={'Sealevel','Bed'};
 
 % max number of iteration reverted back to 10 (i.e., the original default value)
@@ -100,4 +93,5 @@
 md=solve(md,'Transient');
 Seustatic=md.results.TransientSolution.Sealevel;
+Beustatic=md.results.TransientSolution.Bed;
 
 %eustatic + rigid run:
@@ -107,4 +101,5 @@
 md=solve(md,'tr');
 Srigid=md.results.TransientSolution.Sealevel;
+Brigid=md.results.TransientSolution.Bed;
 
 %eustatic + rigid + elastic run:
@@ -112,7 +107,7 @@
 md.solidearth.settings.elastic=1;
 md.solidearth.settings.rotation=0;
-md.solidearth.requested_outputs={'Sealevel'};
 md=solve(md,'tr');
 Selastic=md.results.TransientSolution.Sealevel;
+Belastic=md.results.TransientSolution.Bed;
 
 %eustatic + rigid + elastic + rotation run:
@@ -122,7 +117,8 @@
 md=solve(md,'tr');
 Srotation=md.results.TransientSolution.Sealevel;
+Brotation=md.results.TransientSolution.Bed;
 
 %Fields and tolerances to track changes
-field_names={'Eustatic','Rigid','Elastic','Rotation'};
-field_tolerances={1e-13,1e-13,1e-13,1e-13};
-field_values={Seustatic,Srigid,Selastic,Srotation};
+field_names={'Seustatic','Srigid','Selastic','Srotation','Beustatic','Brigid','Belastic','Brotation'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+field_values={Seustatic,Srigid,Selastic,Srotation,Beustatic,Brigid,Belastic,Brotation};
Index: /issm/trunk-jpl/test/NightlyRun/test2003.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test2003.m	(revision 26247)
+++ /issm/trunk-jpl/test/NightlyRun/test2003.m	(revision 26248)
@@ -15,18 +15,21 @@
 %solidearth loading:  {{{
 md.masstransport.spcthickness=[md.geometry.thickness;0];
-md.initialization.sealevel=zeros(md.mesh.numberofvertices,1);
-md.dsl.global_average_thermosteric_sea_level=[0;0];
-md.dsl.sea_surface_height_above_geoid=zeros(md.mesh.numberofvertices+1,1);
-md.dsl.sea_water_pressure_at_sea_floor=zeros(md.mesh.numberofvertices+1,1);
 md.smb.mass_balance=zeros(md.mesh.numberofvertices,1);
 
-%antarctica
-late=sum(md.mesh.lat(md.mesh.elements),2)/3;
-longe=sum(md.mesh.long(md.mesh.elements),2)/3;
-pos=find(late <-75 & longe <0);
-md.masstransport.spcthickness(md.mesh.elements(pos,:))= md.masstransport.spcthickness(md.mesh.elements(pos,:))-1;
+
+xe=md.mesh.x(md.mesh.elements)*[1;1;1]/3;
+ye=md.mesh.y(md.mesh.elements)*[1;1;1]/3;
+ze=md.mesh.z(md.mesh.elements)*[1;1;1]/3;
+re=sqrt(xe.^2+ye.^2+ze.^2);
+
+late=asind(ze./re);
+longe=atan2d(ye,xe);
+%greenland
+pos=find(late>60 & late<90 & longe>-75 & longe<-15);
+md.masstransport.spcthickness(md.mesh.elements(pos,:))= md.masstransport.spcthickness(md.mesh.elements(pos,:))-1000;
+posice=pos;
 
 %elastic loading from love numbers:
-md.solidearth.lovenumbers=lovenumbers('maxdeg',1000);
+md.solidearth.lovenumbers=lovenumbers('maxdeg',100);
 
 %}}}
@@ -34,19 +37,9 @@
 mask=gmtmask(md.mesh.lat,md.mesh.long);
 icemask=ones(md.mesh.numberofvertices,1);
-pos=find(mask==0);
-icemask(pos)=-1;
-pos=find(sum(mask(md.mesh.elements),2)<3);
-icemask(md.mesh.elements(pos,:))=-1;
+icemask(md.mesh.elements(posice,:))=-1;
 md.mask.ice_levelset=icemask;
-md.mask.ocean_levelset=-icemask;
-
-%make sure that the elements that have loads are fully grounded:
-pos=find(md.masstransport.spcthickness);
-md.mask.ocean_levelset(md.mesh.elements(pos,:))=1;
-
-%make sure wherever there is an ice load, that the mask is set to ice:
-pos=find(md.masstransport.spcthickness);
-md.mask.ice_levelset(md.mesh.elements(pos,:))=-1;
-% }}}
+oceanmask=-ones(md.mesh.numberofvertices,1);
+pos=find(mask==0); oceanmask(pos)=1;
+md.mask.ocean_levelset=oceanmask;
 
 % use model representation of ocen area (not the true area)
@@ -56,6 +49,4 @@
 md.initialization.temperature=273.25*ones(md.mesh.numberofvertices,1);
 md.initialization.sealevel=zeros(md.mesh.numberofvertices,1);
-md.initialization.bottompressure=zeros(md.mesh.numberofvertices,1);
-md.initialization.dsl=zeros(md.mesh.numberofvertices,1);
 md.initialization.str=0;
 
@@ -71,8 +62,11 @@
 md.solidearth.settings.reltol=NaN;
 md.solidearth.settings.abstol=1e-3;
-md.solidearth.settings.computesealevelchange=1;
+md.solidearth.settings.computesealevelchange=0;
 md.solidearth.settings.isgrd=1;
 md.solidearth.settings.ocean_area_scaling=0;
 md.solidearth.settings.grdmodel=1;
+md.solidearth.settings.horiz=1;
+md.solidearth.requested_outputs={'Sealevel','Bed', 'BedEast', 'BedNorth'};
+
 
 %Physics: 
@@ -81,12 +75,9 @@
 md.transient.isthermal=0;
 md.transient.ismasstransport=1;
-md.transient.isoceantransport=1;
 md.transient.isslc=1;
-
  
 md.timestepping.start_time=0;
 md.timestepping.time_step=1;
 md.timestepping.final_time=1;
-
 
 %eustatic + rigid + elastic run:
@@ -98,4 +89,7 @@
 md=solve(md,'Transient');
 SnoRotation=md.results.TransientSolution.Sealevel;
+BUnoRotation=md.results.TransientSolution.Bed;
+BEnoRotation=md.results.TransientSolution.BedEast;
+BNnoRotation=md.results.TransientSolution.BedNorth;
 
 %eustatic + rigid + elastic + rotation run:
@@ -107,7 +101,11 @@
 md=solve(md,'Transient');
 SRotation=md.results.TransientSolution.Sealevel;
+BURotation=md.results.TransientSolution.Bed;
+BERotation=md.results.TransientSolution.BedEast;
+BNRotation=md.results.TransientSolution.BedNorth;
 
 %Fields and tolerances to track changes
 field_names     ={'noRotation','Rotation'};
-field_tolerances={1e-13,1e-13};
-field_values={SnoRotation,SRotation};
+field_tolerances={1e-13,1e-13,1e-13,1e-13};
+field_values={SRotation-SnoRotation,BURotation-BUnoRotation,BNRotation-BNnoRotation,BERotation-BEnoRotation};
+
Index: /issm/trunk-jpl/test/NightlyRun/test2007.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test2007.m	(revision 26248)
+++ /issm/trunk-jpl/test/NightlyRun/test2007.m	(revision 26248)
@@ -0,0 +1,73 @@
+%Test Name: offline solid earth solution
+
+%mesh earth:
+md=model;
+md.mesh=gmshplanet('radius',6.371012*10^3,'resolution',700.); %700 km resolution mesh
+
+%Geometry for the bed, arbitrary thickness of 1000: 
+md.geometry.bed=-ones(md.mesh.numberofvertices,1);
+md.geometry.base=md.geometry.bed;
+md.geometry.thickness=zeros(md.mesh.numberofvertices,1);
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+
+%parameterize solidearth solution:
+late=md.mesh.lat;
+longe=md.mesh.long;
+time=0:0.5:5;
+md.solidearth.external=offlinesolidearthsolution;
+md.solidearth.external.displacementup=.5*sind(late).*cosd(late).*cosd(longe) .*time;
+md.solidearth.external.displacementup(end+1,:)=time;
+md.solidearth.external.geoid=-.1*sind(late).*cosd(late).*sind(longe) .*time;
+md.solidearth.external.geoid(end+1,:)=time;
+md.solidearth.external.displacementeast=late .*time;
+md.solidearth.external.displacementeast(end+1,:)=time;
+md.solidearth.external.displacementnorth=longe .*time;
+md.solidearth.external.displacementnorth(end+1,:)=time;
+md.solidearth.external.barystaticsealevel=0*late .*time;
+md.solidearth.external.barystaticsealevel(end+1,:)=time;
+md.initialization.sealevel=zeros(md.mesh.numberofvertices,1);
+
+
+%mask:  {{{
+mask=gmtmask(md.mesh.lat,md.mesh.long);
+md.mask.ice_levelset=ones(md.mesh.numberofvertices,1);
+md.mask.ocean_levelset=ones(md.mesh.numberofvertices,1);
+% }}}
+
+%time stepping: 
+md.timestepping.start_time=time(1);
+md.timestepping.time_step=time(2)-time(1);
+md.timestepping.final_time=time(end);
+
+%Materials: 
+md.materials=materials('hydro');
+
+%Miscellaneous
+md.miscellaneous.name='test2007';
+
+%Solution parameters
+md.cluster.np=3;
+md.solidearth.settings.horiz=1;
+
+%Physics: 
+md.transient.issmb=0; 
+md.transient.isstressbalance=0;
+md.transient.isthermal=0;
+md.transient.ismasstransport=0;
+md.transient.isslc=1;
+md.solidearth.requested_outputs={'Sealevel', 'Bed', 'BedEast', 'BedNorth'};
+
+%eustatic run:
+md=solve(md,'Transient');
+
+for i=length(time)-1;
+Geoid=md.results.TransientSolution(i).Sealevel;
+BedUp=md.results.TransientSolution(i).Bed;
+BedEast=md.results.TransientSolution(i).BedEast;
+BedNorth=md.results.TransientSolution(i).BedNorth;
+end
+
+%Fields and tolerances to track changes
+field_names={'Geoid','BedUp','BedEast','BedNorth'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13};
+field_values={Geoid,BedUp,BedEast,BedNorth};
