Changeset 18000
- Timestamp:
- 05/14/14 14:38:28 (11 years ago)
- 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 11 11 time_adapt = 0; 12 12 cfl_coefficient = 0.; 13 interp_forcings = 1; 13 14 end 14 15 methods … … 46 47 obj.time_adapt=0; 47 48 obj.cfl_coefficient=0.5; 49 50 %should we interpolate forcings between timesteps? 51 obj.interp_forcings=1; 48 52 end % }}} 49 53 function md = checkconsistency(obj,md,solution,analyses) % {{{ … … 54 58 md = checkfield(md,'fieldname','timestepping.time_adapt','numel',[1],'values',[0 1]); 55 59 md = checkfield(md,'fieldname','timestepping.cfl_coefficient','numel',[1],'>',0,'<=',1); 60 md = checkfield(md,'fieldname','timestepping.interp_forcings','numel',[1],'values',[0 1]); 56 61 if obj.final_time-obj.start_time<0, 57 62 md = checkmessage(md,'timestepping.final_time should be larger than timestepping.start_time'); … … 66 71 fielddisplay(obj,'time_adapt','use cfl condition to define time step ? (0 or 1) '); 67 72 fielddisplay(obj,'cfl_coefficient','coefficient applied to cfl condition'); 73 fielddisplay(obj,'interp_forcings','interpolate in time between requested forcing values ? (0 or 1)'); 68 74 69 75 end % }}} … … 77 83 WriteData(fid,'object',obj,'fieldname','time_adapt','format','Boolean'); 78 84 WriteData(fid,'object',obj,'fieldname','cfl_coefficient','format','Double'); 85 WriteData(fid,'object',obj,'fieldname','interp_forcings','format','Boolean'); 79 86 end % }}} 80 87 end -
issm/trunk-jpl/src/m/classes/timestepping.py
r17497 r18000 18 18 self.time_adapt = 0 19 19 self.cfl_coefficient = 0. 20 self.interp_forcings = 1 20 21 21 22 #set defaults … … 30 31 string="%s\n%s"%(string,fielddisplay(self,"time_adapt","use cfl condition to define time step ? (0 or 1) ")) 31 32 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)")) 32 34 return string 33 35 #}}} … … 43 45 self.time_adapt=0 44 46 self.cfl_coefficient=0.5 47 48 #should we interpolate forcings between timesteps? 49 self.interp_forcings=1 45 50 46 51 return self … … 55 60 if self.final_time-self.start_time<0: 56 61 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]) 57 63 58 64 return md … … 67 73 WriteData(fid,'object',self,'fieldname','time_adapt','format','Boolean') 68 74 WriteData(fid,'object',self,'fieldname','cfl_coefficient','format','Double') 75 WriteData(fid,'object',self,'fieldname','interp_forcings','format','Boolean') 69 76 # }}} -
issm/trunk-jpl/src/m/enum/EnumDefinitions.py
r17985 r18000 322 322 def SurfaceforcingsBNegEnum(): return StringToEnum("SurfaceforcingsBNeg")[0] 323 323 def SMBhenningEnum(): return StringToEnum("SMBhenning")[0] 324 def SMBcomponentsEnum(): return StringToEnum("SMBcomponents")[0] 325 def SurfaceforcingsAccumulationEnum(): return StringToEnum("SurfaceforcingsAccumulation")[0] 326 def SurfaceforcingsEvaporationEnum(): return StringToEnum("SurfaceforcingsEvaporation")[0] 327 def SurfaceforcingsRunoffEnum(): return StringToEnum("SurfaceforcingsRunoff")[0] 328 def SMBmeltcomponentsEnum(): return StringToEnum("SMBmeltcomponents")[0] 329 def SurfaceforcingsMeltEnum(): return StringToEnum("SurfaceforcingsMelt")[0] 330 def SurfaceforcingsRefreezeEnum(): return StringToEnum("SurfaceforcingsRefreeze")[0] 324 331 def SurfaceforcingsIspddEnum(): return StringToEnum("SurfaceforcingsIspdd")[0] 325 332 def SurfaceforcingsIssmbgradientsEnum(): return StringToEnum("SurfaceforcingsIssmbgradients")[0]
Note:
See TracChangeset
for help on using the changeset viewer.