Index: ../trunk-jpl/examples/ISMIP/CheatyRunme.m =================================================================== --- ../trunk-jpl/examples/ISMIP/CheatyRunme.m (revision 18202) +++ ../trunk-jpl/examples/ISMIP/CheatyRunme.m (revision 18203) @@ -2,17 +2,15 @@ %step 7 is specific to ISMIPA %step 8 is specific to ISMIPF -steps=[1 2 3 4 5 6 8]; +steps=[1:7]; % parameter file to be used, choose between CheatyIsmipA.par or CheatyIsmipF.par ParamFile='CheatyIsmipF.par' -name_prefix='ISMIP'; %Run Steps -org=organizer('repository','./Models','prefix',name_prefix,'steps',steps); % {{{ Mesh Generation #1 -if perform(org,'Mesh_Generation') +if any(steps==1) %initialize md as a new model #help model %-> @@ -30,17 +28,17 @@ plotmodel(md,'data','mesh') % save the given model %-> - savemodel(org,md); + save ./Models/ISMIP.Mesh_generation md; end % }}} % {{{ Masks #2 -if perform(org,'SetMask'), +if any(steps==2) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step %-> - md=loadmodel(org,'Mesh_Generation'); + md = loadmodel('./Models/ISMIP.Mesh_generation'); % set the mask #help setmask % all MISMIP nodes are grounded %-> @@ -50,35 +48,35 @@ plotmodel(md,'data',md.mask.groundedice_levelset); % save the given model %-> - savemodel(org,md); + save ./Models/ISMIP.SetMask md; end % }}} % {{{ Parameterization #3 -if perform(org,'Parameterization') +if any(steps==3) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step %-> - md=loadmodel(org,'SetMask'); + md = loadmodel('./Models/ISMIP.SetMask'); % parametrize the model # help parameterize % you will need to fil-up the parameter file defined by the - % ParamFile variable + % ParamFile variable %-> md=parameterize(md,ParamFile); % save the given model %-> - savemodel(org,md); + save ./Models/ISMIP.Parameterization md; end % }}} % {{{ Extrusion #4 -if perform(org,'Extrusion') +if any(steps==4) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step %-> - md=loadmodel(org,'Parameterization'); + md = loadmodel('./Models/ISMIP.Parameterization'); % vertically extrude the preceding mesh #help extrude % only 5 layers exponent 1 %-> @@ -88,35 +86,34 @@ plotmodel(md,'data',md.geometry.base) % save the given model %-> - savemodel(org,md); + save ./Models/ISMIP.Extrusion md; end % }}} % {{{ Set the flow computing method #5 +if any(steps==5) -if perform(org,'SetFlow') - % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step %-> - md=loadmodel(org,'Extrusion'); + md = loadmodel('./Models/ISMIP.Extrusion'); % set the approximation for the flow computation #help setflowequation % We will be using the Higher Order Model (HO) %-> md=setflowequation(md,'HO','all'); % save the given model %-> - savemodel(org,md); + save ./Models/ISMIP.SetFlow md; end % }}} % {{{ Set Boundary Conditions #6 -if perform(org,'BoundaryCondition') +if any(steps==6) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step %-> - md=loadmodel(org,'SetFlow'); + md = loadmodel('./Models/ISMIP.SetFlow'); % dirichlet boundary condition are known as SPCs % ice frozen to the base, no velocity #md.stressbalance % SPCs are initialized at NaN one value per vertex @@ -129,7 +126,7 @@ % extract the nodenumbers at the base #md.mesh.vertexonbase %-> basalnodes=find(md.mesh.vertexonbase); - % set the sliding to zero on the bed + % set the sliding to zero on the bed %-> md.stressbalance.spcvx(basalnodes)=0.0; %-> @@ -161,16 +158,16 @@ end % save the given model %-> - savemodel(org,md); + save ./Models/ISMIP.BoundaryCondition md; end % }}} % {{{ Solving #7 -if perform(org,'SolvingISMIPA') +if any(steps==7) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step %-> - md=loadmodel(org,'BoundaryCondition'); + md = loadmodel('./Models/ISMIP.BoundaryCondition'); % Set cluster #md.cluster % generic parameters #help generic % set only the name and number of process @@ -185,7 +182,7 @@ md=solve(md,StressbalanceSolutionEnum()); % save the given model %-> - savemodel(org,md); + save ./Models/ISMIP.StressBalance md; % plot the surface velocities #plotdoc %-> plotmodel(md,'data',md.results.StressbalanceSolution.Vel) @@ -193,11 +190,11 @@ % }}} % {{{ Solving #8 -if perform(org,'SolvingISMIPF') +if any(steps==8) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step %-> - md=loadmodel(org,'BoundaryCondition'); + md = loadmodel('./Models/ISMIP.BoundaryCondition'); % Set cluster #md.cluster % generic parameters #help generic % set only the name and number of process @@ -224,7 +221,7 @@ md=solve(md,TransientSolutionEnum); % save the given model %-> - savemodel(org,md); + save ./Models/ISMIP.Transient md; % plot the surface velocities #plotdoc %-> plotmodel(md,'data',md.results.TransientSolution(20).Vel) Index: ../trunk-jpl/examples/ISMIP/CheatyIsmipA.par =================================================================== --- ../trunk-jpl/examples/ISMIP/CheatyIsmipA.par (revision 18202) +++ ../trunk-jpl/examples/ISMIP/CheatyIsmipA.par (revision 18203) @@ -49,4 +49,4 @@ %Set the default boundary conditions for an ice-sheet % #help SetIceSheetBC %-> -md=SetIceSheetBC(md); \ No newline at end of file +md=SetIceSheetBC(md); Index: ../trunk-jpl/examples/ISMIP/runme.m =================================================================== --- ../trunk-jpl/examples/ISMIP/runme.m (revision 18202) +++ ../trunk-jpl/examples/ISMIP/runme.m (revision 18203) @@ -7,12 +7,10 @@ % parameter file to be used, choose between IsmipA.par or IsmipF.par ParamFile='IsmipA.par' -name_prefix='ISMIP'; %Run Steps -org=organizer('repository','./Models','prefix',name_prefix,'steps',steps); % {{{ Mesh Generation #1 -if perform(org,'Mesh_Generation') +if any(steps==1) %initialize md as a new model #help model %-> @@ -31,7 +29,7 @@ % }}} % {{{ Masks #2 -if perform(org,'SetMask'), +if any(steps==2) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step @@ -51,7 +49,7 @@ % }}} % {{{ Parameterization #3 -if perform(org,'Parameterization') +if any(steps==3) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step @@ -69,7 +67,7 @@ % }}} % {{{ Extrusion #4 -if perform(org,'Extrusion') +if any(steps==4) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step @@ -90,7 +88,7 @@ % {{{ Set the flow computing method #5 -if perform(org,'SetFlow') +if any(steps==5) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step @@ -107,7 +105,7 @@ % }}} % {{{ Set Boundary Conditions #6 -if perform(org,'BoundaryCondition') +if any(steps==6) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step @@ -161,7 +159,7 @@ % }}} % {{{ Solving #7 -if perform(org,'SolvingISMIPA') +if any(steps==7) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step %-> @@ -187,7 +185,7 @@ % }}} % {{{ Solving #8 -if perform(org,'SolvingISMIPF') +if any(steps==8) % load the preceding step #help loadmodel % path is given by the organizer with the name of the given step %-> Index: ../trunk-jpl/examples/ISMIP/CheatyIsmipF.par =================================================================== --- ../trunk-jpl/examples/ISMIP/CheatyIsmipF.par (revision 18202) +++ ../trunk-jpl/examples/ISMIP/CheatyIsmipF.par (revision 18203) @@ -63,4 +63,4 @@ %-> md.initialization.vz=zeros(md.mesh.numberofvertices,1); %-> -md.initialization.pressure=zeros(md.mesh.numberofvertices,1); \ No newline at end of file +md.initialization.pressure=zeros(md.mesh.numberofvertices,1); Index: ../trunk-jpl/examples/UncertaintyQuantification/runme.m =================================================================== --- ../trunk-jpl/examples/UncertaintyQuantification/runme.m (revision 18202) +++ ../trunk-jpl/examples/UncertaintyQuantification/runme.m (revision 18203) @@ -1,27 +1,27 @@ %PIG Uncertainty Quantification Application -steps=[3]; eval(['addpath ' pwd]); +steps=[3]; if any(steps==1) disp(' Step 1: plot flux gates'); - md = loadmodel('../Data/PIG.Control_drag_default'); + md = loadmodel('../Pig/Models/PIG.Control_drag'); texts=cell(1,13); textpositions=cell(1,13); for i=1:13, - contour=expread(['./Exp_Par/MassFluxes/MassFlux' num2str(i) '.exp']); + contour=expread(['./MassFluxes/MassFlux' num2str(i) '.exp']); textpositions{i}=[contour.x(end) contour.y(end)]; end plotmodel(md,'data',md.results.StressbalanceSolution.Vel,'log',10,'expdisp',... - {'Exp_Par/MassFluxes/MassFlux1.exp','Exp_Par/MassFluxes/MassFlux2.exp',... - 'Exp_Par/MassFluxes/MassFlux3.exp','Exp_Par/MassFluxes/MassFlux4.exp',... - 'Exp_Par/MassFluxes/MassFlux5.exp','Exp_Par/MassFluxes/MassFlux6.exp',... - 'Exp_Par/MassFluxes/MassFlux7.exp','Exp_Par/MassFluxes/MassFlux8.exp',... - 'Exp_Par/MassFluxes/MassFlux9.exp','Exp_Par/MassFluxes/MassFlux10.exp',... - 'Exp_Par/MassFluxes/MassFlux11.exp','Exp_Par/MassFluxes/MassFlux12.exp',... - 'Exp_Par/MassFluxes/MassFlux13.exp'},... + {'MassFluxes/MassFlux1.exp','MassFluxes/MassFlux2.exp',... + 'MassFluxes/MassFlux3.exp','MassFluxes/MassFlux4.exp',... + 'MassFluxes/MassFlux5.exp','MassFluxes/MassFlux6.exp',... + 'MassFluxes/MassFlux7.exp','MassFluxes/MassFlux8.exp',... + 'MassFluxes/MassFlux9.exp','MassFluxes/MassFlux10.exp',... + 'MassFluxes/MassFlux11.exp','MassFluxes/MassFlux12.exp',... + 'MassFluxes/MassFlux13.exp'},... 'expstyle',{'k-','k-','k-','k-','k-','k-','k-',... 'k-','k-','k-','k-','k-','k-'},'linewidth',2,... 'text',{'1','2','3','4','5','6','7',... @@ -32,7 +32,7 @@ if any(steps==2) disp(' Step 2: compute cross overs from CRESIS'); - md = loadmodel('../Data/PIG.Control_drag_default'); + md = loadmodel('../Pig/Models/PIG.Control_drag'); %load cross overs: CRESIS McCord Antarctica, 2009 (courtesy of John Paden) load('../Data/CrossOvers2009.mat'); @@ -44,7 +44,7 @@ pos=find(isnan(DeltaHH)); DeltaHH(pos)=0; %filter out unrealistic error ranges - flags=ContourToNodes(md.mesh.x,md.mesh.y,'Exp_Par/ErrorContour.exp',1); + flags=ContourToNodes(md.mesh.x,md.mesh.y,'ErrorContour.exp',1); pos=find(~flags); DeltaHH(pos)=0; %avoid large unrealistic values @@ -63,7 +63,7 @@ disp(' Step 3: sampling analysis'); %load model and cross over errors - md = loadmodel('../Data/PIG.Control_drag_default'); + md = loadmodel('../Pig/Models/PIG.Control_drag'); load -mat Models/PIG.CrossOvers %partition the mesh @@ -122,7 +122,7 @@ 'MassFlux11.exp',... 'MassFlux12.exp',... 'MassFlux13.exp'}; - md.qmu.mass_flux_profile_directory='../Exp_Par/MassFluxes/'; + md.qmu.mass_flux_profile_directory='../MassFluxes/'; %% sampling analysis md.qmu.method =dakota_method('nond_samp'); @@ -151,7 +151,7 @@ disp(' Step 4: sensitivity analysis'); %load model - md = loadmodel('../Data/PIG.Control_drag_default'); + md = loadmodel('../Pig/Models/PIG.Control_drag'); %partition the mesh md.qmu.numberofpartitions=10; @@ -196,7 +196,7 @@ 'MassFlux11.exp',... 'MassFlux12.exp',... 'MassFlux13.exp'}; - md.qmu.mass_flux_profile_directory='../Exp_Par/MassFluxes/'; + md.qmu.mass_flux_profile_directory='../MassFluxes/'; %method: local reliability md.qmu.method =dakota_method('nond_l'); @@ -267,7 +267,7 @@ sh=md.results.dakota.dresp_out(index).sens(21:30); sh=sh(md.qmu.partition+1)/1e12*60*60*24*365; plotmodel(md,'data',sh,'data',sa,'data',sb,'expdisp#all',... - ['Exp_Par/MassFluxes/MassFlux' num2str(index) '.exp'],... + ['MassFluxes/MassFlux' num2str(index) '.exp'],... 'expstyle#all','b-','linewidth#all',2,... 'nlines',3,'ncols',1, 'axis#all','image',... 'colorbar#all','on','colorbarfontsize#all',10,... @@ -280,7 +280,7 @@ ifh=importancefactors(md,'scaled_Thickness',['indexed_MassFlux_' num2str(index)]); plotmodel(md,'data',ifh,'data',ifa,'data',ifb,'expdisp#all',... - ['Exp_Par/MassFluxes/MassFlux' num2str(index) '.exp'],... + ['MassFluxes/MassFlux' num2str(index) '.exp'],... 'expstyle#all','b-','linewidth#all',2,'log#all',10,... 'nlines',3,'ncols',1, 'axis#all','image','caxis#all',[1e-10 1],... 'colorbar#all','on','colorbarfontsize#all',10,... Index: ../trunk-jpl/examples/Inversion/runme.m =================================================================== --- ../trunk-jpl/examples/Inversion/runme.m (revision 18202) +++ ../trunk-jpl/examples/Inversion/runme.m (revision 18203) @@ -1,4 +1,4 @@ -step=1; +step=3; if step==1 %Generate observation md = model; @@ -46,10 +46,10 @@ md.inversion.iscontrol = 1; md.inversion.control_parameters = {'FrictionCoefficient'}; md.inversion.maxsteps = maxsteps; - md.inversion.dxmin=10^-6; + md.inversion.dxmin=10^-6; md.inversion.cost_functions = [103 501]; md.inversion.cost_functions_coefficients = ones(md.mesh.numberofvertices,2); - md.inversion.cost_functions_coefficients(:,2)=0; + md.inversion.cost_functions_coefficients(:,2)=0; md.inversion.min_parameters = 10^-5*ones(md.mesh.numberofvertices,1); md.inversion.max_parameters = 100*ones(md.mesh.numberofvertices,1);