Changeset 18203
- Timestamp:
- 06/30/14 18:19:51 (11 years ago)
- Location:
- issm/trunk-jpl/examples
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/examples/ISMIP/CheatyRunme.m
r18198 r18203 3 3 %step 8 is specific to ISMIPF 4 4 5 steps=[1 2 3 4 5 6 8];5 steps=[1:7]; 6 6 7 7 % parameter file to be used, choose between CheatyIsmipA.par or CheatyIsmipF.par 8 8 ParamFile='CheatyIsmipF.par' 9 9 10 name_prefix='ISMIP';11 10 %Run Steps 12 org=organizer('repository','./Models','prefix',name_prefix,'steps',steps);13 11 14 12 % {{{ Mesh Generation #1 15 if perform(org,'Mesh_Generation')13 if any(steps==1) 16 14 17 15 %initialize md as a new model #help model … … 31 29 % save the given model 32 30 %-> 33 save model(org,md);31 save ./Models/ISMIP.Mesh_generation md; 34 32 end 35 33 % }}} 36 34 37 35 % {{{ Masks #2 38 if perform(org,'SetMask'),39 40 % load the preceding step #help loadmodel 41 % path is given by the organizer with the name of the given step 42 %-> 43 md =loadmodel(org,'Mesh_Generation');36 if any(steps==2) 37 38 % load the preceding step #help loadmodel 39 % path is given by the organizer with the name of the given step 40 %-> 41 md = loadmodel('./Models/ISMIP.Mesh_generation'); 44 42 % set the mask #help setmask 45 43 % all MISMIP nodes are grounded … … 51 49 % save the given model 52 50 %-> 53 save model(org,md);51 save ./Models/ISMIP.SetMask md; 54 52 end 55 53 % }}} 56 54 57 55 % {{{ Parameterization #3 58 if perform(org,'Parameterization')59 60 % load the preceding step #help loadmodel 61 % path is given by the organizer with the name of the given step 62 %-> 63 md =loadmodel(org,'SetMask');56 if any(steps==3) 57 58 % load the preceding step #help loadmodel 59 % path is given by the organizer with the name of the given step 60 %-> 61 md = loadmodel('./Models/ISMIP.SetMask'); 64 62 % parametrize the model # help parameterize 65 63 % you will need to fil-up the parameter file defined by the 66 64 % ParamFile variable 67 65 %-> 68 66 md=parameterize(md,ParamFile); 69 67 % save the given model 70 68 %-> 71 save model(org,md);69 save ./Models/ISMIP.Parameterization md; 72 70 end 73 71 % }}} 74 72 75 73 % {{{ Extrusion #4 76 if perform(org,'Extrusion')74 if any(steps==4) 77 75 78 76 % load the preceding step #help loadmodel 79 77 % path is given by the organizer with the name of the given step 80 78 %-> 81 md =loadmodel(org,'Parameterization');79 md = loadmodel('./Models/ISMIP.Parameterization'); 82 80 % vertically extrude the preceding mesh #help extrude 83 81 % only 5 layers exponent 1 … … 89 87 % save the given model 90 88 %-> 91 save model(org,md);89 save ./Models/ISMIP.Extrusion md; 92 90 end 93 91 % }}} 94 92 95 93 % {{{ Set the flow computing method #5 96 97 if perform(org,'SetFlow') 98 99 % load the preceding step #help loadmodel 100 % path is given by the organizer with the name of the given step 101 %-> 102 md=loadmodel(org,'Extrusion'); 94 if any(steps==5) 95 96 % load the preceding step #help loadmodel 97 % path is given by the organizer with the name of the given step 98 %-> 99 md = loadmodel('./Models/ISMIP.Extrusion'); 103 100 % set the approximation for the flow computation #help setflowequation 104 101 % We will be using the Higher Order Model (HO) … … 107 104 % save the given model 108 105 %-> 109 save model(org,md);106 save ./Models/ISMIP.SetFlow md; 110 107 end 111 108 % }}} 112 109 113 110 % {{{ Set Boundary Conditions #6 114 if perform(org,'BoundaryCondition')115 116 % load the preceding step #help loadmodel 117 % path is given by the organizer with the name of the given step 118 %-> 119 md =loadmodel(org,'SetFlow');111 if any(steps==6) 112 113 % load the preceding step #help loadmodel 114 % path is given by the organizer with the name of the given step 115 %-> 116 md = loadmodel('./Models/ISMIP.SetFlow'); 120 117 % dirichlet boundary condition are known as SPCs 121 118 % ice frozen to the base, no velocity #md.stressbalance … … 130 127 %-> 131 128 basalnodes=find(md.mesh.vertexonbase); 132 129 % set the sliding to zero on the bed 133 130 %-> 134 131 md.stressbalance.spcvx(basalnodes)=0.0; … … 162 159 % save the given model 163 160 %-> 164 save model(org,md);161 save ./Models/ISMIP.BoundaryCondition md; 165 162 end 166 163 % }}} 167 164 168 165 % {{{ Solving #7 169 if perform(org,'SolvingISMIPA')170 % load the preceding step #help loadmodel 171 % path is given by the organizer with the name of the given step 172 %-> 173 md =loadmodel(org,'BoundaryCondition');166 if any(steps==7) 167 % load the preceding step #help loadmodel 168 % path is given by the organizer with the name of the given step 169 %-> 170 md = loadmodel('./Models/ISMIP.BoundaryCondition'); 174 171 % Set cluster #md.cluster 175 172 % generic parameters #help generic … … 186 183 % save the given model 187 184 %-> 188 save model(org,md);185 save ./Models/ISMIP.StressBalance md; 189 186 % plot the surface velocities #plotdoc 190 187 %-> … … 194 191 195 192 % {{{ Solving #8 196 if perform(org,'SolvingISMIPF')197 % load the preceding step #help loadmodel 198 % path is given by the organizer with the name of the given step 199 %-> 200 md =loadmodel(org,'BoundaryCondition');193 if any(steps==8) 194 % load the preceding step #help loadmodel 195 % path is given by the organizer with the name of the given step 196 %-> 197 md = loadmodel('./Models/ISMIP.BoundaryCondition'); 201 198 % Set cluster #md.cluster 202 199 % generic parameters #help generic … … 225 222 % save the given model 226 223 %-> 227 save model(org,md);224 save ./Models/ISMIP.Transient md; 228 225 % plot the surface velocities #plotdoc 229 226 %-> -
issm/trunk-jpl/examples/ISMIP/runme.m
r18198 r18203 8 8 ParamFile='IsmipA.par' 9 9 10 name_prefix='ISMIP';11 10 %Run Steps 12 org=organizer('repository','./Models','prefix',name_prefix,'steps',steps);13 11 14 12 % {{{ Mesh Generation #1 15 if perform(org,'Mesh_Generation')13 if any(steps==1) 16 14 17 15 %initialize md as a new model #help model … … 32 30 33 31 % {{{ Masks #2 34 if perform(org,'SetMask'),32 if any(steps==2) 35 33 36 34 % load the preceding step #help loadmodel … … 52 50 53 51 % {{{ Parameterization #3 54 if perform(org,'Parameterization')52 if any(steps==3) 55 53 56 54 % load the preceding step #help loadmodel … … 70 68 71 69 % {{{ Extrusion #4 72 if perform(org,'Extrusion')70 if any(steps==4) 73 71 74 72 % load the preceding step #help loadmodel … … 91 89 % {{{ Set the flow computing method #5 92 90 93 if perform(org,'SetFlow')91 if any(steps==5) 94 92 95 93 % load the preceding step #help loadmodel … … 108 106 109 107 % {{{ Set Boundary Conditions #6 110 if perform(org,'BoundaryCondition')108 if any(steps==6) 111 109 112 110 % load the preceding step #help loadmodel … … 162 160 163 161 % {{{ Solving #7 164 if perform(org,'SolvingISMIPA')162 if any(steps==7) 165 163 % load the preceding step #help loadmodel 166 164 % path is given by the organizer with the name of the given step … … 188 186 189 187 % {{{ Solving #8 190 if perform(org,'SolvingISMIPF')188 if any(steps==8) 191 189 % load the preceding step #help loadmodel 192 190 % path is given by the organizer with the name of the given step -
issm/trunk-jpl/examples/Inversion/runme.m
r18198 r18203 1 step= 1;1 step=3; 2 2 if step==1 3 3 %Generate observation … … 47 47 md.inversion.control_parameters = {'FrictionCoefficient'}; 48 48 md.inversion.maxsteps = maxsteps; 49 49 md.inversion.dxmin=10^-6; 50 50 md.inversion.cost_functions = [103 501]; 51 51 md.inversion.cost_functions_coefficients = ones(md.mesh.numberofvertices,2); 52 52 md.inversion.cost_functions_coefficients(:,2)=0; 53 53 md.inversion.min_parameters = 10^-5*ones(md.mesh.numberofvertices,1); 54 54 md.inversion.max_parameters = 100*ones(md.mesh.numberofvertices,1); -
issm/trunk-jpl/examples/UncertaintyQuantification/runme.m
r18198 r18203 1 1 %PIG Uncertainty Quantification Application 2 steps=[3]; eval(['addpath ' pwd]);2 steps=[3]; 3 3 4 4 if any(steps==1) 5 5 disp(' Step 1: plot flux gates'); 6 6 7 md = loadmodel('../ Data/PIG.Control_drag_default');7 md = loadmodel('../Pig/Models/PIG.Control_drag'); 8 8 9 9 texts=cell(1,13); … … 11 11 12 12 for i=1:13, 13 contour=expread(['./ Exp_Par/MassFluxes/MassFlux' num2str(i) '.exp']);13 contour=expread(['./MassFluxes/MassFlux' num2str(i) '.exp']); 14 14 textpositions{i}=[contour.x(end) contour.y(end)]; 15 15 end 16 16 17 17 plotmodel(md,'data',md.results.StressbalanceSolution.Vel,'log',10,'expdisp',... 18 {' Exp_Par/MassFluxes/MassFlux1.exp','Exp_Par/MassFluxes/MassFlux2.exp',...19 ' Exp_Par/MassFluxes/MassFlux3.exp','Exp_Par/MassFluxes/MassFlux4.exp',...20 ' Exp_Par/MassFluxes/MassFlux5.exp','Exp_Par/MassFluxes/MassFlux6.exp',...21 ' Exp_Par/MassFluxes/MassFlux7.exp','Exp_Par/MassFluxes/MassFlux8.exp',...22 ' Exp_Par/MassFluxes/MassFlux9.exp','Exp_Par/MassFluxes/MassFlux10.exp',...23 ' Exp_Par/MassFluxes/MassFlux11.exp','Exp_Par/MassFluxes/MassFlux12.exp',...24 ' Exp_Par/MassFluxes/MassFlux13.exp'},...18 {'MassFluxes/MassFlux1.exp','MassFluxes/MassFlux2.exp',... 19 'MassFluxes/MassFlux3.exp','MassFluxes/MassFlux4.exp',... 20 'MassFluxes/MassFlux5.exp','MassFluxes/MassFlux6.exp',... 21 'MassFluxes/MassFlux7.exp','MassFluxes/MassFlux8.exp',... 22 'MassFluxes/MassFlux9.exp','MassFluxes/MassFlux10.exp',... 23 'MassFluxes/MassFlux11.exp','MassFluxes/MassFlux12.exp',... 24 'MassFluxes/MassFlux13.exp'},... 25 25 'expstyle',{'k-','k-','k-','k-','k-','k-','k-',... 26 26 'k-','k-','k-','k-','k-','k-'},'linewidth',2,... … … 33 33 disp(' Step 2: compute cross overs from CRESIS'); 34 34 35 md = loadmodel('../ Data/PIG.Control_drag_default');35 md = loadmodel('../Pig/Models/PIG.Control_drag'); 36 36 37 37 %load cross overs: CRESIS McCord Antarctica, 2009 (courtesy of John Paden) … … 45 45 46 46 %filter out unrealistic error ranges 47 flags=ContourToNodes(md.mesh.x,md.mesh.y,'E xp_Par/ErrorContour.exp',1);47 flags=ContourToNodes(md.mesh.x,md.mesh.y,'ErrorContour.exp',1); 48 48 pos=find(~flags); DeltaHH(pos)=0; 49 49 … … 64 64 65 65 %load model and cross over errors 66 md = loadmodel('../ Data/PIG.Control_drag_default');66 md = loadmodel('../Pig/Models/PIG.Control_drag'); 67 67 load -mat Models/PIG.CrossOvers 68 68 … … 123 123 'MassFlux12.exp',... 124 124 'MassFlux13.exp'}; 125 md.qmu.mass_flux_profile_directory='../ Exp_Par/MassFluxes/';125 md.qmu.mass_flux_profile_directory='../MassFluxes/'; 126 126 127 127 %% sampling analysis … … 152 152 153 153 %load model 154 md = loadmodel('../ Data/PIG.Control_drag_default');154 md = loadmodel('../Pig/Models/PIG.Control_drag'); 155 155 156 156 %partition the mesh … … 197 197 'MassFlux12.exp',... 198 198 'MassFlux13.exp'}; 199 md.qmu.mass_flux_profile_directory='../ Exp_Par/MassFluxes/';199 md.qmu.mass_flux_profile_directory='../MassFluxes/'; 200 200 201 201 %method: local reliability … … 268 268 269 269 plotmodel(md,'data',sh,'data',sa,'data',sb,'expdisp#all',... 270 [' Exp_Par/MassFluxes/MassFlux' num2str(index) '.exp'],...270 ['MassFluxes/MassFlux' num2str(index) '.exp'],... 271 271 'expstyle#all','b-','linewidth#all',2,... 272 272 'nlines',3,'ncols',1, 'axis#all','image',... … … 281 281 282 282 plotmodel(md,'data',ifh,'data',ifa,'data',ifb,'expdisp#all',... 283 [' Exp_Par/MassFluxes/MassFlux' num2str(index) '.exp'],...283 ['MassFluxes/MassFlux' num2str(index) '.exp'],... 284 284 'expstyle#all','b-','linewidth#all',2,'log#all',10,... 285 285 'nlines',3,'ncols',1, 'axis#all','image','caxis#all',[1e-10 1],...
Note:
See TracChangeset
for help on using the changeset viewer.