Ignore:
Timestamp:
10/17/19 06:03:43 (5 years ago)
Author:
bdef
Message:

Adding a substeping framework in hydro and part of smb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/m/classes/SMBforcing.m

    r23814 r24240  
    55
    66classdef SMBforcing
    7         properties (SetAccess=public)
    8                 isclimatology = 0;
    9                 mass_balance = NaN;
    10                 requested_outputs      = {};
     7        properties (SetAccess=public)
     8                isclimatology     = 0;
     9                mass_balance      = NaN;
     10                steps_per_step    = 1;
     11                requested_outputs = {};
    1112        end
    1213        methods
     
    5758                                md = checkfield(md,'fieldname','smb.mass_balance','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1);
    5859                        end
     60                        md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
    5961                        md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
    6062                        md = checkfield(md,'fieldname','smb.isclimatology','values',[0 1]);
    6163                        if (self.isclimatology)
    6264                                md = checkfield(md,'fieldname', 'smb.mass_balance', 'size',[md.mesh.numberofvertices+1],...
    63                                         'message',['mass_balance must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
     65                                                'message',['mass_balance must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
    6466                        end
    6567                end % }}}
     
    6870                        fielddisplay(self,'mass_balance','surface mass balance [m/yr ice eq]');
    6971                        fielddisplay(self,'isclimatology','repeat all forcings when past last forcing time (default false)');
     72                        fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
    7073                        fielddisplay(self,'requested_outputs','additional outputs requested');
    7174                end % }}}
     
    7780                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','mass_balance','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
    7881                        %WriteData(fid,prefix,'object',self,'class','smb','fieldname','mass_balance','format','CompressedMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
    79                        
     82                        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
     83
    8084                        %process requested outputs
    8185                        outputs = self.requested_outputs;
     
    9094                end % }}}
    9195                function savemodeljs(self,fid,modelname) % {{{
    92                
     96
    9397                        writejs1Darray(fid,[modelname '.smb.mass_balance'],self.mass_balance);
    9498                        writejscellstring(fid,[modelname '.smb.requested_outputs'],self.requested_outputs);
Note: See TracChangeset for help on using the changeset viewer.