Changeset 25986


Ignore:
Timestamp:
02/07/21 00:19:47 (4 years ago)
Author:
jdquinn
Message:

CHG: Cleanup

Location:
issm/trunk-jpl
Files:
1 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/examples/AMR/runme.m

    r25915 r25986  
    6767
    6868        save AMRTransient md
    69 end% }}}
     69end
  • issm/trunk-jpl/examples/EsaGRACE/runme.m

    r25915 r25986  
    44steps=[1]; % [1:5]
    55
    6 if any(steps==1) %{{{
     6if any(steps==1)
    77        disp('   Step 1: Global mesh creation');
    88
     
    1818
    1919        plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k');
    20 end %}}}
     20end
    2121
    22 if any(steps==2) %{{{
     22if any(steps==2)
    2323        disp('   Step 2: Define loads in meters of ice height equivalent');
    2424        md = loadmodel('./Models/EsaGRACE_Mesh');
     
    3636                'view',[90 -90],'caxis',[-.1 .1],...
    3737                'title','Ice height equivalent [m]');
    38 end %}}}
     38end
    3939
    40 if any(steps==3) %{{{
     40if any(steps==3)
    4141        disp('   Step 3: Parameterization');
    4242        md = loadmodel('./Models/EsaGRACE_Loads');
     
    6565
    6666        save ./Models/EsaGRACE_Parameterization md;
    67 end %}}}
     67end
    6868
    69 if any(steps==4) %{{{
     69if any(steps==4)
    7070        disp('   Step 4: Solve Esa solver');
    7171        md = loadmodel('./Models/EsaGRACE_Parameterization');
     
    7979
    8080        save ./Models/EsaGRACE_Solution md;
    81 end %}}}
     81end
    8282
    83 if any(steps==5) %{{{
     83if any(steps==5)
    8484        disp('   Step 5: Plot solutions');
    8585        md = loadmodel('./Models/EsaGRACE_Solution');
     
    140140                %export_fig(fig_name{kk});
    141141        end
    142 end %}}}
     142end
  • issm/trunk-jpl/examples/EsaWahr/runme.m

    r25915 r25986  
    44steps=[1]; % [1:7]
    55
    6 if any(steps==1) %{{{
     6if any(steps==1)
    77        disp('   Step 1: Mesh creation');
    88
     
    1212
    1313        plotmodel(md,'data','mesh');
    14 end %}}}
     14end
    1515
    16 if any(steps==2) %{{{
     16if any(steps==2)
    1717        disp('   Step 2: Anisotropic mesh creation');
    1818
     
    2828
    2929        plotmodel (md,'data','mesh');
    30 end %}}}
     30end
    3131
    32 if any(steps==3) %{{{
     32if any(steps==3)
    3333        disp('   Step 3: Define loads');
    3434        md = loadmodel('./Models/EsaWahr_Mesh');
     
    4848
    4949        plotmodel (md,'data',md.esa.deltathickness,'title','Ice height equivalent [m]');
    50 end %}}}
     50end
    5151
    52 if any(steps==4) %{{{
     52if any(steps==4)
    5353        disp('   Step 4: Parameterization');
    5454        md = loadmodel('./Models/EsaWahr_Loads');
     
    7474
    7575        save ./Models/EsaWahr_Parameterization md;
    76 end %}}}
     76end
    7777
    78 if any(steps==5) %{{{
     78if any(steps==5)
    7979        disp('   Step 5: Solve Esa solver');
    8080        md = loadmodel('./Models/EsaWahr_Parameterization');
     
    8888
    8989        save ./Models/EsaWahr_Solution md;
    90 end %}}}
     90end
    9191
    92 if any(steps==6) %{{{
     92if any(steps==6)
    9393        disp('   Step 6: Plot solutions');
    9494        md = loadmodel('./Models/EsaWahr_Solution');
     
    121121                'colorbarpos',[0.53,0.065,0.18,0.02],'colorbartitle#4','East-west [mm]');
    122122        %export_fig('Fig5.pdf');
    123 end %}}}
     123end
    124124
    125 if any(steps==7) %{{{
     125if any(steps==7)
    126126        disp('   Step 7: Compare results against Wahr semi-analytic solutions');
    127127        md = loadmodel('./Models/EsaWahr_Solution');
     
    162162                set(gcf,'color','w');
    163163        %export_fig('Fig6.pdf');
    164 end %}}}
     164end
  • issm/trunk-jpl/examples/Greenland/runme.m

    r25915 r25986  
    55ncdata='../Data/Greenland_5km_dev1.2.nc';
    66
    7 if any(steps==1) %{{{
     7if any(steps==1)
    88        disp('   Step 1: Mesh creation');
    99
     
    2929
    3030        plotmodel (md,'data','mesh');
    31 end %}}}
    32 
    33 if any(steps==2) %{{{
     31end
     32
     33if any(steps==2)
    3434        disp('   Step 2: Parameterization');
    3535        md = loadmodel('./Models/Greenland.Mesh_generation');
     
    4040
    4141        save ./Models/Greenland.Parameterization md;
    42 end %}}}
    43 
    44 if any(steps==3) %{{{
     42end
     43
     44if any(steps==3)
    4545        disp('   Step 3: Control method friction');
    4646        md = loadmodel('./Models/Greenland.Parameterization');
     
    7979
    8080        save ./Models/Greenland.Control_drag md;
    81 end %}}}
    82 
    83 if any(steps==4) %{{{
     81end
     82
     83if any(steps==4)
    8484        disp('   Step 4: Transient run');
    8585        md = loadmodel('./Models/Greenland.Control_drag');
     
    109109
    110110        save ./Models/Greenland.Transient md;
    111 end %}}}
    112 
    113 if any(steps==5) %{{{
     111end
     112
     113if any(steps==5)
    114114        disp('   Step 5: Plotting');
    115115        md = loadmodel('./Models/Greenland.Transient');
     
    142142        subplot(3,1,3); plot([0.2:0.2:20],volume); title('Ice Volume');
    143143        xlabel('years')
    144 end %}}}
    145 
    146 if any(steps==6) %{{{
     144end
     145
     146if any(steps==6)
    147147        disp('   Step 6: Extract Box SMB');
    148148        md = loadmodel('./Models/Greenland.Transient');
     
    171171
    172172        clear smbbox
    173 end %}}}
    174 
    175 if any(steps==7) %{{{
     173end
     174
     175if any(steps==7)
    176176        disp('   Step 7: Historical Relaxation run');
    177177        md = loadmodel('./Models/Greenland.Control_drag');
     
    206206end % step 7 end
    207207
    208 if any(steps==8) %{{{
     208if any(steps==8)
    209209        disp('   Step 8: Plotting exercise');
    210210
     
    234234end % step 8 end
    235235
    236 if any(steps==9) %{{{
     236if any(steps==9)
    237237        disp('   Step 9: Box Transient run');
    238238        md = loadmodel('./Models/Greenland.HistoricTransient_200yr');
     
    287287
    288288        save ./Models/Greenland.BoxTransient md;
    289 end %}}}
    290 
    291 if any(steps==10) %{{{
     289end
     290
     291if any(steps==10)
    292292        disp('   Step 10: Plot Box Transient');
    293293        md = loadmodel('./Models/Greenland.BoxTransient');
     
    313313        subplot(3,1,3); plot(t,volume); title('Ice Volume');
    314314        xlabel('years')
    315 end %}}}
     315end
  • issm/trunk-jpl/examples/ISMIP/runme.m

    r25959 r25986  
    1111
    1212%Mesh Generation #1
    13 if any(steps==1) %{{{
     13if any(steps==1)
    1414
    1515        %initialize md as a new model #help model
     
    2626        %->
    2727
    28 end %}}}
     28end
    2929
    3030%Masks #2
    31 if any(steps==2) %{{{
     31if any(steps==2)
    3232
    3333        % load the preceding step #help loadmodel
     
    4545        %->
    4646
    47 end %}}}
     47end
    4848
    4949%Parameterization #3
    50 if any(steps==3) %{{{
     50if any(steps==3)
    5151
    5252        % load the preceding step #help loadmodel
     
    6262        %->
    6363
    64 end %}}}
     64end
    6565
    6666%Extrusion #4
    67 if any(steps==4) %{{{
     67if any(steps==4)
    6868       
    6969        % load the preceding step #help loadmodel
     
    8181        %->
    8282
    83 end %}}}
     83end
    8484
    8585%Set the flow computing method #5
    86 if any(steps==5) %{{{
     86if any(steps==5)
    8787
    8888        % load the preceding step #help loadmodel
     
    9797        %->
    9898
    99 end %}}}
     99end
    100100
    101101%Set Boundary Conditions #6
    102 if any(steps==6) %{{{
     102if any(steps==6)
    103103
    104104        % load the preceding step #help loadmodel
     
    150150        %->
    151151
    152 end %}}}
     152end
    153153
    154154%Solving #7
    155 if any(steps==7) %{{{
     155if any(steps==7)
    156156        % load the preceding step #help loadmodel
    157157        % path is given by the organizer with the name of the given step
     
    175175        % plot the surface velocities #plotdoc
    176176        %->
    177 end %}}}
     177end
    178178
    179179%Solving #8
    180 if any(steps==8) %{{{
     180if any(steps==8)
    181181        % load the preceding step #help loadmodel
    182182        % path is given by the organizer with the name of the given step
     
    212212        % plot the surface velocities #plotdoc
    213213        %->
    214 end %}}}
     214end
  • issm/trunk-jpl/examples/IceBridge/runme.m

    r25915 r25986  
    55ncdata='../Data/Greenland_5km_dev1.2.nc';
    66
    7 if any(steps==1) %{{{
     7if any(steps==1)
    88        disp('   Step 1: Mesh creation');
    99
     
    3636
    3737        save ./Models/Greenland.Mesh_generation md;
    38 end %}}}
     38end
    3939
    40 if any(steps==2) %{{{
     40if any(steps==2)
    4141        disp('   Step 2: Parameterization');
    4242        md = loadmodel('./Models/Greenland.Mesh_generation');
     
    4747
    4848        save ./Models/Greenland.Parameterization2 md;
    49 end %}}}
     49end
    5050
    51 if any(steps==3) %{{{
     51if any(steps==3)
    5252        disp('   Step 3: Control method friction');
    5353        md = loadmodel('./Models/Greenland.Parameterization2');
     
    9292
    9393        save ./Models/Greenland.Control_drag md;
    94 end %}}}
     94end
    9595
    96 if any(steps==4) %{{{
     96if any(steps==4)
    9797        disp('   Step 4: Transient run');
    9898        md = loadmodel('./Models/Greenland.Control_drag');
     
    121121
    122122        save ./Models/Greenland.Transient md;
    123 end %}}}
     123end
    124124
    125 if any(steps==5) %{{{
     125if any(steps==5)
    126126        disp('   Step 5: Plotting');
    127127        md = loadmodel('./Models/Greenland.Transient');
     
    154154        subplot(3,1,3); plot(time_plot,volume); title('Ice Volume');
    155155        xlabel('years')
    156 end %}}}
     156end
  • issm/trunk-jpl/examples/Inversion/runme.m

    r25915 r25986  
    11steps=[1];
    22
    3 if any(steps==1) %{{{
     3if any(steps==1)
    44        %Generate observations
    55        md = model;
     
    1313                'data',md.results.StressbalanceSolution.Vel,'title','"observed velocities"')
    1414        save model1 md
    15 end %}}}
     15end
    1616
    17 if any(steps==2) %{{{
     17if any(steps==2)
    1818        %Modify rheology, now constant
    1919        loadmodel('model1.mat');
     
    3030                'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities')
    3131        save model2 md
    32 end %}}}
     32end
    3333
    34 if any(steps==3) %{{{
     34if any(steps==3)
    3535        %invert for ice rigidity
    3636        loadmodel('model2.mat');
     
    5151        plotmodel(md,'axis#all','tight','data',md.results.StressbalanceSolution.MaterialsRheologyBbar,'caxis',[ 1.3 1.9]*10^8,'title','inferred B',...
    5252                'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities')
    53 end %}}}
     53end
    5454
    55 if any(steps==4) %{{{
     55if any(steps==4)
    5656        %invert for ice rigidity
    5757        loadmodel('model2.mat');
     
    7373        plotmodel(md,'axis#all','tight','data',md.results.StressbalanceSolution.MaterialsRheologyBbar,'caxis',[ 1.3 1.9]*10^8,'title','inferred B',...
    7474                'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities')
    75 end %}}}
     75end
  • issm/trunk-jpl/examples/Jakobshavn/runme.m

    r25915 r25986  
    11steps=[1];
    22
    3 if any(steps==1) %{{{
     3if any(steps==1)
    44        disp('   Step 1: Mesh creation');
    55        md=triangle(model,'Domain.exp',2000);
     
    2323
    2424        save JksMesh md
    25 end %}}}
     25end
    2626
    27 if any(steps==2) %{{{
     27if any(steps==2)
    2828        disp('   Step 2: Parameterization');
    2929        md=loadmodel('JksMesh');
     
    3333
    3434        save JksPar md
    35 end %}}}
     35end
    3636
    37 if any(steps==3) %{{{
     37if any(steps==3)
    3838        disp('   Step 3: Control method friction');
    3939        md=loadmodel('JksPar');
     
    7070
    7171        save JksControl md
    72 end %}}}
     72end
    7373
    74 if any(steps==4) %{{{
     74if any(steps==4)
    7575        disp('   Plotting')
    7676        md=loadmodel('JksControl');
     
    8585                'title','Friction Coefficient',...
    8686                'colorbartitle#3','(m)');
    87 end %}}}
     87end
  • issm/trunk-jpl/examples/LcurveAnalysis/runme.m

    r25915 r25986  
    11steps=[1];
    22
    3 if any(steps==1) %{{{
     3if any(steps==1)
    44        % Generate observations
    55        md = model;
     
    1313                'data',md.results.StressbalanceSolution.Vel,'title','"observed velocities"')
    1414        save model1 md
    15 end %}}}
     15end
    1616
    17 if any(steps==2) %{{{
     17if any(steps==2)
    1818        % Modify rheology, now constant
    1919        loadmodel('model1.mat');
     
    3030                'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities')
    3131        save model2 md
    32 end %}}}
     32end
    3333
    34 if any(steps==3) %{{{
     34if any(steps==3)
    3535        % Perform L-curve analysis for ice rigidity inversion
    3636        loadmodel('model2.mat');
     
    106106        xlabel('$\mathrm{log}(\mathcal{J}_0$)','Interpreter','latex')
    107107        ylabel('$\mathrm{log}(\mathcal{R})$','Interpreter','latex')
    108 end %}}}
     108end
    109109
    110 if any(steps==4) %{{{
     110if any(steps==4)
    111111        %invert for ice rigidity
    112112        loadmodel('model2.mat');
     
    128128        plotmodel(md,'axis#all','tight','data',md.results.StressbalanceSolution.MaterialsRheologyBbar,'caxis',[ 1.3 1.9]*10^8,'title','inferred B',...
    129129                'data',md.results.StressbalanceSolution.Vel,'title','modeled velocities')
    130 end %}}}
     130end
  • issm/trunk-jpl/examples/Pig/runme.m

    r25915 r25986  
    11steps=[1];
    22
    3 if any(steps==1) %Mesh Generation #1 %{{{
     3if any(steps==1) %Mesh Generation #1
    44        %Mesh parameters
    55        domain =['./DomainOutline.exp'];
     
    5151        % Save model
    5252        save ./Models/PIG_Mesh_generation md;
    53 end %}}}
     53end
    5454
    55 if any(steps==2) %Masks #2 %{{{
     55if any(steps==2) %Masks #2
    5656        md = loadmodel('./Models/PIG_Mesh_generation');
    5757
     
    7979        % Save model
    8080        save ./Models/PIG_SetMask md;
    81 end %}}}
     81end
    8282
    83 if any(steps==3) %Parameterization #3 %{{{
     83if any(steps==3) %Parameterization #3
    8484        md = loadmodel('./Models/PIG_SetMask');
    8585        md = parameterize(md,'./Pig.par');
     
    9090        % Save model
    9191        save ./Models/PIG_Parameterization md;
    92 end %}}}
     92end
    9393
    94 if any(steps==4) %Control Method #4 %{{{
     94if any(steps==4) %Control Method #4
    9595        md = loadmodel('./Models/PIG_Parameterization');
    9696
     
    132132        % Save model
    133133        save ./Models/PIG_Control_drag md;
    134 end %}}}
     134end
    135135
    136 if any(steps==5) %Plot #5 %{{{
     136if any(steps==5) %Plot #5
    137137        md = loadmodel('./Models/PIG_Control_drag');
    138138
     
    145145                'caxis#1-2',([1.5,4000]),...
    146146                'colorbartitle#3','(m)', 'log#1-2',10);
    147 end %}}}
     147end
    148148
    149 if any(steps==6) %Higher-Order #6 %{{{
     149if any(steps==6) %Higher-Order #6
    150150        % Load Model
    151151
     
    162162end % step 6 end
    163163
    164 if any(steps==7) %Plot #7 %{{{
     164if any(steps==7) %Plot #7
    165165        mdHO = loadmodel('./Models/PIG_ModelHO');
    166166        mdSSA = loadmodel('./Models/PIG_Control_drag');
     
    180180                'colorbartitle#all','(m/yr)',...
    181181                'layer#5',1, 'log#1', 10,'log#3', 10,'log#5', 10);
    182 end %}}}
     182end
  • issm/trunk-jpl/examples/Pig2/runme.m

    r25915 r25986  
    11steps=[1];
    22
    3 if any(steps==1) %Mesh Generation #1 %{{{
     3if any(steps==1) %Mesh Generation #1
    44
    55        %Mesh parameters
     
    4040        plotmodel(md,'data','mesh')
    4141        save ./Models/PIG_Mesh_generation md;
    42 end %}}}
    43 
    44 if any(steps==2) %Masks #2 %{{{
     42end
     43
     44if any(steps==2) %Masks #2
    4545        md = loadmodel('./Models/PIG_Mesh_generation');
    4646
     
    6565
    6666        save ./Models/PIG_SetMask md;
    67 end %}}}
    68 
    69 if any(steps==3) %Parameterization #3 %{{{
     67end
     68
     69if any(steps==3) %Parameterization #3
    7070        md = loadmodel('./Models/PIG_SetMask');
    7171        md = setflowequation(md,'SSA','all');
     
    7373
    7474        save ./Models/PIG_Parameterization md;
    75 end %}}}
    76 
    77 if any(steps==4) %Rheology B inversion %{{{
     75end
     76
     77if any(steps==4) %Rheology B inversion
    7878        md = loadmodel('./Models/PIG_Parameterization');
    7979
     
    117117        % Save model
    118118        save ./Models/PIG_Control_B md;
    119 end %}}}
    120 
    121 if any(steps==5) %drag inversion %{{{
     119end
     120
     121if any(steps==5) %drag inversion
    122122        md = loadmodel('./Models/PIG_Control_B');
    123123
     
    151151
    152152        save ./Models/PIG_Control_drag md;
    153 end %}}}
    154 
    155 if any(steps==6) %Transient Run #1 %{{{
     153end
     154
     155if any(steps==6) %Transient Run #1
    156156
    157157        md = loadmodel('./Models/PIG_Control_drag');   
     
    180180        % Save model
    181181        save ./Models/PIG_Transient md;
    182 end %}}}
     182end
    183183
    184184if any(steps==7) %High Melt #2
     
    193193
    194194        save ./Models/PIG_HighMelt md;
    195 end %}}}
    196 
    197 if any(steps==8) %Ice Front retreat %{{{
     195end
     196
     197if any(steps==8) %Ice Front retreat
    198198        md = loadmodel('./Models/PIG_Transient');       
    199199
     
    206206
    207207        save ./Models/PIG_FrontRetreat md;
    208 end %}}}
    209 
    210 if any(steps==9) %High surface mass balance #3 %{{{
     208end
     209
     210if any(steps==9) %High surface mass balance #3
    211211        %Load model from PIG_Transient
    212212        %...
     
    226226        %Save model
    227227        save ./Models/PIG_SMB md;
    228 end %}}}
     228end
  • issm/trunk-jpl/examples/PigSensitivity/runme.m

    r25983 r25986  
    11steps=[1];
    22
    3 if any(steps==1) %Transient Run #1 %{{{
     3if any(steps==1) %Transient Run #1
    44
    55        md = loadmodel('../Pig/Models/PIG_Control_drag');
     
    3535        % Save model
    3636        save ./Models/PIG_Transient md;
    37 end %}}}
     37end
    3838
    39 if any(steps==2) %High Melt #2 %{{{
     39if any(steps==2) %High Melt #2
    4040        md = loadmodel('./Models/PIG_Transient');
    4141
     
    6161
    6262        save ./Models/PIG_HighMelt md;
    63 end %}}}
     63end
    6464
    65 if any(steps==3) %Ice Front retreat %{{{
     65if any(steps==3) %Ice Front retreat
    6666        md = loadmodel('./Models/PIG_Transient');
    6767
     
    9191
    9292        save ./Models/PIG_FrontRetreat md2;
    93 end %}}}
     93end
    9494
    95 if any(steps==4) %High surface mass balance #3 %{{{
     95if any(steps==4) %High surface mass balance #3
    9696
    9797        %Load model
     
    107107        %Save model
    108108
    109 end %}}} % step 4 end
     109end % step 4 end
  • issm/trunk-jpl/examples/SlrFarrell/runme.m

    r25915 r25986  
    66 % [1:5]
    77
    8 if any(steps==1) %{{{
     8if any(steps==1)
    99        disp('   Step 1: Global mesh creation');
    1010
     
    5454
    5555        plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k');
    56 end %}}}
     56end
    5757
    58 if any(steps==2) %{{{
     58if any(steps==2)
    5959        disp('   Step 2: Define source as in Farrell, 1972, Figure 1');
    6060        md = loadmodel('./Models/SlrFarrell_Mesh');
     
    6767
    6868        plotmodel (md,'data',md.slr.sealevel,'view',[90 90],'title#all','Initial sea-level [m]');
    69 end %}}}
     69end
    7070
    71 if any(steps==3) %{{{
     71if any(steps==3)
    7272        disp('   Step 3: Parameterization');
    7373        md = loadmodel('./Models/SlrFarrell_Loads');
     
    9595
    9696        save ./Models/SlrFarrell_Parameterization md;
    97 end %}}}
     97end
    9898
    99 if any(steps==4) %{{{
     99if any(steps==4)
    100100        disp('   Step 4: Solve Slr solver');
    101101        md = loadmodel('./Models/SlrFarrell_Parameterization');
     
    109109
    110110        save ./Models/SlrFarrell_Solution md;
    111 end %}}}
     111end
    112112
    113 if any(steps==5) %{{{
     113if any(steps==5)
    114114        disp('   Step 5: Plot solutions');
    115115        md = loadmodel('./Models/SlrFarrell_Solution');
     
    147147        set(gcf,'color','w');
    148148        %export_fig('Fig5.pdf');
    149 end %}}}
     149end
  • issm/trunk-jpl/examples/SlrGRACE/runme.m

    r25938 r25986  
    44steps=[7];
    55
    6 if any(steps==1) %{{{
     6if any(steps==1)
    77        disp('   Step 1: Global mesh creation');
    88
     
    5656
    5757        plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k');
    58 end %}}}
    59 
    60 if any(steps==2) %{{{
     58end
     59
     60if any(steps==2)
    6161        disp('   Step 2: Define loads in meters of ice height equivalent');
    6262        md = loadmodel('./Models/SlrGRACE_Mesh');
     
    7272
    7373        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) %{{{
     74end
     75
     76if any(steps==3)
    7777        disp('   Step 3: Parameterization');
    7878        md = loadmodel('./Models/SlrGRACE_Loads');
     
    102102
    103103        save ./Models/SlrGRACE_Parameterization md;
    104 end %}}}
    105 
    106 if any(steps==4) %{{{
     104end
     105
     106if any(steps==4)
    107107        disp('   Step 4: Solve Slr solver');
    108108        md = loadmodel('./Models/SlrGRACE_Parameterization');
     
    120120
    121121        save ./Models/SlrGRACE_Solution md;
    122 end %}}}
    123 
    124 if any(steps==5) %{{{
     122end
     123
     124if any(steps==5)
    125125        disp('   Step 5: Plot solutions');
    126126        md = loadmodel('./Models/SlrGRACE_Solution');
     
    180180                %export_fig(fig_name{kk});
    181181        end
    182 end %}}}
    183 
    184 if any(steps==6) %{{{
     182end
     183
     184if any(steps==6)
    185185        disp('   Step 6: Transient run');
    186186        md = loadmodel('./Models/SlrGRACE_Parameterization');
     
    216216
    217217        save ./Models/SlrGRACE_Transient md;
    218 end %}}}
    219 
    220 if any(steps==7) %{{{
     218end
     219
     220if any(steps==7)
    221221        disp('   Step 7: Plot transient');
    222222        md = loadmodel('./Models/SlrGRACE_Transient');
     
    296296        set(gcf,'color','w');
    297297        %export_fig('Fig7.pdf');
    298 end %}}}
     298end
  • issm/trunk-jpl/examples/SlrGRACE_NIMS/runme.m

    r25939 r25986  
    44steps=[8];
    55
    6 if any(steps==1) %{{{
     6if any(steps==1)
    77        disp('   Step 1: Global mesh creation');
    88
     
    2121
    2222        plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k');
    23 end %}}}
    24 
    25 if any(steps==2) %{{{
     23end
     24
     25if any(steps==2)
    2626        disp('   Step 2: Global mesh creation: refined coastlines');
    2727
     
    8080
    8181        plotmodel (md,'data',md.mask.ocean_levelset,'edgecolor','k');
    82 end %}}}
    83 
    84 if any(steps==3) %{{{
     82end
     83
     84if any(steps==3)
    8585        disp('   Step 3: Define loads in meters of ice height equivalent');
    8686        md = loadmodel('./Models/SlrGRACE_Mesh_refined');
     
    135135
    136136        plotmodel(md,'data',md.solidearth.surfaceload.icethicknesschange,'view',[90 90],'title','Ice height equivalent [m]');
    137 end %}}}
    138 
    139 if any(steps==4) %{{{
     137end
     138
     139if any(steps==4)
    140140        disp('   Step 4: Parameterization');
    141141        md = loadmodel('./Models/SlrGRACE_Loads');
     
    165165
    166166        save ./Models/SlrGRACE_Parameterization md;
    167 end %}}}
    168 
    169 if any(steps==5) %{{{
     167end
     168
     169if any(steps==5)
    170170        disp('   Step 5: Solve Slr solver');
    171171        md = loadmodel('./Models/SlrGRACE_Parameterization');
     
    183183
    184184        save ./Models/SlrGRACE_Solution md;
    185 end %}}}
    186 
    187 if any(steps==6) %{{{
     185end
     186
     187if any(steps==6)
    188188        disp('   Step 6: Plot solutions');
    189189        md = loadmodel('./Models/SlrGRACE_Solution');
     
    243243                %export_fig(fig_name{kk});
    244244        end
    245 end %}}}
    246 
    247 if any(steps==7) %{{{
     245end
     246
     247if any(steps==7)
    248248        disp('   Step 7: Transient run');
    249249        md = loadmodel('./Models/SlrGRACE_Parameterization');
     
    280280
    281281        save ./Models/SlrGRACE_Transient md;
    282 end %}}}
    283 
    284 if any(steps==8) %{{{
     282end
     283
     284if any(steps==8)
    285285        disp('   Step 8: Plot transient');
    286286        md = loadmodel('./Models/SlrGRACE_Transient');
     
    303303        set(gcf,'color','w');
    304304        legend('GMSL','Incheon');
    305 end %}}}
     305end
  • issm/trunk-jpl/examples/UncertaintyQuantification/runme.m

    r25981 r25986  
    22steps=[1];
    33
    4 if any(steps==1) %{{{
     4if any(steps==1)
    55        disp('   Step 1: plot flux gates');
    66
     
    2828                '8','9','10','11','12','13'},...
    2929                'textposition',textpositions);
    30 end %}}}
    31 
    32 if any(steps==2) %{{{
     30end
     31
     32if any(steps==2)
    3333        disp('   Step 2: compute cross overs from CRESIS');
    3434
     
    5858
    5959        save Models/PIG.CrossOvers DeltaHH
    60 end %}}}
    61 
    62 if any(steps==3) %{{{
     60end
     61
     62if any(steps==3)
    6363        disp('   Step 3: sampling analysis');
    6464
     
    150150
    151151        save ./Models/PIG.Sampling md;
    152 end %}}}
    153 
    154 if any(steps==4) %{{{
     152end
     153
     154if any(steps==4)
    155155        disp('   Step 4: sensitivity analysis');
    156156
     
    242242
    243243        save ./Models/PIG.Sensitivity md;
    244 end %}}}
    245 
    246 if any(steps==5) %{{{
     244end
     245
     246if any(steps==5)
    247247        disp('   Step 5: plot partition');
    248248
     
    253253        'linewidth',2, 'axis#all','image','unit','km','colorbar','off',...
    254254        'title','Partition Edges on ISSM mesh','grid','on');
    255 end %}}}
    256 
    257 if any(steps==6) %{{{
     255end
     256
     257if any(steps==6)
    258258        disp('   Step 6: plot histogram');
    259259
     
    273273        'none','EdgeColor','red');
    274274
    275 end %}}}
    276 
    277 if any(steps==7) %{{{
     275end
     276
     277if any(steps==7)
    278278        disp('   Step 7: plot sensitivity');
    279279
     
    313313                'colorbartitle#3','If_{B}','unit#all','km','figure',2,...
    314314                'title','Importance Factors: H, \alpha, B');
    315 end %}}}
     315end
  • issm/trunk-jpl/examples/shakti/runme.m

    r25915 r25986  
    11steps=[1:3];
    22
    3 if any(steps==1) %{{{
     3if any(steps==1)
    44        disp('  Step 1: Mesh');
    55
     
    88
    99        save MoulinMesh md
    10 end %}}}
     10end
    1111
    12 if any(steps==2) %{{{
     12if any(steps==2)
    1313        disp('  Step 2: Parameterization');
    1414        md=loadmodel('MoulinMesh');
     
    4949
    5050        save MoulinParam md;
    51 end %}}}
     51end
    5252
    53 if any(steps==3) %{{{
     53if any(steps==3)
    5454        disp('  Step 3: Solve!');
    5555        md=loadmodel('MoulinParam');
     
    8282
    8383        save MoulinTransient md
    84 end %}}}
     84end
  • issm/trunk-jpl/jenkins/examples_tests.sh

    r25984 r25986  
    6464                        # STEP_SEVEN #{{{
    6565                        STEP_SEVEN="\
    66                                 if any(steps==7) %{{{\n\
     66                                if any(steps==7)\n\
    6767                                        disp('   Step 7: Historical Relaxation run');\n\
    6868                                        md = loadmodel('./Models/Greenland.Control_drag');\n\
     
    9696                                        \n\
    9797                                        save ./Models/Greenland.HistoricTransient_200yr md;\n\
    98                                 end %}}}\n\
     98                                end\n\
    9999                        "
    100100                        #}}}
    101101                        # STEP_EIGHT #{{{
    102102                        STEP_EIGHT="\
    103                                 if any(steps==8) %{{{\n\
     103                                if any(steps==8)\n\
    104104                                        %Load historic transient model\n\
    105105                                        md=loadmodel('./Models/Greenland.HistoricTransient_200yr');\n\
     
    148148                                        title('Ice Volume');\n\
    149149                                        xlabel('years');\n\
    150                                 end %}}}\n\
     150                                end\n\
    151151                        "
    152152                        #}}}
     
    170170                        #       add conditional after 'RUN_EXAMPLE -eq 1' block)
    171171                        #
     172
    172173                        # RUNME #{{{
    173174                        RUNME="\
     
    187188                                        \n\
    188189                                        %Mesh Generation #1\n\
    189                                         if any(steps==1) %{{{\n\
     190                                        if any(steps==1)\n\
    190191                                                %initialize md as a new model #help model\n\
    191192                                                %->\n\
     
    205206                                                %->\n\
    206207                                                save ./Models/ISMIP.Mesh_generation md;\n\
    207                                         end %}}}\n\
     208                                        end\n\
    208209                                        \n\
    209210                                        %Masks #2\n\
    210                                         if any(steps==2) %{{{\n\
     211                                        if any(steps==2)\n\
    211212                                                % load the preceding step #help loadmodel\n\
    212213                                                % path is given by the organizer with the name of the given step\n\
     
    223224                                                %->\n\
    224225                                                save ./Models/ISMIP.SetMask md;\n\
    225                                         end %}}}\n\
     226                                        end\n\
    226227                                        \n\
    227228                                        %Parameterization #3\n\
    228                                         if any(steps==3) %{{{\n\
     229                                        if any(steps==3)\n\
    229230                                                % load the preceding step #help loadmodel\n\
    230231                                                % path is given by the organizer with the name of the given step\n\
     
    239240                                                %->\n\
    240241                                                save ./Models/ISMIP.Parameterization md;\n\
    241                                         end %}}}\n\
     242                                        end\n\
    242243                                        \n\
    243244                                        %Extrusion #4\n\
    244                                         if any(steps==4) %{{{\n\
     245                                        if any(steps==4)\n\
    245246                                                \n\
    246247                                                % load the preceding step #help loadmodel\n\
     
    258259                                                %->\n\
    259260                                                save ./Models/ISMIP.Extrusion md;\n\
    260                                         end %}}}\n\
     261                                        end\n\
    261262                                        \n\
    262263                                        %Set the flow computing method #5\n\
    263                                         if any(steps==5) %{{{\n\
     264                                        if any(steps==5)\n\
    264265                                                \n\
    265266                                                % load the preceding step #help loadmodel\n\
     
    274275                                                %->\n\
    275276                                                save ./Models/ISMIP.SetFlow md;\n\
    276                                         end %}}}\n\
     277                                        end\n\
    277278                                        \n\
    278279                                        %Set Boundary Conditions #6\n\
    279                                         if any(steps==6) %{{{\n\
     280                                        if any(steps==6)\n\
    280281                                                \n\
    281282                                                % load the preceding step #help loadmodel\n\
     
    328329                                                %->\n\
    329330                                                save ./Models/ISMIP.BoundaryCondition md;\n\
    330                                         end %}}}\n\
     331                                        end\n\
    331332                                        \n\
    332333                                        %Solving #7\n\
    333                                         if any(steps==7) %{{{\n\
     334                                        if any(steps==7)\n\
    334335                                                % load the preceding step #help loadmodel\n\
    335336                                                % path is given by the organizer with the name of the given step\n\
     
    354355                                                %->\n\
    355356                                                plotmodel(md,'data',md.results.StressbalanceSolution.Vel)\n\
    356                                         end %}}}\n\
     357                                        end\n\
    357358                                        \n\
    358359                                        %Solving #8\n\
    359                                         if any(steps==8) %{{{\n\
     360                                        if any(steps==8)\n\
    360361                                                % load the preceding step #help loadmodel\n\
    361362                                                % path is given by the organizer with the name of the given step\n\
     
    392393                                                %->\n\
    393394                                                plotmodel(md,'data',md.results.TransientSolution(20).Vel)\n\
    394                                         end %}}}\n\
     395                                        end\n\
    395396                        "
    396397                        #}}}
     
    533534                elif [ "${dir}" == "./Mesh" ]; then
    534535                        # 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
    536614                        RUN_EXAMPLE=1
    537615                elif [ "${dir}" == "./Pig" ]; then
    538616                        # STEP_SIX #{{{
    539617                        STEP_SIX="\
    540                                 if any(steps==6) %{{{\n\
     618                                if any(steps==6)\n\
    541619                                        % Load Model\n\
    542620                                        md = loadmodel('./Models/PIG_Control_drag');\n\
     
    554632                                        % Save Model\n\
    555633                                        save ./Models/PIG_ModelHO md;\n\
    556                                 end %}}}\n\
     634                                end\n\
    557635                        "
    558636                        #}}}
     
    651729                fi
    652730
     731                if [ "${dir}" == "./Mesh" ]; then
     732                        rm -f $RUNME_FILE
     733                fi
     734
    653735                if [ "${dir}" == "./Pig" ]; then
    654736                        mv -f DomainOutline.exp DomainOutline.bkp
Note: See TracChangeset for help on using the changeset viewer.