Changeset 23422
- Timestamp:
- 10/15/18 03:08:36 (7 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/clusters/stallo.m
r23378 r23422 115 115 end 116 116 fprintf(fid,'#SBATCH --account=%s\n',cluster.accountname); 117 fprintf(fid,'#SBATCH - -output %s/%s/%s.outlog \n',cluster.executionpath,dirname,modelname);118 fprintf(fid,'#SBATCH - -error %s/%s/%s.errlog \n\n',cluster.executionpath,dirname,modelname);117 fprintf(fid,'#SBATCH -output %s.outlog \n',[cluster.executionpath '/' dirname '/' modelname]); 118 fprintf(fid,'#SBATCH -error %s.errlog \n\n',[cluster.executionpath '/' dirname '/' modelname]); 119 119 120 120 fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath);%FIXME … … 187 187 if ~cluster.interactive, 188 188 if ~isempty(restart) 189 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub' modelname '.queue '];189 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && sbatch ' modelname '.queue ']; 190 190 else 191 191 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 192 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub' modelname '.queue '];192 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && sbatch ' modelname '.queue ']; 193 193 end 194 194 else -
issm/trunk-jpl/src/m/classes/frictionhydro.py
r21739 r23422 8 8 class frictionhydro(object): 9 9 """ 10 FRICTIONWEERTMAN class definition10 friction hydro is the friction law from Schoof 2005 or Gagliardini2007 11 11 12 12 Usage: … … 15 15 def __init__(self): # {{{ 16 16 self.coupling = 0 17 self.q = float('NaN')18 self.C = float('NaN')19 self.As = float('NaN')20 self.effective_pressure = float('NaN')17 self.q = np.nan 18 self.C = np.nan 19 self.As = np.nan 20 self.effective_pressure = np.nan 21 21 #set defaults 22 22 23 self.setdefaultparameters() 23 # }}}24 # }}} 24 25 25 #what is this: 26 #function self = frictionhydro(varargin) % {{{ 27 # switch nargin 28 # case 0 29 # self=setdefaultparameters(self); 30 # otherwise 31 # error('constructor not supported'); 32 # end 33 #end % }}} 34 35 def checkconsistency(self,md,solution,analyses): #{{{ 26 def __repr__(self): # {{{ 27 string='Effective Pressure based friction law described in Gagliardini 2007' 28 string="%s\n%s"%(string,fielddisplay(self,'coupling','Coupling flag: 0 for default, 1 for forcing(provide md.friction.effective_pressure) and 2 for coupled(not implemented yet)')) 29 string="%s\n%s"%(string,fielddisplay(self,'q','friction law exponent q>=1')) 30 string="%s\n%s"%(string,fielddisplay(self,'C','friction law max value (Iken bound)')) 31 string="%s\n%s"%(string,fielddisplay(self,'As','Sliding Parameter without cavitation [m Pa^-n s^-1]')) 32 string="%s\n%s"%(string,fielddisplay(self,'effective_pressure','Effective Pressure for the forcing if not coupled [Pa]')) 36 33 37 #Early return 38 if 'StressbalanceAnalysis' in analyses and 'ThermalAnalysis' in analyses: 39 return md 40 41 md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0,1,2]) 42 md = checkfield(md,'fieldname','friction.q','NaN',1,'Inf',1,'size',[md.mesh.numberofelements,1]) 43 md = checkfield(md,'fieldname','friction.C','NaN',1,'Inf',1,'size',[md.mesh.numberofelements,1]) 44 md = checkfield(md,'fieldname','friction.As','NaN',1,'Inf',1,'size',[md.mesh.numberofelements,1]) 45 if self.coupling==1: 46 md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1) 47 elif self.coupling==2: 48 raise ValueError('coupling not supported yet') 49 elif self.coupling > 2: 50 raise ValueError('md.friction.coupling larger than 2, not supported yet') 34 return string 51 35 # }}} 52 36 … … 60 44 raise ValueError('coupling not supported yet') 61 45 elif self.coupling > 2: 62 raise ValueError('md.friction.coupling larger than 2, not supported yet') 63 return self 64 # }}}46 raise ValueError('md.friction.coupling larger than 2, not supported yet') 47 return self 48 # }}} 65 49 50 def setdefaultparameters(self): # {{{ 66 51 67 def __repr__(self): # {{{ 68 string='Effective Pressure based friction law described in Gagliardini 2007' 69 string="%s\n%s"%(string,fielddisplay(self,'coupling','Coupling flag: 0 for default, 1 for forcing(provide md.friction.effective_pressure) and 2 for coupled(not implemented yet)')) 70 string="%s\n%s"%(string,fielddisplay(self,'q','friction law exponent q>=1')) 71 string="%s\n%s"%(string,fielddisplay(self,'C','friction law max value [SI]')) 72 string="%s\n%s"%(string,fielddisplay(self,'As','Sliding Parameter without cavitation [m Pa^-n s^-1]')) 73 string="%s\n%s"%(string,fielddisplay(self,'effective_pressure','Effective Pressure for the forcing if not coupled [Pa]')) 52 self.coupling = 0 53 self.effective_pressure = np.nan 74 54 75 return s tring76 # }}}55 return self 56 # }}} 77 57 58 def checkconsistency(self,md,solution,analyses): #{{{ 59 60 #Early return 61 if 'StressbalanceAnalysis' in analyses and 'ThermalAnalysis' in analyses: 62 return md 63 64 md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0,1,2]) 65 md = checkfield(md,'fieldname','friction.q','NaN',1,'Inf',1,'size',[md.mesh.numberofelements]) 66 md = checkfield(md,'fieldname','friction.C','NaN',1,'Inf',1,'size',[md.mesh.numberofelements]) 67 md = checkfield(md,'fieldname','friction.As','NaN',1,'Inf',1,'size',[md.mesh.numberofelements]) 68 if self.coupling==1: 69 md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1) 70 elif self.coupling==2: 71 raise ValueError('coupling not supported yet') 72 elif self.coupling > 2: 73 raise ValueError('md.friction.coupling larger than 2, not supported yet') 74 # }}} 78 75 79 76 def marshall(self,prefix,md,fid): #{{{ … … 90 87 raise ValueError('md.friction.coupling larger than 2, not supported yet') 91 88 #}}} 92 93
Note:
See TracChangeset
for help on using the changeset viewer.