Changeset 18000


Ignore:
Timestamp:
05/14/14 14:38:28 (11 years ago)
Author:
schlegel
Message:

NEW: add SMB components and interpolation option

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

Legend:

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

    r17931 r18000  
    1111                time_adapt      = 0;
    1212                cfl_coefficient = 0.;
     13                interp_forcings = 1;
    1314        end
    1415        methods
     
    4647                        obj.time_adapt=0;
    4748                        obj.cfl_coefficient=0.5;
     49
     50                        %should we interpolate forcings between timesteps?
     51                        obj.interp_forcings=1;
    4852                end % }}}
    4953                function md = checkconsistency(obj,md,solution,analyses) % {{{
     
    5458                        md = checkfield(md,'fieldname','timestepping.time_adapt','numel',[1],'values',[0 1]);
    5559                        md = checkfield(md,'fieldname','timestepping.cfl_coefficient','numel',[1],'>',0,'<=',1);
     60                        md = checkfield(md,'fieldname','timestepping.interp_forcings','numel',[1],'values',[0 1]);
    5661                        if obj.final_time-obj.start_time<0,
    5762                                md = checkmessage(md,'timestepping.final_time should be larger than timestepping.start_time');
     
    6671                        fielddisplay(obj,'time_adapt','use cfl condition to define time step ? (0 or 1) ');
    6772                        fielddisplay(obj,'cfl_coefficient','coefficient applied to cfl condition');
     73                        fielddisplay(obj,'interp_forcings','interpolate in time between requested forcing values ? (0 or 1)');
    6874
    6975                end % }}}
     
    7783                        WriteData(fid,'object',obj,'fieldname','time_adapt','format','Boolean');
    7884                        WriteData(fid,'object',obj,'fieldname','cfl_coefficient','format','Double');
     85                        WriteData(fid,'object',obj,'fieldname','interp_forcings','format','Boolean');
    7986                end % }}}
    8087        end
  • issm/trunk-jpl/src/m/classes/timestepping.py

    r17497 r18000  
    1818                self.time_adapt      = 0
    1919                self.cfl_coefficient = 0.
     20                self.interp_forcings = 1
    2021               
    2122                #set defaults
     
    3031                string="%s\n%s"%(string,fielddisplay(self,"time_adapt","use cfl condition to define time step ? (0 or 1) "))
    3132                string="%s\n%s"%(string,fielddisplay(self,"cfl_coefficient","coefficient applied to cfl condition"))
     33                string="%s\n%s"%(string,fielddisplay(self,"interp_forcings","interpolate in time between requested forcing values ? (0 or 1)"))
    3234                return string
    3335                #}}}
     
    4345                self.time_adapt=0
    4446                self.cfl_coefficient=0.5
     47               
     48                #should we interpolate forcings between timesteps?
     49                self.interp_forcings=1
    4550
    4651                return self
     
    5560                if self.final_time-self.start_time<0:
    5661                        md.checkmessage("timestepping.final_time should be larger than timestepping.start_time")
     62                md = checkfield(md,'fieldname','timestepping.interp_forcings','numel',[1],'values',[0,1])
    5763
    5864                return md
     
    6773                WriteData(fid,'object',self,'fieldname','time_adapt','format','Boolean')
    6874                WriteData(fid,'object',self,'fieldname','cfl_coefficient','format','Double')
     75                WriteData(fid,'object',self,'fieldname','interp_forcings','format','Boolean')
    6976        # }}}
  • issm/trunk-jpl/src/m/enum/EnumDefinitions.py

    r17985 r18000  
    322322def SurfaceforcingsBNegEnum(): return StringToEnum("SurfaceforcingsBNeg")[0]
    323323def SMBhenningEnum(): return StringToEnum("SMBhenning")[0]
     324def SMBcomponentsEnum(): return StringToEnum("SMBcomponents")[0]
     325def SurfaceforcingsAccumulationEnum(): return StringToEnum("SurfaceforcingsAccumulation")[0]
     326def SurfaceforcingsEvaporationEnum(): return StringToEnum("SurfaceforcingsEvaporation")[0]
     327def SurfaceforcingsRunoffEnum(): return StringToEnum("SurfaceforcingsRunoff")[0]
     328def SMBmeltcomponentsEnum(): return StringToEnum("SMBmeltcomponents")[0]
     329def SurfaceforcingsMeltEnum(): return StringToEnum("SurfaceforcingsMelt")[0]
     330def SurfaceforcingsRefreezeEnum(): return StringToEnum("SurfaceforcingsRefreeze")[0]
    324331def SurfaceforcingsIspddEnum(): return StringToEnum("SurfaceforcingsIspdd")[0]
    325332def SurfaceforcingsIssmbgradientsEnum(): return StringToEnum("SurfaceforcingsIssmbgradients")[0]
Note: See TracChangeset for help on using the changeset viewer.