Changeset 27430
- Timestamp:
- 11/27/22 15:42:45 (2 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/etc/environment.sh ¶
r27336 r27430 675 675 fi 676 676 677 VALGRIND_ROOT="${ISSM_EXT_DIR}/valgrind/install" 678 path_prepend "${VALGRIND_ROOT}/bin" 677 VALGRIND_ROOT="${ISSM_DIR}/externalpackages/valgrind/install" 678 if [ -d "${VALGRIND_ROOT="${ISSM_DIR}/valgrind/install" 679 }" ]; then 680 path_prepend "${VALGRIND_ROOT}/bin" 681 fi 679 682 680 683 DOXYGEN_ROOT="${ISSM_EXT_DIR}/doxygen/install" -
TabularUnified issm/trunk-jpl/src/m/classes/SMBpddSicopolis.m ¶
r27407 r27430 72 72 self.desfac = -log(2.0)/1000; 73 73 self.rlaps = 7.4; 74 74 self.requested_outputs={'default'}; 75 75 76 76 end % }}} -
TabularUnified issm/trunk-jpl/src/m/classes/initialization.m ¶
r27297 r27430 25 25 str = NaN; 26 26 sample = NaN; 27 27 debris = NaN; 28 28 end 29 29 methods … … 157 157 yts=md.constants.yts; 158 158 159 WriteData(fid,prefix,'object',self,'fieldname','vx','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts', md.constants.yts);160 WriteData(fid,prefix,'object',self,'fieldname','vy','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts', md.constants.yts);159 WriteData(fid,prefix,'object',self,'fieldname','vx','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 160 WriteData(fid,prefix,'object',self,'fieldname','vy','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 161 161 WriteData(fid,prefix,'object',self,'fieldname','vz','format','DoubleMat','mattype',1,'scale',1./yts); 162 162 WriteData(fid,prefix,'object',self,'fieldname','pressure','format','DoubleMat','mattype',1); 163 WriteData(fid,prefix,'object',self,'fieldname','sealevel','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts', md.constants.yts);163 WriteData(fid,prefix,'object',self,'fieldname','sealevel','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 164 164 WriteData(fid,prefix,'object',self,'fieldname','bottompressure','format','DoubleMat','mattype',1); 165 165 WriteData(fid,prefix,'object',self,'fieldname','str','format','DoubleMat','mattype',1); -
TabularUnified issm/trunk-jpl/src/m/classes/initialization.py ¶
r27175 r27430 34 34 self.str = np.nan 35 35 self.sample = np.nan 36 self.debris = np.nan 36 37 37 38 self.setdefaultparameters() … … 55 56 s += '{}\n'.format(fielddisplay(self, 'channelarea', 'subglaciale water channel area (for GlaDS) [m2]')) 56 57 s += '{}\n'.format(fielddisplay(self, 'sample', 'Realization of a Gaussian random field')) 58 s += '{}\n'.format(fielddisplay(self, 'debris', 'Surface debris layer [m]')) 57 59 return s 58 60 #}}} … … 65 67 if 'StressbalanceAnalysis' in analyses and not solution == 'TransientSolution' and not md.transient.isstressbalance: 66 68 if not np.any(np.logical_or(np.isnan(md.initialization.vx), np.isnan(md.initialization.vy))): 67 md = checkfield(md, 'fieldname', 'initialization.vx', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 68 md = checkfield(md, 'fieldname', 'initialization.vy', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 69 if np.size(md.initialization.vx) > 1 or np.size(md.initialization.vy) > 1: 70 md = checkfield(md, 'fieldname', 'initialization.vx', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 71 md = checkfield(md, 'fieldname', 'initialization.vy', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 69 72 if 'MasstransportAnalysis' in analyses and not solution == 'TransientSolution' and not md.transient.ismasstransport: 70 73 md = checkfield(md, 'fieldname', 'initialization.vx', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) … … 79 82 md = checkfield(md, 'fieldname', 'initialization.vy', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 80 83 # Triangle with zero velocity 81 if np.any(np.logical_and(np.sum(np.abs(md.initialization.vx[md.mesh.elements - 1]), axis=1) == 0, 82 np.sum(np.abs(md.initialization.vy[md.mesh.elements - 1]), axis=1) == 0)): 83 md.checkmessage("at least one triangle has all its vertices with a zero velocity") 84 if np.any(np.logical_and(np.sum(np.abs(md.initialization.vx[md.mesh.elements - 1]), axis=1) == 0, np.sum(np.abs(md.initialization.vy[md.mesh.elements - 1]), axis=1) == 0, np.min(md.mask.ice_levelset(md.mesh.elements), [], 2) < 0)): 85 md.checkmessage('at least one triangle has all its vertices with a zero velocity') 84 86 if 'ThermalAnalysis' in analyses and not solution == 'TransientSolution' and not md.transient.isthermal: 85 87 md = checkfield(md, 'fieldname', 'initialization.vx', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) … … 99 101 if (solution == 'TransientSolution' and md.transient.ishydrology) or solution == 'HydrologySolution': 100 102 md = checkfield(md, 'fieldname', 'initialization.watercolumn', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 101 if 'HydrologyDCAnalysis' in analyses:102 if type(md.hydrology).__name__ == 'hydrologydc':103 if (solution == 'TransientSolution' and md.transient.ishydrology) or solution == 'HydrologySolution':104 md = checkfield(md, 'fieldname', 'initialization.sediment_head', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices])105 103 if 'HydrologyTwsAnalysis' in analyses: 106 104 if type(md.hydrology).__name__ == 'hydrologytws': … … 114 112 md = checkfield(md, 'fieldname', 'initialization.hydraulic_potential', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 115 113 md = checkfield(md, 'fieldname', 'initialization.channelarea', 'NaN', 1, 'Inf', 1, '>=', 0, 'size', [md.mesh.numberofelements]) 114 if 'HydrologyDCInefficientAnalysis' in analyses: 115 if type(md.hydrology).__name__ == 'hydrologydc': 116 md = checkfield(md, 'fieldname', 'initialization.sediment_head', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 117 if 'HydrologyDCEfficientAnalysis' in analyses: 118 if type(md.hydrology).__name__ == 'hydrologydc': 119 if md.hydrology.isefficientlayer: 120 md = checkfield(md, 'fieldname', 'initialization.epl_head', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 121 md = checkfield(md, 'fieldname', 'initialization.epl_thickness', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 116 122 if 'SamplingAnalysis' in analyses and not solution == 'TransientSolution' and not md.transient.issampling: 117 123 if np.any(np.isnan(md.initialization.sample)): 118 124 md = checkfield(md, 'fieldname', 'initialization.sample', 'NaN', 1,'Inf', 1, 'size', [md.mesh.numberofvertices]) 125 if 'DebrisAnalysis' in analyses: 126 if not np.isnan(md.initialization.debris): 127 if (solution == 'TransientSolution' and md.transient.ishydrology) or solution == 'HydrologySolution': 128 md = checkfield(md, 'fieldname', 'initialization.debris', 'NaN', 1,'Inf', 1, 'size', [md.mesh.numberofvertices]) 119 129 return md 120 130 #}}} … … 123 133 yts = md.constants.yts 124 134 125 WriteData(fid, prefix, 'object', self, 'fieldname', 'vx', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1 / yts )126 WriteData(fid, prefix, 'object', self, 'fieldname', 'vy', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1 / yts )135 WriteData(fid, prefix, 'object', self, 'fieldname', 'vx', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1 / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts) 136 WriteData(fid, prefix, 'object', self, 'fieldname', 'vy', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1 / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts) 127 137 WriteData(fid, prefix, 'object', self, 'fieldname', 'vz', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1 / yts) 128 138 WriteData(fid, prefix, 'object', self, 'fieldname', 'pressure', 'format', 'DoubleMat', 'mattype', 1) … … 140 150 WriteData(fid, prefix, 'object', self, 'fieldname', 'hydraulic_potential', 'format', 'DoubleMat', 'mattype', 1) 141 151 WriteData(fid, prefix, 'object', self, 'fieldname', 'sample', 'format', 'DoubleMat', 'mattype', 1) 152 WriteData(fid, prefix, 'object', self, 'fieldname', 'debris', 'format', 'DoubleMat', 'mattype', 1) 142 153 143 154 if md.thermal.isenthalpy: … … 168 179 self.dsl = project3d(md, 'vector', self.dsl, 'type', 'node', 'layer', 1) 169 180 self.str = project3d(md, 'vector', self.str, 'type', 'node', 'layer', 1) 181 self.debris = project3d(md, 'vector', self.debris, 'type', 'node', 'layer', 1) 170 182 171 183 # Lithostatic pressure by default -
TabularUnified issm/trunk-jpl/src/m/classes/model.m ¶
r27417 r27430 543 543 end 544 544 545 %Initialize the2d mesh545 %Initialize 2d mesh 546 546 mesh=mesh2d(); 547 547 mesh.x=md.mesh.x2d; … … 721 721 end 722 722 723 %Initial 2d mesh 723 %Initial 2d mesh 724 724 if isa(md1.mesh,'mesh3dprisms'), 725 725 flag_elem_2d=flag_elem(1:md1.mesh.numberofelements2d); … … 1091 1091 end 1092 1092 1093 %Initialize with the2d mesh1093 %Initialize with 2d mesh 1094 1094 mesh2d = md.mesh; 1095 1095 md.mesh=mesh3dprisms(); -
TabularUnified issm/trunk-jpl/src/m/classes/model.py ¶
r27417 r27430 633 633 raise TypeError('Cannot extrude a 3d mesh (extrude cannot be called more than once)') 634 634 635 #Initialize with the2d mesh635 #Initialize with 2d mesh 636 636 mesh2d = md.mesh 637 637 md.mesh = mesh3dprisms() … … 853 853 if not np.isnan(md.initialization.watercolumn).all(): 854 854 md.initialization.watercolumn = project2d(md, md.initialization.watercolumn, 1) 855 if not np.isnan(md.initialization.debris).all(): 856 md.initialization.debris = project2d(md, md.initialization.debris, 1) 855 857 856 858 # elementstype … … 960 962 setattr(fieldr, solutionsubfield, project2d(md, subfield, 1)) 961 963 962 # Initialize he2d mesh964 # Initialize 2d mesh 963 965 mesh = mesh2d() 964 966 mesh.x = md.mesh.x2d
Note:
See TracChangeset
for help on using the changeset viewer.