Changeset 14825
- Timestamp:
- 04/30/13 19:27:50 (12 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/gia.m
r14813 r14825 32 32 %be sure that if we are running a prognostic ice flow model coupled with gia, that thickness forcings 33 33 %are not provided into the future. 34 if md.transient.isprognostic, 35 thickness=md.geometry.thickness; 34 if solution==TransientSolutionEnum() & md.transient.isprognostic & md.transient.isgia, 36 35 %figure out if thickness is a transient forcing: 37 s=size(thickness); 38 if s(1)>=md.mesh.numberofvertices, 36 if size(md.geometry.thickness,1)==md.mesh.numberofvertices+1, 39 37 %recover the furthest time "in time": 40 time=thickness(end,end); 41 if(time~=md.timestepping.start_time), 42 error('if isprognostic is on, transient thickness forcing for the gia model should not be provided in the future. Synchronize your start_time to correspond to the most recent transient thickness forcing timestep'); 38 if(thickness(end,end)~=md.timestepping.start_time), 39 md = checkmessage(md,'if isprognostic is on, transient thickness forcing'... 40 ' for the gia model should not be provided in the future.'... 41 ' Synchronize your start_time to correspond to the most recent transient'... 42 ' thickness forcing timestep'); 43 43 end 44 44 end -
issm/trunk-jpl/src/m/classes/gia.py
r14824 r14825 49 49 #be sure that if we are running a prognostic ice flow model coupled with gia, that thickness forcings 50 50 #are not provided into the future. 51 if md.transient.isprognostic:52 thickness=md.geometry.thickness53 #figure out if thickness is a transient forcing:54 s=size(thickness)55 if s(1)>=md.mesh.numberofvertices:56 #recover the furthest time "in time":57 time=thickness(end,end)58 if not time==md.timestepping.start_time:59 raise RunetimeError("if isprognostic is on, transient thickness forcing for the gia model should not be provided in the future. Synchronize your start_time to correspond to the most recent transient thickness forcing timestep")60 51 61 52 return md -
issm/trunk-jpl/src/m/classes/model/model.py
r14621 r14825 28 28 from steadystate import steadystate 29 29 from transient import transient 30 from gia import gia 30 31 from autodiff import autodiff 31 32 from flaim import flaim … … 50 51 class model(object): 51 52 #properties 52 def __init__(self): 53 # {{{ Properties 53 def __init__(self):#{{{ 54 54 self.mesh = mesh() 55 55 self.mask = mask() … … 79 79 self.steadystate = steadystate() 80 80 self.transient = transient() 81 self.gia = gia() 81 82 82 83 self.autodiff = autodiff() … … 90 91 self.private = private() 91 92 #}}} 92 93 93 def properties(self): # {{{ 94 94 # ordered list of properties since vars(self) is random … … 127 127 'private'] 128 128 # }}} 129 130 def __repr__(obj): 131 # {{{ Display 132 129 def __repr__(obj): #{{{ 133 130 #print "Here %s the number: %d" % ("is", 37) 134 131 string="%19s: %-22s -- %s" % ("mesh","[%s,%s]" % ("1x1",obj.mesh.__class__.__name__),"mesh properties") … … 166 163 return string 167 164 # }}} 168 169 165 def checkmessage(self,string): # {{{ 170 166 print ("model not consistent: %s" % string) … … 172 168 return self 173 169 # }}} 174 175 170 def extract(md,area): # {{{ 176 171 """ … … 446 441 return md2 447 442 # }}} 448 449 443 def extrude(md,*args): # {{{ 450 444 """ … … 654 648 md.geometry.surface=project3d(md,'vector',md.geometry.surface,'type','node') 655 649 md.geometry.thickness=project3d(md,'vector',md.geometry.thickness,'type','node') 650 md.gia.lithosphere_thickness=project3d(md,'vector',md.gia.lithosphere_thickness,'type','node') 656 651 md.geometry.hydrostatic_ratio=project3d(md,'vector',md.geometry.hydrostatic_ratio,'type','node') 657 652 md.geometry.bed=project3d(md,'vector',md.geometry.bed,'type','node') … … 694 689 return md 695 690 # }}} 696
Note:
See TracChangeset
for help on using the changeset viewer.