Changeset 26486


Ignore:
Timestamp:
10/18/21 12:20:35 (3 years ago)
Author:
jdquinn
Message:

CHG: MATLAB -> Python; clean up

Location:
issm/trunk-jpl/src/m/classes
Files:
1 added
3 edited

Legend:

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

    r26483 r26486  
    1313                ar_timestep       = 0;
    1414                phi               = NaN;
    15                 covmat            = NaN;       
     15                covmat            = NaN;
    1616                basin_id          = NaN;
    1717                randomflag        = 1;
     
    4343                                self.ar_order = 1; %dummy 1 value for autoregression
    4444                                self.phi      = zeros(self.num_basins,self.ar_order); %autoregression coefficients all set to 0
    45                                 disp('      smb.ar_order (order of autoregressive model) not specified: order of autoregressive model set to 0');       
     45                                disp('      smb.ar_order (order of autoregressive model) not specified: order of autoregressive model set to 0');
    4646                        end
    4747                        if (self.ar_initialtime==0)
    4848                                self.ar_initialtime = md.timestepping.start_time; %autoregression model has no prescribed initial time
    49                                 disp('      smb.ar_initialtime (initial time in the autoregressive model parameterization) not specified: set to md.timestepping.start_time'); 
     49                                disp('      smb.ar_initialtime (initial time in the autoregressive model parameterization) not specified: set to md.timestepping.start_time');
    5050                        end
    5151                        if (self.ar_timestep==0)
    5252                                self.ar_timestep = md.timestepping.time_step; %autoregression model has no prescribed time step
    53                                 disp('      smb.ar_timestep (timestep of autoregressive model) not specified: set to md.timestepping.time_step');       
     53                                disp('      smb.ar_timestep (timestep of autoregressive model) not specified: set to md.timestepping.time_step');
    5454                        end
    5555                        if isnan(self.phi)
     
    114114                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','ar_timestep','format','Double','scale',yts);
    115115                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','basin_id','data',self.basin_id-1,'name','md.smb.basin_id','format','IntMat','mattype',2); %0-indexed
    116                         WriteData(fid,prefix,'object',self,'class','smb','fieldname','beta0','format','DoubleMat','name','md.smb.beta0','scale',1./yts,'yts',md.constants.yts);
    117                         WriteData(fid,prefix,'object',self,'class','smb','fieldname','beta1','format','DoubleMat','name','md.smb.beta1','scale',1./(yts^2),'yts',md.constants.yts);
    118                         WriteData(fid,prefix,'object',self,'class','smb','fieldname','phi','format','DoubleMat','name','md.smb.phi','yts',md.constants.yts);
    119                         WriteData(fid,prefix,'object',self,'class','smb','fieldname','covmat','format','DoubleMat','name','md.smb.covmat','scale',1./(yts^2),'yts',md.constants.yts);
     116                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','beta0','format','DoubleMat','name','md.smb.beta0','scale',1./yts,'yts',yts);
     117                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','beta1','format','DoubleMat','name','md.smb.beta1','scale',1./(yts^2),'yts',yts);
     118                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','phi','format','DoubleMat','name','md.smb.phi','yts',yts);
     119                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','covmat','format','DoubleMat','name','md.smb.covmat','scale',1./(yts^2),'yts',yts);
    120120                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','randomflag','format','Boolean');
    121                         WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
    122                         WriteData(fid, prefix, 'object', self, 'fieldname', 'averaging', 'format', 'Integer');
     121                        WriteData(fid,prefix,'object',self,'fieldname','steps_per_step','format','Integer');
     122                        WriteData(fid,prefix,'object',self,'fieldname','averaging','format','Integer');
    123123
    124124                        %process requested outputs
  • issm/trunk-jpl/src/m/classes/SMBcomponents.m

    r26358 r26486  
    8383
    8484                        WriteData(fid,prefix,'name','md.smb.model','data',2,'format','Integer');
    85                         WriteData(fid,prefix,'object',self,'class','smb','fieldname','accumulation','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
    86                         WriteData(fid,prefix,'object',self,'class','smb','fieldname','runoff','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
    87                         WriteData(fid,prefix,'object',self,'class','smb','fieldname','evaporation','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
     85                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','accumulation','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts);
     86                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','runoff','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts);
     87                        WriteData(fid,prefix,'object',self,'class','smb','fieldname','evaporation','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts);
    8888                        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
    8989                        WriteData(fid, prefix, 'object', self, 'fieldname', 'averaging', 'format', 'Integer');
  • issm/trunk-jpl/src/m/classes/SMBcomponents.py

    r26358 r26486  
    6161        if np.all(np.isnan(self.evaporation)):
    6262            self.evaporation = np.zeros((md.mesh.numberofvertices))
    63             print("      no SMB.evaporation specified: values set as zero")
     63            print('      no SMB.evaporation specified: values set as zero')
    6464        if np.all(np.isnan(self.runoff)):
    6565            self.runoff = np.zeros((md.mesh.numberofvertices))
    66             print("      no SMB.runoff specified: values set as zero")
     66            print('      no SMB.runoff specified: values set as zero')
    6767        return self
    6868    # }}}
Note: See TracChangeset for help on using the changeset viewer.