Changeset 18203


Ignore:
Timestamp:
06/30/14 18:19:51 (11 years ago)
Author:
schlegel
Message:

CHG: update runmes for tutorials

Location:
issm/trunk-jpl/examples
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/examples/ISMIP/CheatyRunme.m

    r18198 r18203  
    33%step 8 is specific to ISMIPF
    44
    5 steps=[1 2 3 4 5 6 8];
     5steps=[1:7];
    66
    77% parameter file to be used, choose between CheatyIsmipA.par or CheatyIsmipF.par
    88ParamFile='CheatyIsmipF.par'
    99
    10 name_prefix='ISMIP';
    1110%Run Steps
    12 org=organizer('repository','./Models','prefix',name_prefix,'steps',steps);
    1311
    1412% {{{ Mesh Generation #1
    15 if perform(org,'Mesh_Generation')
     13if any(steps==1)
    1614
    1715        %initialize md as a new model #help model
     
    3129        % save the given model
    3230        %->
    33         savemodel(org,md);
     31        save ./Models/ISMIP.Mesh_generation md;
    3432end
    3533% }}}
    3634
    3735% {{{ 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');
     36if 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');
    4442        % set the mask #help setmask
    4543        % all MISMIP nodes are grounded
     
    5149        % save the given model
    5250        %->
    53         savemodel(org,md);
     51        save ./Models/ISMIP.SetMask md;
    5452end
    5553% }}}
    5654
    5755% {{{ 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');
     56if 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');
    6462        % parametrize the model # help parameterize
    6563        % you will need to fil-up the parameter file defined by the
    66   % ParamFile variable
     64        % ParamFile variable
    6765        %->
    6866        md=parameterize(md,ParamFile);
    6967        % save the given model
    7068        %->
    71         savemodel(org,md);
     69        save ./Models/ISMIP.Parameterization md;
    7270end
    7371% }}}
    7472
    7573% {{{ Extrusion #4
    76 if perform(org,'Extrusion')
     74if any(steps==4)
    7775       
    7876        % load the preceding step #help loadmodel
    7977        % path is given by the organizer with the name of the given step
    8078        %->
    81         md=loadmodel(org,'Parameterization');
     79        md = loadmodel('./Models/ISMIP.Parameterization');
    8280        % vertically extrude the preceding mesh #help extrude
    8381        % only 5 layers exponent 1
     
    8987        % save the given model
    9088        %->
    91         savemodel(org,md);
     89        save ./Models/ISMIP.Extrusion md;
    9290end
    9391% }}}
    9492
    9593% {{{ 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');
     94if 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');
    103100        % set the approximation for the flow computation #help setflowequation
    104101        % We will be using the Higher Order Model (HO)
     
    107104        % save the given model
    108105        %->
    109         savemodel(org,md);
     106        save ./Models/ISMIP.SetFlow md;
    110107end
    111108% }}}
    112109
    113110% {{{ 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');
     111if 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');
    120117        % dirichlet boundary condition are known as SPCs
    121118        % ice frozen to the base, no velocity   #md.stressbalance
     
    130127        %->
    131128        basalnodes=find(md.mesh.vertexonbase);
    132   % set the sliding to zero on the bed
     129        % set the sliding to zero on the bed
    133130        %->
    134131        md.stressbalance.spcvx(basalnodes)=0.0;
     
    162159        % save the given model
    163160        %->
    164         savemodel(org,md);
     161        save ./Models/ISMIP.BoundaryCondition md;
    165162end
    166163% }}}
    167164
    168165% {{{ 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');
     166if 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');
    174171        % Set cluster #md.cluster
    175172        % generic parameters #help generic
     
    186183        % save the given model
    187184        %->
    188         savemodel(org,md);
     185        save ./Models/ISMIP.StressBalance md;
    189186        % plot the surface velocities #plotdoc
    190187        %->
     
    194191
    195192% {{{ 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');
     193if 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');
    201198        % Set cluster #md.cluster
    202199        % generic parameters #help generic
     
    225222        % save the given model
    226223        %->
    227         savemodel(org,md);
     224        save ./Models/ISMIP.Transient md;
    228225        % plot the surface velocities #plotdoc
    229226        %->
  • issm/trunk-jpl/examples/ISMIP/runme.m

    r18198 r18203  
    88ParamFile='IsmipA.par'
    99
    10 name_prefix='ISMIP';
    1110%Run Steps
    12 org=organizer('repository','./Models','prefix',name_prefix,'steps',steps);
    1311
    1412% {{{ Mesh Generation #1
    15 if perform(org,'Mesh_Generation')
     13if any(steps==1)
    1614
    1715        %initialize md as a new model #help model
     
    3230
    3331% {{{ Masks #2
    34 if perform(org,'SetMask'),
     32if any(steps==2)
    3533
    3634        % load the preceding step #help loadmodel
     
    5250
    5351% {{{ Parameterization #3
    54 if perform(org,'Parameterization')
     52if any(steps==3)
    5553
    5654        % load the preceding step #help loadmodel
     
    7068
    7169% {{{ Extrusion #4
    72 if perform(org,'Extrusion')
     70if any(steps==4)
    7371       
    7472        % load the preceding step #help loadmodel
     
    9189% {{{ Set the flow computing method #5
    9290
    93 if perform(org,'SetFlow')
     91if any(steps==5)
    9492
    9593        % load the preceding step #help loadmodel
     
    108106
    109107% {{{ Set Boundary Conditions #6
    110 if perform(org,'BoundaryCondition')
     108if any(steps==6)
    111109
    112110        % load the preceding step #help loadmodel
     
    162160
    163161% {{{ Solving #7
    164 if perform(org,'SolvingISMIPA')
     162if any(steps==7)
    165163        % load the preceding step #help loadmodel
    166164        % path is given by the organizer with the name of the given step
     
    188186
    189187% {{{ Solving #8
    190 if perform(org,'SolvingISMIPF')
     188if any(steps==8)
    191189        % load the preceding step #help loadmodel
    192190        % 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;
     1step=3;
    22if step==1
    33        %Generate observation
     
    4747        md.inversion.control_parameters = {'FrictionCoefficient'};
    4848        md.inversion.maxsteps = maxsteps;
    49     md.inversion.dxmin=10^-6;
     49        md.inversion.dxmin=10^-6;
    5050        md.inversion.cost_functions = [103 501];
    5151        md.inversion.cost_functions_coefficients = ones(md.mesh.numberofvertices,2);
    52     md.inversion.cost_functions_coefficients(:,2)=0;
     52        md.inversion.cost_functions_coefficients(:,2)=0;
    5353        md.inversion.min_parameters    = 10^-5*ones(md.mesh.numberofvertices,1);
    5454        md.inversion.max_parameters    = 100*ones(md.mesh.numberofvertices,1);
  • issm/trunk-jpl/examples/UncertaintyQuantification/runme.m

    r18198 r18203  
    11%PIG Uncertainty Quantification Application
    2 steps=[3]; eval(['addpath ' pwd]);
     2steps=[3];
    33
    44if any(steps==1)
    55        disp('   Step 1: plot flux gates');
    66       
    7         md = loadmodel('../Data/PIG.Control_drag_default');
     7        md = loadmodel('../Pig/Models/PIG.Control_drag');
    88
    99        texts=cell(1,13);
     
    1111
    1212        for i=1:13,
    13                 contour=expread(['./Exp_Par/MassFluxes/MassFlux' num2str(i) '.exp']);
     13                contour=expread(['./MassFluxes/MassFlux' num2str(i) '.exp']);
    1414                textpositions{i}=[contour.x(end) contour.y(end)];
    1515        end
    1616
    1717        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'},...
    2525                'expstyle',{'k-','k-','k-','k-','k-','k-','k-',...
    2626                'k-','k-','k-','k-','k-','k-'},'linewidth',2,...
     
    3333        disp('   Step 2: compute cross overs from CRESIS');
    3434       
    35         md = loadmodel('../Data/PIG.Control_drag_default');
     35        md = loadmodel('../Pig/Models/PIG.Control_drag');
    3636
    3737        %load cross overs: CRESIS McCord Antarctica, 2009 (courtesy of John Paden)
     
    4545
    4646        %filter out unrealistic error ranges
    47         flags=ContourToNodes(md.mesh.x,md.mesh.y,'Exp_Par/ErrorContour.exp',1);
     47        flags=ContourToNodes(md.mesh.x,md.mesh.y,'ErrorContour.exp',1);
    4848        pos=find(~flags); DeltaHH(pos)=0;
    4949
     
    6464       
    6565        %load model and cross over errors
    66         md = loadmodel('../Data/PIG.Control_drag_default');
     66        md = loadmodel('../Pig/Models/PIG.Control_drag');
    6767        load -mat Models/PIG.CrossOvers
    6868
     
    123123                                   'MassFlux12.exp',...
    124124                                   'MassFlux13.exp'};
    125         md.qmu.mass_flux_profile_directory='../Exp_Par/MassFluxes/';
     125        md.qmu.mass_flux_profile_directory='../MassFluxes/';
    126126
    127127        %%  sampling analysis
     
    152152       
    153153        %load model
    154         md = loadmodel('../Data/PIG.Control_drag_default');
     154        md = loadmodel('../Pig/Models/PIG.Control_drag');
    155155
    156156        %partition the mesh
     
    197197                                   'MassFlux12.exp',...
    198198                                   'MassFlux13.exp'};
    199         md.qmu.mass_flux_profile_directory='../Exp_Par/MassFluxes/';
     199        md.qmu.mass_flux_profile_directory='../MassFluxes/';
    200200
    201201        %method: local reliability
     
    268268
    269269        plotmodel(md,'data',sh,'data',sa,'data',sb,'expdisp#all',...
    270                 ['Exp_Par/MassFluxes/MassFlux' num2str(index) '.exp'],...
     270                ['MassFluxes/MassFlux' num2str(index) '.exp'],...
    271271                'expstyle#all','b-','linewidth#all',2,...
    272272                'nlines',3,'ncols',1, 'axis#all','image',...
     
    281281
    282282        plotmodel(md,'data',ifh,'data',ifa,'data',ifb,'expdisp#all',...
    283                 ['Exp_Par/MassFluxes/MassFlux' num2str(index) '.exp'],...
     283                ['MassFluxes/MassFlux' num2str(index) '.exp'],...
    284284                'expstyle#all','b-','linewidth#all',2,'log#all',10,...
    285285                'nlines',3,'ncols',1, 'axis#all','image','caxis#all',[1e-10 1],...
Note: See TracChangeset for help on using the changeset viewer.