Index: /issm/trunk/src/m/utils/Mesh/MeshYams.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/MeshYams.m	(revision 1331)
+++ /issm/trunk/src/m/utils/Mesh/MeshYams.m	(revision 1332)
@@ -1,3 +1,3 @@
-function md=MeshYams
+function md=MeshYams(md,velpath,domainoutline);
 %MESHYAMS - Build model of Antarctica by refining according to observed velocity error estimator
 %
@@ -13,5 +13,5 @@
 gradation=3*ones(nsteps,1);
 epsilon=10^-0;
-domainoutline='DomainOutline.exp';
+scale=1;
 %}
 
@@ -24,30 +24,14 @@
 gradation=[1.5*ones(2,1);3*ones(nsteps-2,1)];
 epsilon=3*10^-0; %3m/a interpolation error
-domainoutline='EnvDomainOutline200km.exp';
+scale=1;
 %%}
-
-velpath='/u/wilkes-r1b/larour/ModelData/RignotAntarcticaVelMosaicRampErsAlos/RignotAntVelSmooth.mat'; scale=1;
-%velpath='/u/wilkes-r1b/larour/ModelData/RignotAntarcticaVel1km/RignotAntVel.mat'; scale=365*24*3600; %(from m/s to m/yr)
-%velpath='/u/wilkes-r1b/larour/ModelData/RignotPigVel1996/RignotPig1996_HoleFree.mat'; scale=1;
-%velpath='/proj/ice/larour/Glaciology/Model_Data/RignotAntarcticaVel1km/RignotAntVel';
-%velpath='/proj/ice/larour/Glaciology/Model_Data/BamberAntarcticaVel1km/velocity';
-%velpath='/proj/ice/larour/Glaciology/Model_Data/mosaicAnt1km_ramp_ers_alos/RignotAntVel';
-
-groundingline='GroundingLine.exp';
-icestreams='Icestream.exp';
-parameterfile='Basins.par';
-
-%clear data
-clear md
-
-%build new model
-md=model;
 
 %mesh with initial resolution
 md=mesh(md,domainoutline,resolution);
-disp(['First mesh, number of elements: ' num2str(md.numberofelements)]);
 
 %load velocities 
 load(velpath);
+
+disp(['First mesh, number of elements: ' num2str(md.numberofelements)]);
 
 %start mesh adaptation
@@ -67,16 +51,2 @@
 	
 disp(['Final mesh, number of elements: ' num2str(md.numberofelements)]);
-md.vx_obs=InterpFromGrid(x_m,y_m,vx,md.x,md.y,0);
-md.vy_obs=InterpFromGrid(x_m,y_m,vy,md.x,md.y,0);
-md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2);
-return;
-
-%parameterize model
-disp('Parameterizing');
-md=geography(md,groundingline,icestreams);
-md=parameterize(md,parameterfile);
-
-%md.vx_obs=DataInterp(x_m,y_m,vx*md.yts,md.x,md.y);
-%md.vy_obs=DataInterp(x_m,y_m,vy*md.yts,md.x,md.y);
-%md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2);
-%return;
