Changeset 25986
- Timestamp:
- 02/07/21 00:19:47 (4 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 1 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/examples/AMR/runme.m
r25915 r25986 67 67 68 68 save AMRTransient md 69 end % }}}69 end -
issm/trunk-jpl/examples/EsaGRACE/runme.m
r25915 r25986 4 4 steps=[1]; % [1:5] 5 5 6 if any(steps==1) %{{{6 if any(steps==1) 7 7 disp(' Step 1: Global mesh creation'); 8 8 … … 18 18 19 19 plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k'); 20 end %}}}20 end 21 21 22 if any(steps==2) %{{{22 if any(steps==2) 23 23 disp(' Step 2: Define loads in meters of ice height equivalent'); 24 24 md = loadmodel('./Models/EsaGRACE_Mesh'); … … 36 36 'view',[90 -90],'caxis',[-.1 .1],... 37 37 'title','Ice height equivalent [m]'); 38 end %}}}38 end 39 39 40 if any(steps==3) %{{{40 if any(steps==3) 41 41 disp(' Step 3: Parameterization'); 42 42 md = loadmodel('./Models/EsaGRACE_Loads'); … … 65 65 66 66 save ./Models/EsaGRACE_Parameterization md; 67 end %}}}67 end 68 68 69 if any(steps==4) %{{{69 if any(steps==4) 70 70 disp(' Step 4: Solve Esa solver'); 71 71 md = loadmodel('./Models/EsaGRACE_Parameterization'); … … 79 79 80 80 save ./Models/EsaGRACE_Solution md; 81 end %}}}81 end 82 82 83 if any(steps==5) %{{{83 if any(steps==5) 84 84 disp(' Step 5: Plot solutions'); 85 85 md = loadmodel('./Models/EsaGRACE_Solution'); … … 140 140 %export_fig(fig_name{kk}); 141 141 end 142 end %}}}142 end -
issm/trunk-jpl/examples/EsaWahr/runme.m
r25915 r25986 4 4 steps=[1]; % [1:7] 5 5 6 if any(steps==1) %{{{6 if any(steps==1) 7 7 disp(' Step 1: Mesh creation'); 8 8 … … 12 12 13 13 plotmodel(md,'data','mesh'); 14 end %}}}14 end 15 15 16 if any(steps==2) %{{{16 if any(steps==2) 17 17 disp(' Step 2: Anisotropic mesh creation'); 18 18 … … 28 28 29 29 plotmodel (md,'data','mesh'); 30 end %}}}30 end 31 31 32 if any(steps==3) %{{{32 if any(steps==3) 33 33 disp(' Step 3: Define loads'); 34 34 md = loadmodel('./Models/EsaWahr_Mesh'); … … 48 48 49 49 plotmodel (md,'data',md.esa.deltathickness,'title','Ice height equivalent [m]'); 50 end %}}}50 end 51 51 52 if any(steps==4) %{{{52 if any(steps==4) 53 53 disp(' Step 4: Parameterization'); 54 54 md = loadmodel('./Models/EsaWahr_Loads'); … … 74 74 75 75 save ./Models/EsaWahr_Parameterization md; 76 end %}}}76 end 77 77 78 if any(steps==5) %{{{78 if any(steps==5) 79 79 disp(' Step 5: Solve Esa solver'); 80 80 md = loadmodel('./Models/EsaWahr_Parameterization'); … … 88 88 89 89 save ./Models/EsaWahr_Solution md; 90 end %}}}90 end 91 91 92 if any(steps==6) %{{{92 if any(steps==6) 93 93 disp(' Step 6: Plot solutions'); 94 94 md = loadmodel('./Models/EsaWahr_Solution'); … … 121 121 'colorbarpos',[0.53,0.065,0.18,0.02],'colorbartitle#4','East-west [mm]'); 122 122 %export_fig('Fig5.pdf'); 123 end %}}}123 end 124 124 125 if any(steps==7) %{{{125 if any(steps==7) 126 126 disp(' Step 7: Compare results against Wahr semi-analytic solutions'); 127 127 md = loadmodel('./Models/EsaWahr_Solution'); … … 162 162 set(gcf,'color','w'); 163 163 %export_fig('Fig6.pdf'); 164 end %}}}164 end -
issm/trunk-jpl/examples/Greenland/runme.m
r25915 r25986 5 5 ncdata='../Data/Greenland_5km_dev1.2.nc'; 6 6 7 if any(steps==1) %{{{7 if any(steps==1) 8 8 disp(' Step 1: Mesh creation'); 9 9 … … 29 29 30 30 plotmodel (md,'data','mesh'); 31 end %}}}32 33 if any(steps==2) %{{{31 end 32 33 if any(steps==2) 34 34 disp(' Step 2: Parameterization'); 35 35 md = loadmodel('./Models/Greenland.Mesh_generation'); … … 40 40 41 41 save ./Models/Greenland.Parameterization md; 42 end %}}}43 44 if any(steps==3) %{{{42 end 43 44 if any(steps==3) 45 45 disp(' Step 3: Control method friction'); 46 46 md = loadmodel('./Models/Greenland.Parameterization'); … … 79 79 80 80 save ./Models/Greenland.Control_drag md; 81 end %}}}82 83 if any(steps==4) %{{{81 end 82 83 if any(steps==4) 84 84 disp(' Step 4: Transient run'); 85 85 md = loadmodel('./Models/Greenland.Control_drag'); … … 109 109 110 110 save ./Models/Greenland.Transient md; 111 end %}}}112 113 if any(steps==5) %{{{111 end 112 113 if any(steps==5) 114 114 disp(' Step 5: Plotting'); 115 115 md = loadmodel('./Models/Greenland.Transient'); … … 142 142 subplot(3,1,3); plot([0.2:0.2:20],volume); title('Ice Volume'); 143 143 xlabel('years') 144 end %}}}145 146 if any(steps==6) %{{{144 end 145 146 if any(steps==6) 147 147 disp(' Step 6: Extract Box SMB'); 148 148 md = loadmodel('./Models/Greenland.Transient'); … … 171 171 172 172 clear smbbox 173 end %}}}174 175 if any(steps==7) %{{{173 end 174 175 if any(steps==7) 176 176 disp(' Step 7: Historical Relaxation run'); 177 177 md = loadmodel('./Models/Greenland.Control_drag'); … … 206 206 end % step 7 end 207 207 208 if any(steps==8) %{{{208 if any(steps==8) 209 209 disp(' Step 8: Plotting exercise'); 210 210 … … 234 234 end % step 8 end 235 235 236 if any(steps==9) %{{{236 if any(steps==9) 237 237 disp(' Step 9: Box Transient run'); 238 238 md = loadmodel('./Models/Greenland.HistoricTransient_200yr'); … … 287 287 288 288 save ./Models/Greenland.BoxTransient md; 289 end %}}}290 291 if any(steps==10) %{{{289 end 290 291 if any(steps==10) 292 292 disp(' Step 10: Plot Box Transient'); 293 293 md = loadmodel('./Models/Greenland.BoxTransient'); … … 313 313 subplot(3,1,3); plot(t,volume); title('Ice Volume'); 314 314 xlabel('years') 315 end %}}}315 end -
issm/trunk-jpl/examples/ISMIP/runme.m
r25959 r25986 11 11 12 12 %Mesh Generation #1 13 if any(steps==1) %{{{13 if any(steps==1) 14 14 15 15 %initialize md as a new model #help model … … 26 26 %-> 27 27 28 end %}}}28 end 29 29 30 30 %Masks #2 31 if any(steps==2) %{{{31 if any(steps==2) 32 32 33 33 % load the preceding step #help loadmodel … … 45 45 %-> 46 46 47 end %}}}47 end 48 48 49 49 %Parameterization #3 50 if any(steps==3) %{{{50 if any(steps==3) 51 51 52 52 % load the preceding step #help loadmodel … … 62 62 %-> 63 63 64 end %}}}64 end 65 65 66 66 %Extrusion #4 67 if any(steps==4) %{{{67 if any(steps==4) 68 68 69 69 % load the preceding step #help loadmodel … … 81 81 %-> 82 82 83 end %}}}83 end 84 84 85 85 %Set the flow computing method #5 86 if any(steps==5) %{{{86 if any(steps==5) 87 87 88 88 % load the preceding step #help loadmodel … … 97 97 %-> 98 98 99 end %}}}99 end 100 100 101 101 %Set Boundary Conditions #6 102 if any(steps==6) %{{{102 if any(steps==6) 103 103 104 104 % load the preceding step #help loadmodel … … 150 150 %-> 151 151 152 end %}}}152 end 153 153 154 154 %Solving #7 155 if any(steps==7) %{{{155 if any(steps==7) 156 156 % load the preceding step #help loadmodel 157 157 % path is given by the organizer with the name of the given step … … 175 175 % plot the surface velocities #plotdoc 176 176 %-> 177 end %}}}177 end 178 178 179 179 %Solving #8 180 if any(steps==8) %{{{180 if any(steps==8) 181 181 % load the preceding step #help loadmodel 182 182 % path is given by the organizer with the name of the given step … … 212 212 % plot the surface velocities #plotdoc 213 213 %-> 214 end %}}}214 end -
issm/trunk-jpl/examples/IceBridge/runme.m
r25915 r25986 5 5 ncdata='../Data/Greenland_5km_dev1.2.nc'; 6 6 7 if any(steps==1) %{{{7 if any(steps==1) 8 8 disp(' Step 1: Mesh creation'); 9 9 … … 36 36 37 37 save ./Models/Greenland.Mesh_generation md; 38 end %}}}38 end 39 39 40 if any(steps==2) %{{{40 if any(steps==2) 41 41 disp(' Step 2: Parameterization'); 42 42 md = loadmodel('./Models/Greenland.Mesh_generation'); … … 47 47 48 48 save ./Models/Greenland.Parameterization2 md; 49 end %}}}49 end 50 50 51 if any(steps==3) %{{{51 if any(steps==3) 52 52 disp(' Step 3: Control method friction'); 53 53 md = loadmodel('./Models/Greenland.Parameterization2'); … … 92 92 93 93 save ./Models/Greenland.Control_drag md; 94 end %}}}94 end 95 95 96 if any(steps==4) %{{{96 if any(steps==4) 97 97 disp(' Step 4: Transient run'); 98 98 md = loadmodel('./Models/Greenland.Control_drag'); … … 121 121 122 122 save ./Models/Greenland.Transient md; 123 end %}}}123 end 124 124 125 if any(steps==5) %{{{125 if any(steps==5) 126 126 disp(' Step 5: Plotting'); 127 127 md = loadmodel('./Models/Greenland.Transient'); … … 154 154 subplot(3,1,3); plot(time_plot,volume); title('Ice Volume'); 155 155 xlabel('years') 156 end %}}}156 end -
issm/trunk-jpl/examples/Inversion/runme.m
r25915 r25986 1 1 steps=[1]; 2 2 3 if any(steps==1) %{{{3 if any(steps==1) 4 4 %Generate observations 5 5 md = model; … … 13 13 'data',md.results.StressbalanceSolution.Vel,'title','"observed velocities"') 14 14 save model1 md 15 end %}}}15 end 16 16 17 if any(steps==2) %{{{17 if any(steps==2) 18 18 %Modify rheology, now constant 19 19 loadmodel('model1.mat'); … … 30 30 'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities') 31 31 save model2 md 32 end %}}}32 end 33 33 34 if any(steps==3) %{{{34 if any(steps==3) 35 35 %invert for ice rigidity 36 36 loadmodel('model2.mat'); … … 51 51 plotmodel(md,'axis#all','tight','data',md.results.StressbalanceSolution.MaterialsRheologyBbar,'caxis',[ 1.3 1.9]*10^8,'title','inferred B',... 52 52 'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities') 53 end %}}}53 end 54 54 55 if any(steps==4) %{{{55 if any(steps==4) 56 56 %invert for ice rigidity 57 57 loadmodel('model2.mat'); … … 73 73 plotmodel(md,'axis#all','tight','data',md.results.StressbalanceSolution.MaterialsRheologyBbar,'caxis',[ 1.3 1.9]*10^8,'title','inferred B',... 74 74 'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities') 75 end %}}}75 end -
issm/trunk-jpl/examples/Jakobshavn/runme.m
r25915 r25986 1 1 steps=[1]; 2 2 3 if any(steps==1) %{{{3 if any(steps==1) 4 4 disp(' Step 1: Mesh creation'); 5 5 md=triangle(model,'Domain.exp',2000); … … 23 23 24 24 save JksMesh md 25 end %}}}25 end 26 26 27 if any(steps==2) %{{{27 if any(steps==2) 28 28 disp(' Step 2: Parameterization'); 29 29 md=loadmodel('JksMesh'); … … 33 33 34 34 save JksPar md 35 end %}}}35 end 36 36 37 if any(steps==3) %{{{37 if any(steps==3) 38 38 disp(' Step 3: Control method friction'); 39 39 md=loadmodel('JksPar'); … … 70 70 71 71 save JksControl md 72 end %}}}72 end 73 73 74 if any(steps==4) %{{{74 if any(steps==4) 75 75 disp(' Plotting') 76 76 md=loadmodel('JksControl'); … … 85 85 'title','Friction Coefficient',... 86 86 'colorbartitle#3','(m)'); 87 end %}}}87 end -
issm/trunk-jpl/examples/LcurveAnalysis/runme.m
r25915 r25986 1 1 steps=[1]; 2 2 3 if any(steps==1) %{{{3 if any(steps==1) 4 4 % Generate observations 5 5 md = model; … … 13 13 'data',md.results.StressbalanceSolution.Vel,'title','"observed velocities"') 14 14 save model1 md 15 end %}}}15 end 16 16 17 if any(steps==2) %{{{17 if any(steps==2) 18 18 % Modify rheology, now constant 19 19 loadmodel('model1.mat'); … … 30 30 'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities') 31 31 save model2 md 32 end %}}}32 end 33 33 34 if any(steps==3) %{{{34 if any(steps==3) 35 35 % Perform L-curve analysis for ice rigidity inversion 36 36 loadmodel('model2.mat'); … … 106 106 xlabel('$\mathrm{log}(\mathcal{J}_0$)','Interpreter','latex') 107 107 ylabel('$\mathrm{log}(\mathcal{R})$','Interpreter','latex') 108 end %}}}108 end 109 109 110 if any(steps==4) %{{{110 if any(steps==4) 111 111 %invert for ice rigidity 112 112 loadmodel('model2.mat'); … … 128 128 plotmodel(md,'axis#all','tight','data',md.results.StressbalanceSolution.MaterialsRheologyBbar,'caxis',[ 1.3 1.9]*10^8,'title','inferred B',... 129 129 'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities') 130 end %}}}130 end -
issm/trunk-jpl/examples/Pig/runme.m
r25915 r25986 1 1 steps=[1]; 2 2 3 if any(steps==1) %Mesh Generation #1 %{{{3 if any(steps==1) %Mesh Generation #1 4 4 %Mesh parameters 5 5 domain =['./DomainOutline.exp']; … … 51 51 % Save model 52 52 save ./Models/PIG_Mesh_generation md; 53 end %}}}53 end 54 54 55 if any(steps==2) %Masks #2 %{{{55 if any(steps==2) %Masks #2 56 56 md = loadmodel('./Models/PIG_Mesh_generation'); 57 57 … … 79 79 % Save model 80 80 save ./Models/PIG_SetMask md; 81 end %}}}81 end 82 82 83 if any(steps==3) %Parameterization #3 %{{{83 if any(steps==3) %Parameterization #3 84 84 md = loadmodel('./Models/PIG_SetMask'); 85 85 md = parameterize(md,'./Pig.par'); … … 90 90 % Save model 91 91 save ./Models/PIG_Parameterization md; 92 end %}}}92 end 93 93 94 if any(steps==4) %Control Method #4 %{{{94 if any(steps==4) %Control Method #4 95 95 md = loadmodel('./Models/PIG_Parameterization'); 96 96 … … 132 132 % Save model 133 133 save ./Models/PIG_Control_drag md; 134 end %}}}134 end 135 135 136 if any(steps==5) %Plot #5 %{{{136 if any(steps==5) %Plot #5 137 137 md = loadmodel('./Models/PIG_Control_drag'); 138 138 … … 145 145 'caxis#1-2',([1.5,4000]),... 146 146 'colorbartitle#3','(m)', 'log#1-2',10); 147 end %}}}147 end 148 148 149 if any(steps==6) %Higher-Order #6 %{{{149 if any(steps==6) %Higher-Order #6 150 150 % Load Model 151 151 … … 162 162 end % step 6 end 163 163 164 if any(steps==7) %Plot #7 %{{{164 if any(steps==7) %Plot #7 165 165 mdHO = loadmodel('./Models/PIG_ModelHO'); 166 166 mdSSA = loadmodel('./Models/PIG_Control_drag'); … … 180 180 'colorbartitle#all','(m/yr)',... 181 181 'layer#5',1, 'log#1', 10,'log#3', 10,'log#5', 10); 182 end %}}}182 end -
issm/trunk-jpl/examples/Pig2/runme.m
r25915 r25986 1 1 steps=[1]; 2 2 3 if any(steps==1) %Mesh Generation #1 %{{{3 if any(steps==1) %Mesh Generation #1 4 4 5 5 %Mesh parameters … … 40 40 plotmodel(md,'data','mesh') 41 41 save ./Models/PIG_Mesh_generation md; 42 end %}}}43 44 if any(steps==2) %Masks #2 %{{{42 end 43 44 if any(steps==2) %Masks #2 45 45 md = loadmodel('./Models/PIG_Mesh_generation'); 46 46 … … 65 65 66 66 save ./Models/PIG_SetMask md; 67 end %}}}68 69 if any(steps==3) %Parameterization #3 %{{{67 end 68 69 if any(steps==3) %Parameterization #3 70 70 md = loadmodel('./Models/PIG_SetMask'); 71 71 md = setflowequation(md,'SSA','all'); … … 73 73 74 74 save ./Models/PIG_Parameterization md; 75 end %}}}76 77 if any(steps==4) %Rheology B inversion %{{{75 end 76 77 if any(steps==4) %Rheology B inversion 78 78 md = loadmodel('./Models/PIG_Parameterization'); 79 79 … … 117 117 % Save model 118 118 save ./Models/PIG_Control_B md; 119 end %}}}120 121 if any(steps==5) %drag inversion %{{{119 end 120 121 if any(steps==5) %drag inversion 122 122 md = loadmodel('./Models/PIG_Control_B'); 123 123 … … 151 151 152 152 save ./Models/PIG_Control_drag md; 153 end %}}}154 155 if any(steps==6) %Transient Run #1 %{{{153 end 154 155 if any(steps==6) %Transient Run #1 156 156 157 157 md = loadmodel('./Models/PIG_Control_drag'); … … 180 180 % Save model 181 181 save ./Models/PIG_Transient md; 182 end %}}}182 end 183 183 184 184 if any(steps==7) %High Melt #2 … … 193 193 194 194 save ./Models/PIG_HighMelt md; 195 end %}}}196 197 if any(steps==8) %Ice Front retreat %{{{195 end 196 197 if any(steps==8) %Ice Front retreat 198 198 md = loadmodel('./Models/PIG_Transient'); 199 199 … … 206 206 207 207 save ./Models/PIG_FrontRetreat md; 208 end %}}}209 210 if any(steps==9) %High surface mass balance #3 %{{{208 end 209 210 if any(steps==9) %High surface mass balance #3 211 211 %Load model from PIG_Transient 212 212 %... … … 226 226 %Save model 227 227 save ./Models/PIG_SMB md; 228 end %}}}228 end -
issm/trunk-jpl/examples/PigSensitivity/runme.m
r25983 r25986 1 1 steps=[1]; 2 2 3 if any(steps==1) %Transient Run #1 %{{{3 if any(steps==1) %Transient Run #1 4 4 5 5 md = loadmodel('../Pig/Models/PIG_Control_drag'); … … 35 35 % Save model 36 36 save ./Models/PIG_Transient md; 37 end %}}}37 end 38 38 39 if any(steps==2) %High Melt #2 %{{{39 if any(steps==2) %High Melt #2 40 40 md = loadmodel('./Models/PIG_Transient'); 41 41 … … 61 61 62 62 save ./Models/PIG_HighMelt md; 63 end %}}}63 end 64 64 65 if any(steps==3) %Ice Front retreat %{{{65 if any(steps==3) %Ice Front retreat 66 66 md = loadmodel('./Models/PIG_Transient'); 67 67 … … 91 91 92 92 save ./Models/PIG_FrontRetreat md2; 93 end %}}}93 end 94 94 95 if any(steps==4) %High surface mass balance #3 %{{{95 if any(steps==4) %High surface mass balance #3 96 96 97 97 %Load model … … 107 107 %Save model 108 108 109 end % }}} %step 4 end109 end % step 4 end -
issm/trunk-jpl/examples/SlrFarrell/runme.m
r25915 r25986 6 6 % [1:5] 7 7 8 if any(steps==1) %{{{8 if any(steps==1) 9 9 disp(' Step 1: Global mesh creation'); 10 10 … … 54 54 55 55 plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k'); 56 end %}}}56 end 57 57 58 if any(steps==2) %{{{58 if any(steps==2) 59 59 disp(' Step 2: Define source as in Farrell, 1972, Figure 1'); 60 60 md = loadmodel('./Models/SlrFarrell_Mesh'); … … 67 67 68 68 plotmodel (md,'data',md.slr.sealevel,'view',[90 90],'title#all','Initial sea-level [m]'); 69 end %}}}69 end 70 70 71 if any(steps==3) %{{{71 if any(steps==3) 72 72 disp(' Step 3: Parameterization'); 73 73 md = loadmodel('./Models/SlrFarrell_Loads'); … … 95 95 96 96 save ./Models/SlrFarrell_Parameterization md; 97 end %}}}97 end 98 98 99 if any(steps==4) %{{{99 if any(steps==4) 100 100 disp(' Step 4: Solve Slr solver'); 101 101 md = loadmodel('./Models/SlrFarrell_Parameterization'); … … 109 109 110 110 save ./Models/SlrFarrell_Solution md; 111 end %}}}111 end 112 112 113 if any(steps==5) %{{{113 if any(steps==5) 114 114 disp(' Step 5: Plot solutions'); 115 115 md = loadmodel('./Models/SlrFarrell_Solution'); … … 147 147 set(gcf,'color','w'); 148 148 %export_fig('Fig5.pdf'); 149 end %}}}149 end -
issm/trunk-jpl/examples/SlrGRACE/runme.m
r25938 r25986 4 4 steps=[7]; 5 5 6 if any(steps==1) %{{{6 if any(steps==1) 7 7 disp(' Step 1: Global mesh creation'); 8 8 … … 56 56 57 57 plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k'); 58 end %}}}59 60 if any(steps==2) %{{{58 end 59 60 if any(steps==2) 61 61 disp(' Step 2: Define loads in meters of ice height equivalent'); 62 62 md = loadmodel('./Models/SlrGRACE_Mesh'); … … 72 72 73 73 plotmodel (md,'data',md.solidearth.surfaceload.icethicknesschange,'view',[90 -90],'caxis',[-.1 .1],'title','Ice height equivalent [m]'); 74 end %}}}75 76 if any(steps==3) %{{{74 end 75 76 if any(steps==3) 77 77 disp(' Step 3: Parameterization'); 78 78 md = loadmodel('./Models/SlrGRACE_Loads'); … … 102 102 103 103 save ./Models/SlrGRACE_Parameterization md; 104 end %}}}105 106 if any(steps==4) %{{{104 end 105 106 if any(steps==4) 107 107 disp(' Step 4: Solve Slr solver'); 108 108 md = loadmodel('./Models/SlrGRACE_Parameterization'); … … 120 120 121 121 save ./Models/SlrGRACE_Solution md; 122 end %}}}123 124 if any(steps==5) %{{{122 end 123 124 if any(steps==5) 125 125 disp(' Step 5: Plot solutions'); 126 126 md = loadmodel('./Models/SlrGRACE_Solution'); … … 180 180 %export_fig(fig_name{kk}); 181 181 end 182 end %}}}183 184 if any(steps==6) %{{{182 end 183 184 if any(steps==6) 185 185 disp(' Step 6: Transient run'); 186 186 md = loadmodel('./Models/SlrGRACE_Parameterization'); … … 216 216 217 217 save ./Models/SlrGRACE_Transient md; 218 end %}}}219 220 if any(steps==7) %{{{218 end 219 220 if any(steps==7) 221 221 disp(' Step 7: Plot transient'); 222 222 md = loadmodel('./Models/SlrGRACE_Transient'); … … 296 296 set(gcf,'color','w'); 297 297 %export_fig('Fig7.pdf'); 298 end %}}}298 end -
issm/trunk-jpl/examples/SlrGRACE_NIMS/runme.m
r25939 r25986 4 4 steps=[8]; 5 5 6 if any(steps==1) %{{{6 if any(steps==1) 7 7 disp(' Step 1: Global mesh creation'); 8 8 … … 21 21 22 22 plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k'); 23 end %}}}24 25 if any(steps==2) %{{{23 end 24 25 if any(steps==2) 26 26 disp(' Step 2: Global mesh creation: refined coastlines'); 27 27 … … 80 80 81 81 plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k'); 82 end %}}}83 84 if any(steps==3) %{{{82 end 83 84 if any(steps==3) 85 85 disp(' Step 3: Define loads in meters of ice height equivalent'); 86 86 md = loadmodel('./Models/SlrGRACE_Mesh_refined'); … … 135 135 136 136 plotmodel(md,'data',md.solidearth.surfaceload.icethicknesschange,'view',[90 90],'title','Ice height equivalent [m]'); 137 end %}}}138 139 if any(steps==4) %{{{137 end 138 139 if any(steps==4) 140 140 disp(' Step 4: Parameterization'); 141 141 md = loadmodel('./Models/SlrGRACE_Loads'); … … 165 165 166 166 save ./Models/SlrGRACE_Parameterization md; 167 end %}}}168 169 if any(steps==5) %{{{167 end 168 169 if any(steps==5) 170 170 disp(' Step 5: Solve Slr solver'); 171 171 md = loadmodel('./Models/SlrGRACE_Parameterization'); … … 183 183 184 184 save ./Models/SlrGRACE_Solution md; 185 end %}}}186 187 if any(steps==6) %{{{185 end 186 187 if any(steps==6) 188 188 disp(' Step 6: Plot solutions'); 189 189 md = loadmodel('./Models/SlrGRACE_Solution'); … … 243 243 %export_fig(fig_name{kk}); 244 244 end 245 end %}}}246 247 if any(steps==7) %{{{245 end 246 247 if any(steps==7) 248 248 disp(' Step 7: Transient run'); 249 249 md = loadmodel('./Models/SlrGRACE_Parameterization'); … … 280 280 281 281 save ./Models/SlrGRACE_Transient md; 282 end %}}}283 284 if any(steps==8) %{{{282 end 283 284 if any(steps==8) 285 285 disp(' Step 8: Plot transient'); 286 286 md = loadmodel('./Models/SlrGRACE_Transient'); … … 303 303 set(gcf,'color','w'); 304 304 legend('GMSL','Incheon'); 305 end %}}}305 end -
issm/trunk-jpl/examples/UncertaintyQuantification/runme.m
r25981 r25986 2 2 steps=[1]; 3 3 4 if any(steps==1) %{{{4 if any(steps==1) 5 5 disp(' Step 1: plot flux gates'); 6 6 … … 28 28 '8','9','10','11','12','13'},... 29 29 'textposition',textpositions); 30 end %}}}31 32 if any(steps==2) %{{{30 end 31 32 if any(steps==2) 33 33 disp(' Step 2: compute cross overs from CRESIS'); 34 34 … … 58 58 59 59 save Models/PIG.CrossOvers DeltaHH 60 end %}}}61 62 if any(steps==3) %{{{60 end 61 62 if any(steps==3) 63 63 disp(' Step 3: sampling analysis'); 64 64 … … 150 150 151 151 save ./Models/PIG.Sampling md; 152 end %}}}153 154 if any(steps==4) %{{{152 end 153 154 if any(steps==4) 155 155 disp(' Step 4: sensitivity analysis'); 156 156 … … 242 242 243 243 save ./Models/PIG.Sensitivity md; 244 end %}}}245 246 if any(steps==5) %{{{244 end 245 246 if any(steps==5) 247 247 disp(' Step 5: plot partition'); 248 248 … … 253 253 'linewidth',2, 'axis#all','image','unit','km','colorbar','off',... 254 254 'title','Partition Edges on ISSM mesh','grid','on'); 255 end %}}}256 257 if any(steps==6) %{{{255 end 256 257 if any(steps==6) 258 258 disp(' Step 6: plot histogram'); 259 259 … … 273 273 'none','EdgeColor','red'); 274 274 275 end %}}}276 277 if any(steps==7) %{{{275 end 276 277 if any(steps==7) 278 278 disp(' Step 7: plot sensitivity'); 279 279 … … 313 313 'colorbartitle#3','If_{B}','unit#all','km','figure',2,... 314 314 'title','Importance Factors: H, \alpha, B'); 315 end %}}}315 end -
issm/trunk-jpl/examples/shakti/runme.m
r25915 r25986 1 1 steps=[1:3]; 2 2 3 if any(steps==1) %{{{3 if any(steps==1) 4 4 disp(' Step 1: Mesh'); 5 5 … … 8 8 9 9 save MoulinMesh md 10 end %}}}10 end 11 11 12 if any(steps==2) %{{{12 if any(steps==2) 13 13 disp(' Step 2: Parameterization'); 14 14 md=loadmodel('MoulinMesh'); … … 49 49 50 50 save MoulinParam md; 51 end %}}}51 end 52 52 53 if any(steps==3) %{{{53 if any(steps==3) 54 54 disp(' Step 3: Solve!'); 55 55 md=loadmodel('MoulinParam'); … … 82 82 83 83 save MoulinTransient md 84 end %}}}84 end -
issm/trunk-jpl/jenkins/examples_tests.sh
r25984 r25986 64 64 # STEP_SEVEN #{{{ 65 65 STEP_SEVEN="\ 66 if any(steps==7) %{{{\n\66 if any(steps==7)\n\ 67 67 disp(' Step 7: Historical Relaxation run');\n\ 68 68 md = loadmodel('./Models/Greenland.Control_drag');\n\ … … 96 96 \n\ 97 97 save ./Models/Greenland.HistoricTransient_200yr md;\n\ 98 end %}}}\n\98 end\n\ 99 99 " 100 100 #}}} 101 101 # STEP_EIGHT #{{{ 102 102 STEP_EIGHT="\ 103 if any(steps==8) %{{{\n\103 if any(steps==8)\n\ 104 104 %Load historic transient model\n\ 105 105 md=loadmodel('./Models/Greenland.HistoricTransient_200yr');\n\ … … 148 148 title('Ice Volume');\n\ 149 149 xlabel('years');\n\ 150 end %}}}\n\150 end\n\ 151 151 " 152 152 #}}} … … 170 170 # add conditional after 'RUN_EXAMPLE -eq 1' block) 171 171 # 172 172 173 # RUNME #{{{ 173 174 RUNME="\ … … 187 188 \n\ 188 189 %Mesh Generation #1\n\ 189 if any(steps==1) %{{{\n\190 if any(steps==1)\n\ 190 191 %initialize md as a new model #help model\n\ 191 192 %->\n\ … … 205 206 %->\n\ 206 207 save ./Models/ISMIP.Mesh_generation md;\n\ 207 end %}}}\n\208 end\n\ 208 209 \n\ 209 210 %Masks #2\n\ 210 if any(steps==2) %{{{\n\211 if any(steps==2)\n\ 211 212 % load the preceding step #help loadmodel\n\ 212 213 % path is given by the organizer with the name of the given step\n\ … … 223 224 %->\n\ 224 225 save ./Models/ISMIP.SetMask md;\n\ 225 end %}}}\n\226 end\n\ 226 227 \n\ 227 228 %Parameterization #3\n\ 228 if any(steps==3) %{{{\n\229 if any(steps==3)\n\ 229 230 % load the preceding step #help loadmodel\n\ 230 231 % path is given by the organizer with the name of the given step\n\ … … 239 240 %->\n\ 240 241 save ./Models/ISMIP.Parameterization md;\n\ 241 end %}}}\n\242 end\n\ 242 243 \n\ 243 244 %Extrusion #4\n\ 244 if any(steps==4) %{{{\n\245 if any(steps==4)\n\ 245 246 \n\ 246 247 % load the preceding step #help loadmodel\n\ … … 258 259 %->\n\ 259 260 save ./Models/ISMIP.Extrusion md;\n\ 260 end %}}}\n\261 end\n\ 261 262 \n\ 262 263 %Set the flow computing method #5\n\ 263 if any(steps==5) %{{{\n\264 if any(steps==5)\n\ 264 265 \n\ 265 266 % load the preceding step #help loadmodel\n\ … … 274 275 %->\n\ 275 276 save ./Models/ISMIP.SetFlow md;\n\ 276 end %}}}\n\277 end\n\ 277 278 \n\ 278 279 %Set Boundary Conditions #6\n\ 279 if any(steps==6) %{{{\n\280 if any(steps==6)\n\ 280 281 \n\ 281 282 % load the preceding step #help loadmodel\n\ … … 328 329 %->\n\ 329 330 save ./Models/ISMIP.BoundaryCondition md;\n\ 330 end %}}}\n\331 end\n\ 331 332 \n\ 332 333 %Solving #7\n\ 333 if any(steps==7) %{{{\n\334 if any(steps==7)\n\ 334 335 % load the preceding step #help loadmodel\n\ 335 336 % path is given by the organizer with the name of the given step\n\ … … 354 355 %->\n\ 355 356 plotmodel(md,'data',md.results.StressbalanceSolution.Vel)\n\ 356 end %}}}\n\357 end\n\ 357 358 \n\ 358 359 %Solving #8\n\ 359 if any(steps==8) %{{{\n\360 if any(steps==8)\n\ 360 361 % load the preceding step #help loadmodel\n\ 361 362 % path is given by the organizer with the name of the given step\n\ … … 392 393 %->\n\ 393 394 plotmodel(md,'data',md.results.TransientSolution(20).Vel)\n\ 394 end %}}}\n\395 end\n\ 395 396 " 396 397 #}}} … … 533 534 elif [ "${dir}" == "./Mesh" ]; then 534 535 # NOTE: Cannot test exptool region selection without GUI 535 sed -i.bak -e 's|steps=\[1\];|steps=\[1:7\];\n\ntry\n|' $RUNME_FILE 536 # 537 538 # RUNME #{{{ 539 RUNME="\ 540 try\n\ 541 steps=[1:7];\n\ 542 \n\ 543 if any(steps==1) % Model\n\ 544 md=model;\n\ 545 end\n\ 546 \n\ 547 if any(steps==2) % squaremesh\n\ 548 md=squaremesh(md,100,200,15,25);\n\ 549 plotmodel(md,'data','mesh');\n\ 550 end\n\ 551 \n\ 552 if any(steps==3) % roundmesh\n\ 553 md=roundmesh(model,100,10);\n\ 554 plotmodel(md,'data','mesh');\n\ 555 end\n\ 556 \n\ 557 if any(steps==4) % triangle\n\ 558 md=triangle(model,'Square.exp',.2);\n\ 559 plotmodel(md,'data','mesh');\n\ 560 end\n\ 561 \n\ 562 if any(steps==5) % bamg\n\ 563 md=bamg(model,'domain','Square.exp','hmax',.05);\n\ 564 plotmodel(md,'data','mesh');\n\ 565 end\n\ 566 \n\ 567 if any(steps==6) % Non-Uniform mesh\n\ 568 hvertices=[0.2;0.2;0.005;0.2];\n\ 569 md=bamg(md,'domain','Square.exp','hvertices',hvertices);\n\ 570 plotmodel(md,'data','mesh');\n\ 571 end\n\ 572 \n\ 573 if any(steps==7) % Mesh adaptation\n\ 574 md=bamg(model,'domain','Square.exp','hmax',.05);\n\ 575 vel=shock(md.mesh.x,md.mesh.y);\n\ 576 plotmodel(md,'data',vel,'edgecolor','w');\n\ 577 \n\ 578 md=bamg(model,'domain','Square.exp','hmax',.005);\n\ 579 vel=shock(md.mesh.x,md.mesh.y);\n\ 580 md=bamg(md,'field',vel,'err',0.05,'hmin',0.005,'hmax',0.3);\n\ 581 vel=shock(md.mesh.x,md.mesh.y);\n\ 582 plotmodel(md,'data',vel,'edgecolor','w');\n\ 583 \n\ 584 md=bamg(model,'domain','Square.exp','hmax',.005);\n\ 585 vel=shock(md.mesh.x,md.mesh.y);\n\ 586 md=bamg(md,'field',vel,'err',0.03,'hmin',0.005,'hmax',0.3,'gradation',3);\n\ 587 vel=shock(md.mesh.x,md.mesh.y);\n\ 588 plotmodel(md,'data',vel,'edgecolor','w');\n\ 589 \n\ 590 md=bamg(model,'domain','Square.exp','hmax',.005);\n\ 591 vel=shock(md.mesh.x,md.mesh.y);\n\ 592 md=bamg(md,'field',vel,'err',0.03,'hmin',0.005,'hmax',0.3,'gradation',1.3,'anisomax',1);\n\ 593 vel=shock(md.mesh.x,md.mesh.y);\n\ 594 plotmodel(md,'data',vel,'edgecolor','w');\n\ 595 end\n\ 596 \n\ 597 if any(steps==8) % Mesh refinement in a specific region\n\ 598 plotmodel(md,'data',vel,'edgecolor','w');\n\ 599 exptool('refinement.exp');\n\ 600 h=NaN*ones(md.mesh.numberofvertices,1);\n\ 601 in=ContourToNodes(md.mesh.x,md.mesh.y,'refinement.exp',1);\n\ 602 h(find(in))=0.02;\n\ 603 plotmodel(md,'data',in,'edgecolor','w');\n\ 604 \n\ 605 vel=shock(md.mesh.x,md.mesh.y);\n\ 606 md=bamg(md,'field',vel,'err',0.03,'hmin',0.005,'hmax',0.3,'hVertices',h);\n\ 607 vel=shock(md.mesh.x,md.mesh.y);\n\ 608 plotmodel(md,'data',vel,'edgecolor','w');\n\ 609 end\n\ 610 " 611 #}}} 612 touch $RUNME_FILE 613 perl -0755 -p -i'.bak' -e "s|^.*$|${RUNME}|s" $RUNME_FILE 536 614 RUN_EXAMPLE=1 537 615 elif [ "${dir}" == "./Pig" ]; then 538 616 # STEP_SIX #{{{ 539 617 STEP_SIX="\ 540 if any(steps==6) %{{{\n\618 if any(steps==6)\n\ 541 619 % Load Model\n\ 542 620 md = loadmodel('./Models/PIG_Control_drag');\n\ … … 554 632 % Save Model\n\ 555 633 save ./Models/PIG_ModelHO md;\n\ 556 end %}}}\n\634 end\n\ 557 635 " 558 636 #}}} … … 651 729 fi 652 730 731 if [ "${dir}" == "./Mesh" ]; then 732 rm -f $RUNME_FILE 733 fi 734 653 735 if [ "${dir}" == "./Pig" ]; then 654 736 mv -f DomainOutline.exp DomainOutline.bkp
Note:
See TracChangeset
for help on using the changeset viewer.