Changeset 12329
- Timestamp:
- 06/01/12 17:25:46 (13 years ago)
- Location:
- issm/trunk/src/m
- Files:
-
- 10 deleted
- 36 edited
- 53 copied
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/Makefile.am
r11995 r12329 13 13 ./planet/*.m \ 14 14 ./qmu/*.m \ 15 ./shared/*.m \16 ./solutions/*.m \17 ./solvers/*.m \18 15 ./utils/*.m \ 19 ./utils/Analysis/*.m \20 16 ./utils/Array/*.m \ 21 17 ./utils/BC/*.m \ -
issm/trunk/src/m/classes
- Property svn:ignore
-
old new 1 __pycache__ 1 2 Makefile.in 2 3 Makefile
-
- Property svn:ignore
-
issm/trunk/src/m/classes/clusters
- Property svn:ignore
-
old new 1 __pycache__ 1 2 Makefile.in 2 3 Makefile
-
- Property svn:ignore
-
issm/trunk/src/m/classes/clusters/generic.m
r11995 r12329 2 2 % 3 3 % Usage: 4 % cluster=generic('name','astrid',);5 4 % cluster=generic('name','astrid','np',3); 6 5 % cluster=generic('name',oshostname(),'np',3,'login','username'); … … 14 13 port=0; 15 14 interactive=1; 16 codepath=[issm tier() '/bin'];17 executionpath=[issm tier() '/execution'];18 valgrind=[issm tier() '/externalpackages/valgrind/install/bin/valgrind'];19 valgrindlib=[issm tier() '/externalpackages/valgrind/install/lib/libmpidebug.so'];20 valgrindsup=[issm tier() '/externalpackages/valgrind/issm.supp'];15 codepath=[issmdir() '/bin']; 16 executionpath=[issmdir() '/execution']; 17 valgrind=[issmdir() '/externalpackages/valgrind/install/bin/valgrind']; 18 valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so']; 19 valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp']; 21 20 %}}} 22 21 end … … 28 27 29 28 %get name 30 if ~exist(options,'name'), error('option ''name'' has not been provided'); end 31 cluster.name=getfieldvalue(options,'name'); 29 cluster.name=getfieldvalue(options,'name',oshostname()); 32 30 33 31 %initialize cluster using user settings if provided -
issm/trunk/src/m/classes/clusters/none.m
r11995 r12329 12 12 methods 13 13 function cluster=none(varargin) % {{{1 14 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster); 15 end 16 %}}} 17 function disp(cluster) % {{{1 18 % display the object 19 disp(sprintf('cluster class ''%s'' object ''%s'' = ',class(cluster),inputname(1))); 20 disp(sprintf(' name: %s',cluster.name)); 21 end 22 %}}} 23 function checkconsistency(cluster,md,solution,analyses) % {{{1 24 end 25 %}}} 26 function BuildQueueScript(cluster,md) % {{{1 27 error('none.BuildQueueScript error message: serial cluster cannot build queue script'); 14 error('Cannot assign md.cluster to ''none'': ISSM is not available in serial model anymore'); 28 15 end 29 16 %}}} -
issm/trunk/src/m/classes/groundingline.m
r11995 r12329 37 37 end 38 38 pos=find(md.mask.vertexongroundedice); 39 if any( md.geometry.bed(pos)-md.geometry.bathymetry(pos)),39 if any(abs(md.geometry.bed(pos)-md.geometry.bathymetry(pos))>10^-10), 40 40 checkmessage(['bathymetry not equal to bed on grounded ice !']); 41 41 end -
issm/trunk/src/m/classes/model/model.m
r11995 r12329 379 379 md.solver = addoptions(md.solver,DiagnosticVertAnalysisEnum,iluasmoptions); 380 380 end 381 md.cluster = none();381 md.cluster = generic(); 382 382 md.balancethickness = balancethickness(); 383 383 md.diagnostic = diagnostic(); -
issm/trunk/src/m/classes/modellist.m
r11995 r12329 7 7 properties (SetAccess=public) 8 8 models = cell(0,1); 9 cluster = none();9 cluster = generic(); 10 10 end 11 11 methods -
issm/trunk/src/m/classes/solver.m
r11995 r12329 18 18 end 19 19 end % }}} 20 function obj = addoptions(obj,analysis,solveroptions) % {{{1 20 function obj = addoptions(obj,analysis,varargin) % {{{1 21 % Usage example: 22 % md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum,stokesoptions()); 23 % md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum); 21 24 22 25 %Convert analysis from enum to string … … 29 32 30 33 %Add solver options to analysis 31 obj.(analysis) = solveroptions;34 if nargin==3, obj.(analysis) = varargin{1}; end 32 35 end 33 36 %}}} -
issm/trunk/src/m/enum/MaximumNumberOfEnums.m
r12326 r12329 9 9 % macro=MaximumNumberOfEnums() 10 10 11 macro=4 37;11 macro=440; -
issm/trunk/src/m/kml/README.txt
r8298 r12329 61 61 There are some other utilities that are used in the construction of topological tables for the kml writing. 62 62 63 nodeconnectivity.m - create a node connectivity table (nnodes x mxepg+1)63 kmlnodeconnectivity.m - create a node connectivity table (nnodes x mxepg+1) 64 64 edgeadjacency.m - create an edge adjacency array (elems x edges) 65 65 edgeperimeter.m - create an edge perimeter (edgeper x 2) and element perimeter (edgeper x 1) list -
issm/trunk/src/m/kml/kml_part_edges.m
r9733 r12329 150 150 elemp=md.mesh.elements(irow,:); 151 151 epartp=epart(irow,:); 152 nodeconp= nodeconnectivity(elemp,md.mesh.numberofvertices);152 nodeconp=kmlnodeconnectivity(elemp,md.mesh.numberofvertices); 153 153 [edgeadjp]=edgeadjacency(elemp,nodeconp); 154 154 [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp); -
issm/trunk/src/m/kml/kml_partitions.m
r9733 r12329 151 151 elemp=md.mesh.elements(irow,:); 152 152 epartp=epart(irow,:); 153 nodeconp= nodeconnectivity(elemp,md.mesh.numberofvertices);153 nodeconp=kmlnodeconnectivity(elemp,md.mesh.numberofvertices); 154 154 [edgeadjp]=edgeadjacency(elemp,nodeconp); 155 155 [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp); -
issm/trunk/src/m/kml/kml_unsh_edges.m
r9733 r12329 74 74 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 75 75 md.qmu.numberofpartitions 76 [edgeadj]=edgeadjacency(md.mesh.elements,md. nodeconnectivity);76 [edgeadj]=edgeadjacency(md.mesh.elements,md.kmlnodeconnectivity); 77 77 [icol,irow]=find(edgeadj'==0); 78 78 edgeuns=zeros(length(irow),2); -
issm/trunk/src/m/model/collapse.m
r11995 r12329 30 30 if ~isnan(md.inversion.vel_obs), md.inversion.vel_obs=project2d(md,md.inversion.vel_obs,md.mesh.numberoflayers); end; 31 31 if ~isnan(md.inversion.cost_functions_coefficients), md.inversion.cost_functions_coefficients=project2d(md,md.inversion.cost_functions_coefficients,md.mesh.numberoflayers); end; 32 if ~isnan(md.inversion.min_parameters), md.inversion.min_parameters=project2d(md,md.inversion.min_parameters,md.mesh.numberoflayers); end;33 if ~isnan(md.inversion.max_parameters), md.inversion.max_parameters=project2d(md,md.inversion.max_parameters,md.mesh.numberoflayers); end;32 if numel(md.inversion.min_parameters)>1, md.inversion.min_parameters=project2d(md,md.inversion.min_parameters,md.mesh.numberoflayers); end; 33 if numel(md.inversion.max_parameters)>1, md.inversion.max_parameters=project2d(md,md.inversion.max_parameters,md.mesh.numberoflayers); end; 34 34 if ~isnan(md.surfaceforcings.mass_balance), 35 35 md.surfaceforcings.mass_balance=project2d(md,md.surfaceforcings.mass_balance,md.mesh.numberoflayers); … … 101 101 102 102 %lat long 103 md.mesh.lat=project2d(md,md.mesh.lat,1); 104 md.mesh.long=project2d(md,md.mesh.long,1); 103 if numel(md.mesh.lat) ==md.mesh.numberofvertices, md.mesh.lat=project2d(md,md.mesh.lat,1); end 104 if numel(md.mesh.long)==md.mesh.numberofvertices, md.mesh.long=project2d(md,md.mesh.long,1); end 105 105 106 106 %Initialize with the 2d mesh -
issm/trunk/src/m/model/marshall.m
r11995 r12329 15 15 error(['marshall error message: could not open ' [md.miscellaneous.name '.bin'],' file for binary writing']); 16 16 end 17 18 %First, write MaximumNumberOfEnum to make sure that the Enums are synchronized 19 WriteData(fid,'enum',MaximumNumberOfEnums(),'data',true,'format','Boolean'); 17 20 18 21 %Go through all model fields: check that it is a class and call checkconsistency -
issm/trunk/src/m/model/mesh
- Property svn:ignore
-
old new 1 __pycache__ 1 2 Makefile.in 2 3 Makefile
-
- Property svn:ignore
-
issm/trunk/src/m/model/mesh/triangle.m
r11995 r12329 38 38 39 39 %Mesh using TriMesh 40 if strcmp(riftname,''), 41 [md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMesh(domainname,area,true); 42 else 43 [elements,x,y,segments,segmentmarkers]=TriMeshRifts(domainname,riftname,area,'yes'); 40 [elements,x,y,segments,segmentmarkers]=TriMesh(domainname,riftname,area); 44 41 45 %check that all the created nodes belong to at least one element 46 orphan=find(~ismember([1:length(x)],sort(unique(elements(:))))); 47 for i=1:length(orphan), 48 %get rid of the orphan node i 49 %update x and y 50 x=[x(1:orphan(i)-(i-1)-1); x(orphan(i)-(i-1)+1:end)]; 51 y=[y(1:orphan(i)-(i-1)-1); y(orphan(i)-(i-1)+1:end)]; 52 %update elements 53 pos=find(elements>orphan(i)-(i-1)); 54 elements(pos)=elements(pos)-1; 55 %update segments 56 pos1=find(segments(:,1)>orphan(i)-(i-1)); 57 pos2=find(segments(:,2)>orphan(i)-(i-1)); 58 segments(pos1,1)=segments(pos1,1)-1; 59 segments(pos2,2)=segments(pos2,2)-1; 60 end 42 %check that all the created nodes belong to at least one element 43 orphan=find(~ismember([1:length(x)],sort(unique(elements(:))))); 44 for i=1:length(orphan), 45 disp('WARNING: removing orphans'); 46 %get rid of the orphan node i 47 %update x and y 48 x=[x(1:orphan(i)-(i-1)-1); x(orphan(i)-(i-1)+1:end)]; 49 y=[y(1:orphan(i)-(i-1)-1); y(orphan(i)-(i-1)+1:end)]; 50 %update elements 51 pos=find(elements>orphan(i)-(i-1)); 52 elements(pos)=elements(pos)-1; 53 %update segments 54 pos1=find(segments(:,1)>orphan(i)-(i-1)); 55 pos2=find(segments(:,2)>orphan(i)-(i-1)); 56 segments(pos1,1)=segments(pos1,1)-1; 57 segments(pos2,2)=segments(pos2,2)-1; 58 end 61 59 62 %plug into md 63 md.mesh.x=x; 64 md.mesh.y=y; 65 md.mesh.elements=elements; 66 md.mesh.segments=segments; 67 md.mesh.segmentmarkers=segmentmarkers; 68 end 60 %plug into md 61 md.mesh.x=x; 62 md.mesh.y=y; 63 md.mesh.elements=elements; 64 md.mesh.segments=segments; 65 md.mesh.segmentmarkers=segmentmarkers; 69 66 70 67 %Fill in rest of fields: -
issm/trunk/src/m/model/modis.m
r9620 r12329 14 14 15 15 %Get path to gdal binaries 16 path_gdal=[issm tier() '/externalpackages/gdal/install/bin/'];16 path_gdal=[issmdir() '/externalpackages/gdal/install/bin/']; 17 17 18 18 %Was gdal compiled? 19 19 if ~exist([path_gdal 'gdal_translate']), 20 error(['modis error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' issm tier() '/externalpackages/gdal to use this routine.']);20 error(['modis error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' issmdir() '/externalpackages/gdal to use this routine.']); 21 21 end 22 22 -
issm/trunk/src/m/model/partition/AreaAverageOntoPartition.m
r9741 r12329 29 29 %finally, project vector: 30 30 vector=project2d(md3d,vector,layer); 31 md.qmu.partition=project2d(md3d,md3d. part,layer);31 md.qmu.partition=project2d(md3d,md3d.qmu.partition,layer); 32 32 end 33 33 -
issm/trunk/src/m/model/petscversion.m
r11995 r12329 8 8 PETSC_VERSION=3; 9 9 10 configfile=[issm tier() '/config.h'];10 configfile=[issmdir() '/config.h']; 11 11 if ~exist(configfile,'file'), 12 12 error(['File ' configfile ' not found. ISSM has not been configured yet!']); -
issm/trunk/src/m/model/plot/applyoptions.m
r11237 r12329 219 219 warning on MATLAB:log:logOfZero; 220 220 set(c,'YTickLabel',labels); 221 end 222 if exist(options,'cbYLim'); 223 set(c,'YLim',getfieldvalue(options,'cbYLim')); 221 224 end 222 225 if exist(options,'colorbartitle'), … … 289 292 textpositioni=textposition{i}; 290 293 textrotationi=textrotation{i}; 291 h=text(textpositioni(1),textpositioni(2), textstringi,'FontSize',textsizei,'FontWeight',textweighti,'Color',textcolori,'Rotation',textrotationi);294 h=text(textpositioni(1),textpositioni(2),10,textstringi,'FontSize',textsizei,'FontWeight',textweighti,'Color',textcolori,'Rotation',textrotationi); 292 295 set(h,'Clipping','on'); %prevent text from appearing outside of the box 293 296 end … … 346 349 if exist(options,'axispos'), 347 350 Axis=getfieldvalue(options,'axispos'); 351 hold on 348 352 set(gca,'pos',Axis); 349 353 end … … 411 415 %box off 412 416 if strcmpi(md.mesh.hemisphere,'n') | strcmpi(md.mesh.hemisphere,'north'), 413 A=expread([ issmdir() '/projects/Exp/GreenlandBoxFront.exp']);417 A=expread([ jplsvn() '/projects/Exp/GreenlandBoxFront.exp']); 414 418 [A.x A.y]=ll2xy(A.x,A.y,+1,45,70); 419 A.x = A.x(1:30:end); 420 A.y = A.y(1:30:end); 415 421 elseif strcmpi(md.mesh.hemisphere,'s') | strcmpi(md.mesh.hemisphere,'south'), 416 A=expread([ issmdir() '/projects/Exp/Antarctica.exp']);422 A=expread([ jplsvn() '/projects/Exp/Antarctica.exp']); 417 423 else 418 424 error('applyoptions error message: hemisphere not defined'); 419 425 end 420 Ax=[min(A.x) max(A.x)]; 421 Ay=[min(A.y) max(A.y)]; 426 offset=3*10^4; 427 Ax=[min(A.x)-offset max(A.x)+offset]; 428 Ay=[min(A.y)-offset max(A.y)+offset]; 422 429 %if we are zooming on a basin, don't take the mesh for the boundaries! 423 430 if exist(options,'basin'), 424 431 [mdx mdy]=basinzoom(options); 425 432 else 426 offset=3*10^4;427 433 mdx=[min(md.mesh.x)-offset max(md.mesh.x)+offset]; 428 434 mdy=[min(md.mesh.y)-offset max(md.mesh.y)+offset]; … … 430 436 line(A.x,A.y,ones(size(A.x)),'color','b'); 431 437 patch([Ax(1) Ax(2) Ax(2) Ax(1) Ax(1)],[Ay(1) Ay(1) Ay(2) Ay(2) Ay(1)],[1 1 1],'EdgeColor',[0 0 0],'LineWidth',1,'FaceLighting','none') 432 patch( 438 patch([mdx(1) mdx(2) mdx(2) mdx(1)],[mdy(1) mdy(1) mdy(2) mdy(2)],ones(4,1),'EdgeColor',[0 0 0],'FaceColor','r','FaceAlpha',0.5) 433 439 colorbar('off'); 434 440 %back to main gca … … 438 444 %flag edges of a partition 439 445 if exist(options,'partitionedges') 440 [xsegments ysegments]=flagedges(md.mesh.elements,md.mesh.x,md.mesh.y,md.qmu.partition); 441 xsegments=xsegments*getfieldvalue(options,'unit',1); 442 ysegments=ysegments*getfieldvalue(options,'unit',1); 443 color=getfieldvalue(options,'partitionedgescolor','r-'); 444 linewidth=getfieldvalue(options,'linewidth',1); 445 hold on; 446 for i=1:length(xsegments), 447 plot(xsegments(i,:),ysegments(i,:),color,'LineWidth',linewidth); 448 end 446 [xsegments ysegments]=flagedges(md.mesh.elements,md.mesh.x,md.mesh.y,md.qmu.partition); 447 xsegments=xsegments*getfieldvalue(options,'unit',1); 448 ysegments=ysegments*getfieldvalue(options,'unit',1); 449 color=getfieldvalue(options,'partitionedgescolor','r-'); 450 linewidth=getfieldvalue(options,'linewidth',1); 451 hold on; 452 for i=1:length(xsegments), 453 plot(xsegments(i,:),ysegments(i,:),color,'LineWidth',linewidth); 454 end 455 end 456 457 %Scatter 458 if exist(options,'scatter') 459 data=getfieldvalue(options,'scatter'); 460 hold on 461 plot_scatter(data(:,1),data(:,2),getfieldvalue(options,'scattersize',3),data(:,3),options); 449 462 end 450 463 -
issm/trunk/src/m/model/plot/northarrow.m
r9288 r12329 16 16 structure(6)=16; %default fontsize 17 17 elseif length(structure)>6 18 error('plotmodel error message: to many input arguments for northarrow: [x0 y0 length [ratio [width]]]');18 error('plotmodel error message: to many input arguments for northarrow: [x0 y0 length [ratio width fontsize]]'); 19 19 end 20 20 … … 72 72 73 73 %Text North 74 xN=max([A(1) D(1) E(1) F(1) G(1)])+ratio/3* lengtharrow;74 xN=max([A(1) D(1) E(1) F(1) G(1)])+ratio/3*abs(lengtharrow); 75 75 yN=mean([A(2) F(2) H(2)]); 76 76 text(xN,yN,'North','FontSize',fontsize,'FontWeight','b'); -
issm/trunk/src/m/model/plot/plot_gridded.m
r11027 r12329 40 40 data_max=max(data_grid(:)); 41 41 end 42 options=changefieldvalue(options,'cbYLim',[data_min data_max]); 42 43 if whitepos==1, 43 44 white =data_max + (data_max-data_min)/55; -
issm/trunk/src/m/model/plot/plot_overlay.m
r11995 r12329 96 96 %h_data(find(data_grid>data_mean))=1; 97 97 h_data=1*ones(size(data_grid)); 98 h_data(find(data_grid >data_mean))=0.7;98 h_data(find(data_grid<data_mean))=0.7; 99 99 %saturation (S) 100 100 s_data=max(min(abs(data_grid-data_mean)/(data_max-data_mean) ,1),0); … … 120 120 121 121 %Select plot area 122 subplot (plotlines,plotcols,i);122 subplotmodel(plotlines,plotcols,i,options); 123 123 124 124 %Plot: … … 140 140 options=addfielddefault(options,'axis','equal off'); %default axis 141 141 applyoptions(md,data,options); 142 drawnow -
issm/trunk/src/m/model/plot/plotdoc.m
r11527 r12329 130 130 disp(' ''latlonclick'': ''on'' to click on latlon ticks positions'); 131 131 disp(' colornumber is a [r g b] array and latangle and lonangle are angles to flip the numbers'); 132 disp(' ''northarrow'': add an arrow pointing north, ''on'' for default value or [x0 y0 length [ratio [width]]] where (x0,y0) are the coordinates of the base, andratio=headlength/length');132 disp(' ''northarrow'': add an arrow pointing north, ''on'' for default value or [x0 y0 length [ratio width fontsize]] where (x0,y0) are the coordinates of the base, ratio=headlength/length'); 133 133 disp(' ''offset'': mesh offset used by ''rifts'', default is 500'); 134 134 disp(' ''scaleruler'': add a scale ruler, ''on'' for default value or [x0 y0 length width numberofticks] where (x0,y0) are the coordinates of the lower left corner'); -
issm/trunk/src/m/model/radarpower.m
r11527 r12329 34 34 if ~exist(options,'overlay_image'), 35 35 if strcmpi(md.mesh.hemisphere,'n'), 36 if ~exist([ issmdir() '/projects/ModelData/MOG/mog150_greenland_map.jpg']),37 error(['radarpower error message: file ' issmdir() '/projects/ModelData/MOG/mog150_greenland_map.jpg not found.']);36 if ~exist([jplsvn() '/projects/ModelData/MOG/mog150_greenland_map.jpg']), 37 error(['radarpower error message: file ' jplsvn() '/projects/ModelData/MOG/mog150_greenland_map.jpg not found.']); 38 38 end 39 jpgim=[ issmdir() '/projects/ModelData/MOG/mog150_greenland_map.jpg'];40 geom=load([ issmdir() '/projects/ModelData/MOG/mog150_greenland_map.jpgw'],'ascii');39 jpgim=[jplsvn() '/projects/ModelData/MOG/mog150_greenland_map.jpg']; 40 geom=load([jplsvn() '/projects/ModelData/MOG/mog150_greenland_map.jpgw'],'ascii'); 41 41 42 42 %geom: xposting nbcols nbrows yposting xmin ymax … … 62 62 elseif strcmpi(md.mesh.hemisphere,'s'), 63 63 if highres, 64 if ~exist([ issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif']),65 error(['radarpower error message: file ' issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif not found.']);64 if ~exist([jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif']), 65 error(['radarpower error message: file ' jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif not found.']); 66 66 end 67 geotiff_name=[ issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif'];67 geotiff_name=[jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif']; 68 68 else 69 if ~exist([ issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif']),70 error(['radarpower error message: file ' issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif not found.']);69 if ~exist([jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif']), 70 error(['radarpower error message: file ' jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif not found.']); 71 71 end 72 geotiff_name=[ issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif'];72 geotiff_name=[jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif']; 73 73 end 74 74 -
issm/trunk/src/m/utils/DataProcessing/TracksToMatrix.m
r8298 r12329 26 26 27 27 %Add path to dace 28 addpath([issm tier() '/externalpackages/dace/install'])28 addpath([issmdir() '/externalpackages/dace/install']) 29 29 30 30 %First create the x_m and y_m fot the matrix … … 82 82 83 83 %remove DACE path 84 rmpath([issm tier() '/externalpackages/dace/install']);84 rmpath([issmdir() '/externalpackages/dace/install']); -
issm/trunk/src/m/utils/Exp/exptool.m
r10138 r12329 71 71 else 72 72 %read file 73 B=expread(filename ,1);73 B=expread(filename); 74 74 %go through all profiles of B 75 75 for i=1:size(B,2) -
issm/trunk/src/m/utils/Miscellaneous/issmdoc.m
r11527 r12329 2 2 3 3 %First get ISSM tier: 4 ISSM_ TIER=issmtier;4 ISSM_DIR=issmdir; 5 5 6 6 disp(sprintf('\n%s',' A comprehensive documentation is available on http://issm.jpl.nasa.gov')); 7 7 disp(sprintf('\n%s',' Example: how to create a square ice shelf')); 8 disp(sprintf('%s',' go to ',ISSM_ TIER,'/examples/SquareIceshelf'));8 disp(sprintf('%s',' go to ',ISSM_DIR,'/examples/SquareIceshelf')); 9 9 disp(sprintf('%s',' md=model; %creates a new empty model structure')); 10 10 disp(sprintf('%s',' md=triangle(md,''DomainOutline.exp'',50000); %creates a mesh of the domain outline with a resolution of 50000m')); -
issm/trunk/src/m/utils/OS/ismumps.m
r11995 r12329 6 6 7 7 8 configfile=[issm tier() '/bin/config.h']; %should find it in the install target8 configfile=[issmdir() '/bin/config.h']; %should find it in the install target 9 9 if ~exist(configfile,'file'), 10 10 error(['File ' configfile ' not found. ISSM has not been configured yet!']); -
issm/trunk/src/m/utils/OS/ispetsc.m
r11995 r12329 6 6 7 7 8 configfile=[issm tier() '/bin/config.h']; %should find it in the install target8 configfile=[issmdir() '/bin/config.h']; %should find it in the install target 9 9 if ~exist(configfile,'file'), 10 10 error(['File ' configfile ' not found. ISSM has not been configured yet!']); -
issm/trunk/src/m/utils/OS/issmscpin.m
r11344 r12329 32 32 %use the putty project pscp.exe: it should be in the path. 33 33 34 %get ISSM_ TIER variable35 [status,ISSM_ TIER]=system('echo [%ISSM_TIER_WIN%]');34 %get ISSM_DIR variable 35 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); 36 36 if status, 37 error('scpin error message: could not find ISSM_ TIER_WIN envirnoment variable');37 error('scpin error message: could not find ISSM_DIR_WIN envirnoment variable'); 38 38 end 39 ISSM_ TIER=ISSM_TIER(2:end-2);39 ISSM_DIR=ISSM_DIR(2:end-2); 40 40 41 41 username=input('Username: (quoted string) '); … … 43 43 44 44 for i=1:numel(packages), 45 [status,result]=system([ISSM_ TIER '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' host ':' path '/' packages{i} ' ./']);45 [status,result]=system([ISSM_DIR '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' host ':' path '/' packages{i} ' ./']); 46 46 if status, 47 47 error('scpin error message: could not call putty pscp'); -
issm/trunk/src/m/utils/OS/issmscpout.m
r9369 r12329 23 23 %use the putty project pscp.exe: it should be in the path. 24 24 25 %get ISSM_ TIER variable26 [status,ISSM_ TIER]=system('echo [%ISSM_TIER_WIN%]');25 %get ISSM_DIR variable 26 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); 27 27 if status, 28 error('scpout error message: could not find ISSM_ TIER_WIN envirnoment variable');28 error('scpout error message: could not find ISSM_DIR_WIN envirnoment variable'); 29 29 end 30 ISSM_ TIER=ISSM_TIER(2:end-2);30 ISSM_DIR=ISSM_DIR(2:end-2); 31 31 32 32 username=input('Username: (quoted string) '); … … 34 34 35 35 for i=1:numel(packages), 36 [status,result]=system([ISSM_ TIER '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' packages{i} ' ' host ':' path]);36 [status,result]=system([ISSM_DIR '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' packages{i} ' ' host ':' path]); 37 37 if status, 38 38 error('scpout error message: could not call putty pscp'); -
issm/trunk/src/m/utils/OS/issmssh.m
r9369 r12329 15 15 %use the putty project plink.exe: it should be in the path. 16 16 17 %get ISSM_ TIER variable18 [status,ISSM_ TIER]=system('echo [%ISSM_TIER_WIN%]');17 %get ISSM_DIR variable 18 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); 19 19 if status, 20 error('issmssh error message: could not find ISSM_ TIER_WIN envirnoment variable');20 error('issmssh error message: could not find ISSM_DIR_WIN envirnoment variable'); 21 21 end 22 ISSM_ TIER=ISSM_TIER(2:end-2);22 ISSM_DIR=ISSM_DIR(2:end-2); 23 23 24 24 username=input('Username: (quoted string) '); 25 25 key=input('Key: (quoted string) '); 26 26 27 system([ISSM_ TIER '/externalpackages/ssh/plink.exe -ssh -l "' username '" -pw "' key '" ' host ' "' command '"']);27 system([ISSM_DIR '/externalpackages/ssh/plink.exe -ssh -l "' username '" -pw "' key '" ' host ' "' command '"']); 28 28 29 29 else -
issm/trunk/src/m/utils/Shell/flaimdir.m
r11237 r12329 5 5 % FLAIM_DIR=flaimdir() 6 6 7 FLAIM_DIR=[issm tier '/externalpackages/flaim/install'];7 FLAIM_DIR=[issmdir '/externalpackages/flaim/install']; -
issm/trunk/src/m/utils/Shell/issmdir.m
r11527 r12329 1 1 function ISSM_DIR=issmdir() 2 %ISSMDIR - Get ISSM_DIR environment variable contents.2 %ISSMDIR - Get ISSM_DIR environment variable 3 3 % 4 4 % Usage: … … 9 9 else 10 10 ISSM_DIR =getenv('ISSM_DIR_WIN'); 11 if strcmpi(ISSM_DIR(end),'/') | strcmpi(ISSM_DIR(end),'\'), 12 ISSM_DIR = ISSM_DIR(1:end-1); %shave off the last '/' 13 end 11 14 end 12 15
Note:
See TracChangeset
for help on using the changeset viewer.