Changeset 9423


Ignore:
Timestamp:
08/25/11 15:11:19 (14 years ago)
Author:
Mathieu Morlighem
Message:

removed many fields

Location:
issm/trunk/src/m
Files:
4 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk/src/m/classes/model.m

    r9405 r9423  
    1616                 runtimename     = {'',false}; %name used when running a parallel job
    1717                 counter         = {0,false};
    18                  domainoutline   = {NaN,false};
    19                  riftoutline     = {NaN,false};
    20                  iceshelfoutline = {NaN,false};
    21                  icesheetoutline = {NaN,false};
    22                  wateroutline    = {NaN,false};
    23                  parameterfile   = {NaN,false};
    24                  runmefile       = {NaN,false};
    2518
    2619                 %Mesh
     
    109102                 nodeonsurface     = {NaN,true,'BooleanMat',1};
    110103                 minh              = {0,false};
    111                  firn_layer        = {NaN,false};
    112104
    113105                 %Extraction
     
    118110                 rho_ice                    = {0,true,'Double'};
    119111                 rho_water                  = {0,true,'Double'};
    120                  rho_firn                   = {0,false};
    121112                 heatcapacity               = {0,true,'Double'};
    122113                 latentheat                 = {0,true,'Double'};
     
    154145                 bed               = {NaN,true,'DoubleMat',1};
    155146                 bathymetry        = {NaN,true,'DoubleMat',1};
    156                  mask              = {NaN,false};
    157147
    158148                 %Boundary conditions
     
    171161                 vy_obs                    = {NaN,true,'DoubleMat',1};
    172162                 vel_obs                   = {NaN,false};
    173                  vx_obs_raw                = {NaN,false};
    174                  vy_obs_raw                = {NaN,false};
    175                  vx_bal                    = {NaN,false};
    176                  vy_bal                    = {NaN,false};
    177                  vel_bal                   = {NaN,false};
    178                  vel_obs_raw               = {NaN,false};
    179                  surface_accumulation_rate = {NaN,true,'DoubleMat',1};
     163                 surface_accumulation_rate = {NaN,true,'DoubleMat',3};
    180164                 surface_ablation_rate     = {NaN,true,'DoubleMat',1};
    181165                 surface_mass_balance      = {NaN,true,'DoubleMat',1};
    182166                 dhdt                      = {NaN,true,'DoubleMat',1};
    183167                 geothermalflux            = {NaN,true,'DoubleMat',1};
    184                  observed_temperature      = {NaN,false};
    185168                 thickness_obs             = {NaN,true,'DoubleMat',1};
    186 
    187                  %Forcings
    188                  forcings = {struct(),false};
    189169
    190170                 %Statics parameters
     
    207187                 artificial_diffusivity = {0,true,'Integer'};
    208188                 prognostic_DG          = {0,true,'Integer'};
    209                  deltaH                 = {0,false};
    210                  DeltaH                 = {0,false};
    211                  deltaT                 = {0,false};
    212                  DeltaT                 = {0,false};
    213                  timeacc                = {0,false};
    214                  timedec                = {0,false};
    215189                 hydrostatic_adjustment = {0,true,'Integer'};
    216190                 isprognostic = {0,true,'Boolean'};
     
    237211                 %Output
    238212                 requested_outputs                    = {[],true,'DoubleMat',3};
    239                  viscousheating                      = {NaN,false};
    240                  pressure_elem                       = {NaN,false};
    241                  stress                              = {NaN,false};
    242                  stress_surface                      = {NaN,false};
    243                  stress_bed                          = {NaN,false};
    244                  deviatoricstress                    = {NaN,false};
    245                  strainrate                          = {NaN,false};
    246213                 %Debugging
    247214                 verbose                             = {0,true,'Integer'};
    248                  element_debug                       = {0,false};
    249                  element_debugid                     = {NaN,false};
    250215                 mem_debug                           = {0,false};
    251216                 gprof                               = {0,false};
    252                  memoryleaks                         = {NaN,false};
    253217                 %Results fields
    254218                 output_frequency                    = {0,true,'Integer'};
     
    282246                 outlog        = {'',false};
    283247                 errlog        = {'',false};
    284                  alloc_cleanup = {1,false};
    285248                 waitonlock    = {0,true,'Boolean'};
    286249
     
    288251                 dummy = {NaN,false};
    289252
    290                  %mesh
    291                  mesh_domainoutline = {'',false};
    292                  mesh_riftoutline   = {'',false};
    293                  mesh_resolution    = {NaN,false};
    294 
    295253                 %PETSc and MATLAB solver string
    296254                 petscoptions  = {NaN,false};
     
    298256                 %Analysis
    299257                 solution_type = {'',false};
    300 
    301                  %management of large models
    302                  repository    = {'',false};
    303258
    304259                 %radar power images
     
    342297                 groundingline_migration = {0,true,'Integer'};
    343298
    344                  %solution parameters
    345                  loadresults = {0,false};
    346 
    347299                 %partitioner:
    348300                 adjacency = {[],false};
     
    401353
    402354                                 case 1
    403                                          %If single argument of class model, we have a copy constructor.
    404                                          if (isa(varargin{1},'model'))
    405                                                  md = varargin{1};
    406                                          elseif (isa(varargin{1},'char'))
    407                                                  %user gave us the name of the repository, this model is going to be large!
    408                                                  md=model;
    409                                                  md.repository=varargin{1};
    410                                                  md=activaterepository(md);
    411                                          elseif (isa(varargin{1},'numeric'))
    412                                                  if varargin{1}==0,
     355                                         in=varargin{1};
     356                                         if (isa(in,'model'))
     357                                                 %If single argument of class model, we have a copy constructor.
     358                                                 md = in;
     359                                         elseif (isa(in,'numeric') & in==0)
    413360                                                         %just requesting model, without default parameters, do nothing.
    414                                                  else
    415                                                          error('model constructor error message: unknown constructor call');
    416                                                  end
    417361                                         else
    418                                                  error('model constructor error message: copy constructor called on a non ''model'' class object');
     362                                                 error('model constructor error message: unknown constructor for ''model'' class object');
    419363                                         end
    420364
     
    424368                 end
    425369                 %}}}
    426                  function md = activaterepository(md) % {{{1
    427                          %ACTIVATEREPOSITORY - save the model fields separately
    428                          %
    429                          %   This function is required when a matlab session
    430                          %   is running low on memory, or when a model is very large.
    431                          %   By activating a repository (for example, 'repository.model'),
    432                          %   the model fields will each separately be saved and accessed when
    433                          %   needed. This will limit the memory use at the maximum;
    434                          %
    435                          %   Usage:
    436                          %      md=activaterepository(md)
    437 
    438 
    439                          %for each field of the model, we create an equivalent variable, with the same name, which we
    440                          %save in the repository.
    441 
    442                          modelfields=fields(md);
    443 
    444                          %then save each of the big fields in their respective files
    445                          for i=1:length(modelfields),
    446                                  field=char(modelfields(i));
    447                                  eval([field '=md.' field ';']);
    448 
    449                                  %anything NaN, will be saved
    450 
    451                                  if isnumeric(eval(field)),
    452                                          if isnan(eval(field)),
    453                                                  if exist(['.' md.repository '.' field],'file');
    454                                                          error(['Repository ' md.repository ' already exists! Delete all files starting with .' md.repository ' in your directory, before activating a new repository']);
    455                                                  end
    456                                                  eval(['save .' md.repository '.' field ' ' field]);
    457                                          end
    458                                  end
    459                          end
    460                  end % }}}
    461370                 function disp(md) % {{{1
    462371                         disp(sprintf('\n%s = \n',inputname(1)));
     
    492401                         end
    493402
    494                          %repository
    495                          if ~isempty(md.repository),
    496                                  disp(sprintf('   Repository: %s',md.repository));
    497                          end
    498 
    499403                         %diverse
    500                          disp(sprintf('   Mesh: %s',md.repository));
     404                         disp(sprintf('   Mesh:');
    501405                         disp(sprintf('%s%s%s','      Mesh: type ''',inputname(1),'.mesh'' to display'));
    502                          disp(sprintf('   Parameters: %s',md.repository));
     406                         disp(sprintf('   Parameters:');
    503407                         disp(sprintf('%s%s%s','      Boundary conditions: type ''',inputname(1),'.bc'' to display'));
    504408                         disp(sprintf('%s%s%s','      Observations: type ''',inputname(1),'.obs'' to display'));
     
    506410                         disp(sprintf('%s%s%s','      Parameters: type ''',inputname(1),'.par'' to display'));
    507411                         disp(sprintf('%s%s%s','      ExpPar: type ''',inputname(1),'.exppar'' to display'));
    508                          disp(sprintf('   Solution parameters: %s',md.repository));
     412                         disp(sprintf('   Solution parameters: %s');
    509413                         disp(sprintf('%s%s%s','      Qmu: type ''',inputname(1),'.qmu'' to display'));
    510414                         disp(sprintf('%s%s%s','      FLAIM: type ''',inputname(1),'.flaim'' to display'));
     
    624528                         md.rho_water=1023;
    625529
    626                          %firn density (kg/m^3)
    627                          md.rho_firn=830;
    628 
    629530                         %ice heat capacity cp (J/kg/K)
    630531                         md.heatcapacity=2093;
     
    757658                         md.prognostic_DG=0;
    758659
    759                          %minimum thickness change between 2 time steps (m)
    760                          md.deltaH=10^-2;
    761 
    762                          %maximum thickness change between 2 time steps (m)
    763                          md.DeltaH=50;
    764 
    765                          %minimum temperature change between 2 time steps (K)
    766                          md.deltaT=10^-2;
    767 
    768                          %maximum temperature change between 2 time steps (K)
    769                          md.DeltaT=1;
    770 
    771                          %When the previous criteria are fulfilled, if the time steps
    772                          %can be accelerated as follows
    773                          %dt = timeacc * dt
    774                          md.timeacc=2;
    775 
    776                          %When the previous criteria are fulfilled, if the time steps
    777                          %can be reduced as follows
    778                          %dt = timedec * dt
    779                          md.timedec=.5;
    780 
    781660                         %Solution activated for transient runs. By default we do a
    782661                         %full analysis: Diagnostic, Prognostic and Thermal
     
    847726                         md.waitonlock=Inf;
    848727
    849                          %prerun allocation cleanup
    850                          md.alloc_cleanup=1;
    851 
    852728                         %hydrology:  from Johnson's 2002 thesis, section 3.5.4                 
    853729                         md.hydro_n=.02;                         
     
    869745                 end
    870746                 %}}}
    871                  function md = subsasgn(md,index,val) % {{{1
    872 
    873                          if ~isempty(md.repository),
    874                                  field=index(1).subs;
    875                                  if exist(['.' md.repository '.' field],'file'),
    876                                          if length(index)==1,
    877                                                  %save val in corresponding repository
    878                                                  eval([field '=val;']);
    879                                                  eval(['save .' md.repository '.' field ' ' field]);
    880                                          else
    881                                                  %load field from file
    882                                                  load(['.' md.repository '.' field],'-mat');
    883                                                  fieldval=eval(field);
    884                                                  eval([field '=builtin(''subsasgn'',fieldval,index(2),val);']);
    885                                                  eval(['save .' md.repository '.' field ' ' field]);
    886                                          end
    887                                  else
    888                                          md=builtin('subsasgn',md,index,val);
    889                                  end
    890                          else
    891                                  md=builtin('subsasgn',md,index,val);
    892                          end
    893          end %}}}
    894747                 function result = subsref(md,index) % {{{1
    895748
     
    911764                                 if(strcmp(index1.subs,'control')), displaycontrol(md);return; end
    912765                                 if(strcmp(index1.subs,'parallel')), displayparallel(md);return; end
    913 
    914                                  if ~isempty(md.repository),
    915                                          %load variable needed, if necessary
    916                                          if exist(['.' md.repository '.' index1.subs],'file'),
    917                                                  structure=load(['.' md.repository '.' index1.subs],'-mat');
    918                                                  eval(['result=structure.' index1.subs ';']);
    919                                          else
    920                                                  %the file does not exist, just return built in value
    921                                                  result=builtin('subsref',md,index);
    922                                          end
    923                                  else
    924                                          %return built in value
    925                                          result=builtin('subsref',md,index);
    926                                  end
    927                          else
    928                                  if ~isempty(md.repository),
    929                                          if exist(['.' md.repository '.' index(1).subs],'file'),
    930                                                  %load variable needed
    931                                                  variable=load(['.' md.repository '.' index(1).subs],'-mat');
    932 
    933                                                  %use temporary structure.
    934                                                  result=builtin('subsref',variable,index);
    935                                          else
    936                                                  result=builtin('subsref',md,index);
    937                                          end
    938                                  else
    939                                          result=builtin('subsref',md,index);
    940                                  end
    941                          end
     766                         end
     767
     768                         %return built in value
     769                         result=builtin('subsref',md,index);
    942770                 end %}}}
    943771         end
  • TabularUnified issm/trunk/src/m/classes/organizer.m

    r8171 r9423  
    142142                         if (org.currentstep>length(org.steps)), error(['organizer error message: element with id ' num2str(org.currentstep) ' not found']); end
    143143
    144                          %before saving model, try and find a runme.m file, and save it.
    145                          A=dbstack;
    146                          if length(A)>=2,
    147                                  runmefilename=A(2).file;
    148                                  md.runmefile=char(textread(runmefilename,'%s','delimiter','\n'));
    149                          end
    150 
    151144                         %save model
    152145                         save(name,'md','-v7.3');
  • TabularUnified issm/trunk/src/m/model/collapse.m

    r8823 r9423  
    3131if ~isnan(md.surface_mass_balance), md.surface_mass_balance=project2d(md,md.surface_mass_balance,md.numlayers); end;
    3232if ~isnan(md.dhdt), md.dhdt=project2d(md,md.dhdt,md.numlayers); end;
    33 if ~isnan(md.firn_layer), md.firn_layer=project2d(md,md.firn_layer,md.numlayers); end;
    3433
    3534%results
     
    7978%special for thermal modeling:
    8079md.basal_melting_rate=project2d(md,md.basal_melting_rate,1);
    81 md.observed_temperature=DepthAverage(md,md.observed_temperature);
    8280md.geothermalflux=project2d(md,md.geothermalflux,1); %bedrock only gets geothermal flux
    8381
  • TabularUnified issm/trunk/src/m/model/extrude.m

    r9184 r9423  
    154154md.surface_ablation_rate=project3d(md,'vector',md.surface_ablation_rate,'type','node');
    155155md.dhdt=project3d(md,'vector',md.dhdt,'type','node');
    156 md.firn_layer=project3d(md,'vector',md.firn_layer,'type','node','layer',md.numlayers);
    157156
    158157%results
     
    243242%special for thermal modeling:
    244243md.basal_melting_rate=project3d(md,'vector',md.basal_melting_rate,'type','node','layer',1);
    245 md.observed_temperature=project3d(md,'vector',md.observed_temperature,'type','node');
    246244if ~isnan(md.geothermalflux)
    247245        md.geothermalflux=project3d(md,'vector',md.geothermalflux,'type','node','layer',1); %bedrock only gets geothermal flux
    248246end
    249 
    250 %mask:
    251 md.mask=project3d(md,'vector',md.mask,'type','node');
    252247
    253248%increase connectivity if less than 25:
  • TabularUnified issm/trunk/src/m/model/geography.m

    r8298 r9423  
    5959md.nodeonwater=zeros(md.numberofnodes,1);
    6060md.elementonwater=zeros(md.numberofelements,1);
    61 
    62 %Keep track of input files
    63 if (strcmp(iceshelfname,'') | strcmp(iceshelfname,'all')),
    64         md.iceshelfoutline=iceshelfname;
    65 elseif ischar(iceshelfname),
    66         md.iceshelfoutline=char(textread(iceshelfname,'%s','delimiter','\n'));
    67 else
    68         md.iceshelfoutline=iceshelfname;
    69 end
    70 if (strcmp(icesheetname,'') | strcmp(icesheetname,'all')),
    71         md.icesheetoutline=icesheetname;
    72 elseif ischar(icesheetname),
    73         md.icesheetoutline=char(textread(icesheetname,'%s','delimiter','\n'));
    74 else
    75         md.icesheetoutline=icesheetname;
    76 end
  • TabularUnified issm/trunk/src/m/model/mechanicalproperties.m

    r8298 r9423  
    44%   this routine computes the components of the stress tensor
    55%   strain rate tensor and their respective principal directions.
    6 %   the results are in the model md: md.stress and md.strainrate
     6%   the results are in the model md: md.results
    77%
    88%   Usage:
     
    9494stress.principalaxis1=directionsstress(:,3:4);
    9595stress.effectivevalue=1/sqrt(2)*sqrt(stress.xx.^2+stress.yy.^2+2*stress.xy.^2);
    96 md.stress=stress;
     96md.results.stress=stress;
    9797
    9898strainrate=struct('xx',[],'yy',[],'xy',[],'principalvalue1',[],'principalaxis1',[],'principalvalue2',[],'principalaxis2',[],'effectivevalue',[]);
     
    105105strainrate.principalaxis1=directionsstrain(:,3:4);
    106106strainrate.effectivevalue=1/sqrt(2)*sqrt(strainrate.xx.^2+strainrate.yy.^2+2*strainrate.xy.^2);
    107 md.strainrate=strainrate;
     107md.results.strainrate=strainrate;
    108108
    109109deviatoricstress=struct('xx',[],'yy',[],'xy',[],'principalvalue1',[],'principalaxis1',[],'principalvalue2',[],'principalaxis2',[],'effectivevalue',[]);
     
    116116deviatoricstress.principalaxis1=directionsstress(:,3:4);
    117117deviatoricstress.effectivevalue=1/sqrt(2)*sqrt(stress.xx.^2+stress.yy.^2+2*stress.xy.^2);
    118 md.deviatoricstress=deviatoricstress;
     118md.results.deviatoricstress=deviatoricstress;
  • TabularUnified issm/trunk/src/m/model/mesh/mesh.m

    r8298 r9423  
    8282md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity);
    8383
    84 %outline names
    85 md.domainoutline=char(textread(domainname,'%s','delimiter','\n'));
    86 if strcmp(riftname,''),
    87         md.riftoutline='';
    88 else
    89         md.riftoutline=readfile(riftname);
    90 end
    91 
    9284%type of model
    9385md.dim=2;
  • TabularUnified issm/trunk/src/m/model/mesh/meshnodensity.m

    r8298 r9423  
    6868md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity);
    6969
    70 %outline names
    71 md.domainoutline=char(textread(domainname,'%s','delimiter','\n'));
    72 if strcmp(riftname,''),
    73         md.riftoutline='';
    74 else
    75         md.riftoutline=readfile(riftname);
    76 end
    77 
    7870%type of model
    7971md.dim=2;
  • TabularUnified issm/trunk/src/m/model/parameterization/parameterize.m

    r9181 r9423  
    6868end
    6969
    70 %Keep track of parameter file
    71 md.parameterfile=char(textread(parametername,'%s','delimiter','\n'));
    72 
    7370%Name and notes
    7471if isempty(md.name),
  • TabularUnified issm/trunk/src/m/model/plot/plot_tensor.m

    r2439 r9423  
    1515
    1616%Figure out tensor type:
     17%FIXME does not work anymore
    1718if strncmpi(type,'strain',6),
    1819        tensor=md.strainrate;
  • TabularUnified issm/trunk/src/m/model/process_solve_options.m

    r9401 r9423  
    99%solution_type: check on this option, error out otherwise
    1010solution_type=getfieldvalue(options,'solution_type');
    11 if ischar(solution_type), error(['only Enums are supported as ''solution_type''. For example: md=solve(md,''solution_type'',DiagnosticSolutionEnum); ']); end
    1211if ~ismember(solution_type,[DiagnosticSolutionEnum,PrognosticSolutionEnum,ThermalSolutionEnum,...
    1312                SteadystateSolutionEnum,ParametersSolutionEnum,TransientSolutionEnum,EnthalpySolutionEnum,...
     
    1918outoptions.upload=getfieldvalue(options,'upload','off');
    2019outoptions.batch=getfieldvalue(options,'batch','no');
     20outoptions.loadonly=getfieldvalue(options,'loadonly','no');
    2121outoptions.directory=getfieldvalue(options,'directory','');
    2222
  • TabularUnified issm/trunk/src/m/model/solveparallel.m

    r8577 r9423  
    88cluster=md.cluster;
    99
    10 if ~md.loadresults, 
     10if options.loadonly, 
     11        md=loadresultsfromcluster(md);
     12else
    1113
    1214        %First, build a runtime name that is unique, that we will use to create
     
    4547                error('solveparallel done uploading test decks');
    4648        end
    47 else
    48         %just load results
    49         md=loadresultsfromcluster(md);
     49
    5050end
  • TabularUnified issm/trunk/src/m/utils/BC/SetIceSheetBC.m

    r9407 r9423  
    3636if isnan(md.surface_accumulation_rate),
    3737        md.surface_accumulation_rate=zeros(md.numberofnodes,1);
    38         md.forcings.surface_accumulation_rate=zeros(md.numberofnodes+1,1);
    3938        disp('      no surface_accumulation_rate specified: values set as zero');
    4039end
    4140if isnan(md.surface_ablation_rate),
    4241        md.surface_ablation_rate=zeros(md.numberofnodes,1);
    43         md.forcings.surface_ablation_rate=zeros(md.numberofnodes+1,1);
    4442        disp('      no surface_ablation_rate specified: values set as zero');
    4543end
    4644if isnan(md.surface_mass_balance),
    4745        md.surface_mass_balance=zeros(md.numberofnodes,1);
    48         md.forcings.surface_mass_balance=zeros(md.numberofnodes+1,1);
    4946        disp('      no surface_mass_balance specified: values set as zero');
    5047end
     
    6057md.spcthickness=NaN*ones(md.numberofnodes,1);
    6158
    62 if (length(md.observed_temperature)==md.numberofnodes),
     59if (length(md.temperature)==md.numberofnodes),
    6360        md.spctemperature=NaN*ones(md.numberofnodes,1);
    64         pos=find(md.nodeonsurface); md.spctemperature(pos)=md.observed_temperature(pos); %impose observed temperature on surface
     61        pos=find(md.nodeonsurface); md.spctemperature(pos)=md.temperature(pos); %impose observed temperature on surface
    6562        if (length(md.geothermalflux)~=md.numberofnodes),
    6663                md.geothermalflux=50*10^-3*ones(md.numberofnodes,1); %50 mW/m^2
  • TabularUnified issm/trunk/src/m/utils/BC/SetIceShelfBC.m

    r9075 r9423  
    6868if isnan(md.surface_accumulation_rate),
    6969        md.surface_accumulation_rate=zeros(md.numberofnodes,1);
    70         md.forcings.surface_accumulation_rate=zeros(md.numberofnodes+1,1);
    7170        disp('      no surface_accumulation_rate specified: values set as zero');
    7271end
    7372if isnan(md.surface_ablation_rate),
    7473        md.surface_ablation_rate=zeros(md.numberofnodes,1);
    75         md.forcings.surface_ablation_rate=zeros(md.numberofnodes+1,1);
    7674        disp('      no surface_ablation_rate specified: values set as zero');
    7775end
    7876if isnan(md.surface_mass_balance),
    7977        md.surface_mass_balance=zeros(md.numberofnodes,1);
    80         md.forcings.surface_mass_balance=zeros(md.numberofnodes+1,1);
    8178        disp('      no surface_mass_balance specified: values set as zero');
    8279end
     
    9289md.spcthickness=NaN*ones(md.numberofnodes,1);
    9390
    94 if (length(md.observed_temperature)==md.numberofnodes),
     91if (length(md.temperature)==md.numberofnodes),
    9592        md.spctemperature=NaN*ones(md.numberofnodes,1);
    96         pos=find(md.nodeonsurface); md.spctemperature(pos)=md.observed_temperature(pos); %impose observed temperature on surface
     93        pos=find(md.nodeonsurface); md.spctemperature(pos)=md.temperature(pos); %impose observed temperature on surface
    9794        if (length(md.geothermalflux)~=md.numberofnodes),
    9895                md.geothermalflux=zeros(md.numberofnodes,1);
  • TabularUnified issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m

    r9075 r9423  
    7979if isnan(md.surface_accumulation_rate),
    8080        md.surface_accumulation_rate=zeros(md.numberofnodes,1);
    81         md.forcings.surface_accumulation_rate=zeros(md.numberofnodes+1,1);
    8281        disp('      no surface_accumulation_rate specified: values set as zero');
    8382end
    8483if isnan(md.surface_ablation_rate),
    8584        md.surface_ablation_rate=zeros(md.numberofnodes,1);
    86         md.forcings.surface_ablation_rate=zeros(md.numberofnodes+1,1);
    8785        disp('      no surface_ablation_rate specified: values set as zero');
    8886end
    8987if isnan(md.surface_mass_balance),
    9088        md.surface_mass_balance=zeros(md.numberofnodes,1);
    91         md.forcings.surface_mass_balance=zeros(md.numberofnodes+1,1);
    9289        disp('      no surface_mass_balance specified: values set as zero');
    9390end
     
    103100md.spcthickness=NaN*ones(md.numberofnodes,1);
    104101
    105 if (length(md.observed_temperature)==md.numberofnodes),
     102if (length(md.temperature)==md.numberofnodes),
    106103        md.spctemperature=NaN*ones(md.numberofnodes,1);
    107         pos=find(md.nodeonsurface); md.spctemperature(pos)=md.observed_temperature(pos); %impose observed temperature on surface
     104        pos=find(md.nodeonsurface); md.spctemperature(pos)=md.temperature(pos); %impose observed temperature on surface
    108105        if (length(md.geothermalflux)~=md.numberofnodes),
    109106                md.geothermalflux=zeros(md.numberofnodes,1);
  • TabularUnified issm/trunk/src/m/utils/Interp/PatchToVec.m

    r9085 r9423  
    44%   Usage:
    55%      vec=PatchToVec(Patch)
     6
     7connectivity=sparse(Patch.index(:),1,1);
     8value       =sparse(Patch.index(:),1,Patch.value(:));
     9vec=full(value./connectivity);
     10return;
    611
    712%if the patch is P0: we have element values, return an element vector
  • TabularUnified issm/trunk/src/m/utils/Mesh/argusmesh.m

    r8298 r9423  
    8989md.counter=1;
    9090md.dim=2;
    91 md.riftoutline='';
    92 md.domainoutline=['' infile ''];
    9391md=addnote(md,notes);
    9492
  • TabularUnified issm/trunk/src/m/utils/Mesh/squaremesh.m

    r8298 r9423  
    7979md.dim=2;
    8080md.counter=1;
    81 md.riftoutline='';
    82 md.domainoutline='Square';
Note: See TracChangeset for help on using the changeset viewer.