Changeset 19857


Ignore:
Timestamp:
12/04/15 14:27:30 (9 years ago)
Author:
Mathieu Morlighem
Message:

CHG: no more time stepping in years (old from sea ice model)

Location:
issm/trunk-jpl/src/m/classes
Files:
2 edited

Legend:

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

    r19791 r19857  
    1919                //should we interpolate forcings between timesteps?
    2020                this.interp_forcings=1;
    21 
    22                 //In years by default
    23                 this.in_years = 1;
    24 
    2521        }// }}}
    2622        this.disp= function(){// {{{
    2723                console.log(sprintf('   timestepping parameters:'));
    2824
    29                 if(this.in_years) unit = 'yr';
    30                 else unit = 's';
     25                unit = 'yr';
    3126                fielddisplay(this,'start_time','simulation starting time ['+ unit + ']');
    3227                fielddisplay(this,'final_time','final time to stop the simulation ['+ unit + ']');
     
    3530                fielddisplay(this,'cfl_coefficient','coefficient applied to cfl condition');
    3631                fielddisplay(this,'interp_forcings','interpolate in time between requested forcing values ? (0 or 1)');
    37                 fielddisplay(this,'in_years','time unit, 1: years, 0: seconds');
    38 
    3932
    4033        }// }}}
     
    5851
    5952                        var scale;
    60                         if (this.in_years) scale = 365.0*24.0*3600.0;
    61                         else scale = 1.;
     53                        scale = 365.0*24.0*3600.0;
    6254                       
    6355                        WriteData(fid,'object',this,'fieldname','start_time','format','Double','scale',scale);
     
    7769        this.cfl_coefficient = 0.;
    7870        this.interp_forcings = 1;
    79         this.in_years        = 1;
    8071
    8172        this.setdefaultparameters();
  • issm/trunk-jpl/src/m/classes/timestepping.m

    r19040 r19857  
    1212                cfl_coefficient = 0.;
    1313                interp_forcings = 1;
    14                 in_years        = 1;
    1514        end
    1615        methods
     
    5150                        %should we interpolate forcings between timesteps?
    5251                        self.interp_forcings=1;
    53 
    54                         %In years by default
    55                         self.in_years = 1;
    5652                end % }}}
    5753                function md = checkconsistency(self,md,solution,analyses) % {{{
     
    7066                        disp(sprintf('   timestepping parameters:'));
    7167
    72                         if(self.in_years)
    73                                 unit = 'yr';
    74                         else
    75                                 unit = 's';
    76                         end
     68                        unit = 'yr';
    7769                        fielddisplay(self,'start_time',['simulation starting time [' unit ']']);
    7870                        fielddisplay(self,'final_time',['final time to stop the simulation [' unit ']']);
     
    8173                        fielddisplay(self,'cfl_coefficient','coefficient applied to cfl condition');
    8274                        fielddisplay(self,'interp_forcings','interpolate in time between requested forcing values ? (0 or 1)');
    83                         fielddisplay(self,'in_years','time unit, 1: years, 0: seconds');
    8475
    8576                end % }}}
    8677                function marshall(self,md,fid) % {{{
    8778
    88                         if self.in_years,
    89                                 scale = 365.0*24.0*3600.0;
    90                         else
    91                                 scale = 1.;
    92                         end
     79                        scale = 365.0*24.0*3600.0;
    9380                        WriteData(fid,'object',self,'fieldname','start_time','format','Double','scale',scale);
    9481                        WriteData(fid,'object',self,'fieldname','final_time','format','Double','scale',scale);
Note: See TracChangeset for help on using the changeset viewer.