Changeset 12329


Ignore:
Timestamp:
06/01/12 17:25:46 (13 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 12326M

Location:
issm/trunk/src/m
Files:
10 deleted
36 edited
53 copied

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/Makefile.am

    r11995 r12329  
    1313                                ./planet/*.m \
    1414                                ./qmu/*.m \
    15                                 ./shared/*.m \
    16                                 ./solutions/*.m \
    17                                 ./solvers/*.m \
    1815                                ./utils/*.m \
    19                                 ./utils/Analysis/*.m \
    2016                                ./utils/Array/*.m \
    2117                                ./utils/BC/*.m \
  • issm/trunk/src/m/classes

    • Property svn:ignore
      •  

        old new  
         1__pycache__
        12Makefile.in
        23Makefile
  • issm/trunk/src/m/classes/clusters

    • Property svn:ignore
      •  

        old new  
         1__pycache__
        12Makefile.in
        23Makefile
  • issm/trunk/src/m/classes/clusters/generic.m

    r11995 r12329  
    22%
    33%   Usage:
    4 %      cluster=generic('name','astrid',);
    54%      cluster=generic('name','astrid','np',3);
    65%      cluster=generic('name',oshostname(),'np',3,'login','username');
     
    1413                 port=0;
    1514                 interactive=1;
    16                  codepath=[issmtier() '/bin'];
    17                  executionpath=[issmtier() '/execution'];
    18                  valgrind=[issmtier() '/externalpackages/valgrind/install/bin/valgrind'];
    19                  valgrindlib=[issmtier() '/externalpackages/valgrind/install/lib/libmpidebug.so'];
    20                  valgrindsup=[issmtier() '/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'];
    2120                 %}}}
    2221         end
     
    2827
    2928                         %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());
    3230
    3331                         %initialize cluster using user settings if provided
  • issm/trunk/src/m/classes/clusters/none.m

    r11995 r12329  
    1212    methods
    1313                 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');
    2815                 end
    2916                 %}}}
  • issm/trunk/src/m/classes/groundingline.m

    r11995 r12329  
    3737                                end
    3838                                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),
    4040                                        checkmessage(['bathymetry not equal to bed on grounded ice !']);
    4141                                end
  • issm/trunk/src/m/classes/model/model.m

    r11995 r12329  
    379379                                 md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum,iluasmoptions);
    380380                         end
    381                          md.cluster          = none();
     381                         md.cluster          = generic();
    382382                         md.balancethickness = balancethickness();
    383383                         md.diagnostic       = diagnostic();
  • issm/trunk/src/m/classes/modellist.m

    r11995 r12329  
    77        properties (SetAccess=public)
    88                models  = cell(0,1);
    9                 cluster = none();
     9                cluster = generic();
    1010        end
    1111        methods
  • issm/trunk/src/m/classes/solver.m

    r11995 r12329  
    1818                                 end
    1919                         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);
    2124
    2225                         %Convert analysis from enum to string
     
    2932
    3033                         %Add solver options to analysis
    31                          obj.(analysis) = solveroptions;
     34                         if nargin==3, obj.(analysis) = varargin{1}; end
    3235                 end
    3336                 %}}}
  • issm/trunk/src/m/enum/MaximumNumberOfEnums.m

    r12326 r12329  
    99%      macro=MaximumNumberOfEnums()
    1010
    11 macro=437;
     11macro=440;
  • issm/trunk/src/m/kml/README.txt

    r8298 r12329  
    6161There are some other utilities that are used in the construction of topological tables for the kml writing.
    6262
    63 nodeconnectivity.m   - create a node connectivity table (nnodes x mxepg+1)
     63kmlnodeconnectivity.m   - create a node connectivity table (nnodes x mxepg+1)
    6464edgeadjacency.m      - create an edge adjacency array (elems x edges)
    6565edgeperimeter.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  
    150150        elemp=md.mesh.elements(irow,:);
    151151        epartp=epart(irow,:);
    152         nodeconp=nodeconnectivity(elemp,md.mesh.numberofvertices);
     152        nodeconp=kmlnodeconnectivity(elemp,md.mesh.numberofvertices);
    153153        [edgeadjp]=edgeadjacency(elemp,nodeconp);
    154154        [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp);
  • issm/trunk/src/m/kml/kml_partitions.m

    r9733 r12329  
    151151        elemp=md.mesh.elements(irow,:);
    152152        epartp=epart(irow,:);
    153         nodeconp=nodeconnectivity(elemp,md.mesh.numberofvertices);
     153        nodeconp=kmlnodeconnectivity(elemp,md.mesh.numberofvertices);
    154154        [edgeadjp]=edgeadjacency(elemp,nodeconp);
    155155        [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp);
  • issm/trunk/src/m/kml/kml_unsh_edges.m

    r9733 r12329  
    7474if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ...
    7575    md.qmu.numberofpartitions
    76     [edgeadj]=edgeadjacency(md.mesh.elements,md.nodeconnectivity);
     76    [edgeadj]=edgeadjacency(md.mesh.elements,md.kmlnodeconnectivity);
    7777    [icol,irow]=find(edgeadj'==0);
    7878    edgeuns=zeros(length(irow),2);
  • issm/trunk/src/m/model/collapse.m

    r11995 r12329  
    3030if ~isnan(md.inversion.vel_obs), md.inversion.vel_obs=project2d(md,md.inversion.vel_obs,md.mesh.numberoflayers); end;
    3131if ~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;
     32if numel(md.inversion.min_parameters)>1, md.inversion.min_parameters=project2d(md,md.inversion.min_parameters,md.mesh.numberoflayers); end;
     33if numel(md.inversion.max_parameters)>1, md.inversion.max_parameters=project2d(md,md.inversion.max_parameters,md.mesh.numberoflayers); end;
    3434if ~isnan(md.surfaceforcings.mass_balance),
    3535        md.surfaceforcings.mass_balance=project2d(md,md.surfaceforcings.mass_balance,md.mesh.numberoflayers);
     
    101101
    102102%lat long
    103 md.mesh.lat=project2d(md,md.mesh.lat,1);
    104 md.mesh.long=project2d(md,md.mesh.long,1);
     103if numel(md.mesh.lat) ==md.mesh.numberofvertices,  md.mesh.lat=project2d(md,md.mesh.lat,1); end
     104if numel(md.mesh.long)==md.mesh.numberofvertices, md.mesh.long=project2d(md,md.mesh.long,1); end
    105105
    106106%Initialize with the 2d mesh
  • issm/trunk/src/m/model/marshall.m

    r11995 r12329  
    1515        error(['marshall error message: could not open ' [md.miscellaneous.name '.bin'],' file for binary writing']);
    1616end
     17
     18%First, write MaximumNumberOfEnum to make sure that the Enums are synchronized
     19WriteData(fid,'enum',MaximumNumberOfEnums(),'data',true,'format','Boolean');
    1720
    1821%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__
        12Makefile.in
        23Makefile
  • issm/trunk/src/m/model/mesh/triangle.m

    r11995 r12329  
    3838
    3939%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);
    4441
    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
     43orphan=find(~ismember([1:length(x)],sort(unique(elements(:)))));
     44for 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;
     58end
    6159
    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
     61md.mesh.x=x;
     62md.mesh.y=y;
     63md.mesh.elements=elements;
     64md.mesh.segments=segments;
     65md.mesh.segmentmarkers=segmentmarkers;
    6966
    7067%Fill in rest of fields:
  • issm/trunk/src/m/model/modis.m

    r9620 r12329  
    1414
    1515%Get path  to gdal binaries
    16 path_gdal=[issmtier() '/externalpackages/gdal/install/bin/'];
     16path_gdal=[issmdir() '/externalpackages/gdal/install/bin/'];
    1717
    1818%Was gdal compiled?
    1919if ~exist([path_gdal 'gdal_translate']),
    20         error(['modis error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' issmtier() '/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.']);
    2121end
    2222
  • issm/trunk/src/m/model/partition/AreaAverageOntoPartition.m

    r9741 r12329  
    2929        %finally, project vector:
    3030        vector=project2d(md3d,vector,layer);
    31         md.qmu.partition=project2d(md3d,md3d.part,layer);
     31        md.qmu.partition=project2d(md3d,md3d.qmu.partition,layer);
    3232end
    3333
  • issm/trunk/src/m/model/petscversion.m

    r11995 r12329  
    88PETSC_VERSION=3;
    99
    10 configfile=[issmtier() '/config.h'];
     10configfile=[issmdir() '/config.h'];
    1111if ~exist(configfile,'file'),
    1212        error(['File ' configfile ' not found. ISSM has not been configured yet!']);
  • issm/trunk/src/m/model/plot/applyoptions.m

    r11237 r12329  
    219219                warning on MATLAB:log:logOfZero;
    220220                set(c,'YTickLabel',labels);
     221        end
     222        if exist(options,'cbYLim');
     223                set(c,'YLim',getfieldvalue(options,'cbYLim'));
    221224        end
    222225        if exist(options,'colorbartitle'),
     
    289292                textpositioni=textposition{i};
    290293                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);
    292295                set(h,'Clipping','on'); %prevent text from appearing outside of the box
    293296        end
     
    346349if exist(options,'axispos'),
    347350        Axis=getfieldvalue(options,'axispos');
     351        hold on
    348352        set(gca,'pos',Axis);
    349353end
     
    411415        %box off
    412416        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']);
    414418                [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);
    415421        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']);
    417423        else
    418424                error('applyoptions error message: hemisphere not defined');
    419425        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];
    422429        %if we are zooming on a basin, don't take the mesh for the boundaries!
    423430        if exist(options,'basin'),
    424431                [mdx mdy]=basinzoom(options);
    425432        else
    426                 offset=3*10^4;
    427433                mdx=[min(md.mesh.x)-offset max(md.mesh.x)+offset];
    428434                mdy=[min(md.mesh.y)-offset max(md.mesh.y)+offset];
     
    430436        line(A.x,A.y,ones(size(A.x)),'color','b');
    431437        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( [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)
     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)
    433439        colorbar('off');
    434440        %back to main gca
     
    438444%flag edges of a partition
    439445if 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
     455end
     456
     457%Scatter
     458if 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);
    449462end
    450463
  • issm/trunk/src/m/model/plot/northarrow.m

    r9288 r12329  
    1616        structure(6)=16; %default fontsize
    1717elseif 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]]');
    1919end
    2020
     
    7272
    7373%Text North
    74 xN=max([A(1) D(1) E(1) F(1) G(1)])+ratio/3*lengtharrow;
     74xN=max([A(1) D(1) E(1) F(1) G(1)])+ratio/3*abs(lengtharrow);
    7575yN=mean([A(2) F(2) H(2)]);
    7676text(xN,yN,'North','FontSize',fontsize,'FontWeight','b');
  • issm/trunk/src/m/model/plot/plot_gridded.m

    r11027 r12329  
    4040        data_max=max(data_grid(:));
    4141end
     42options=changefieldvalue(options,'cbYLim',[data_min data_max]);
    4243if whitepos==1,
    4344        white  =data_max + (data_max-data_min)/55;
  • issm/trunk/src/m/model/plot/plot_overlay.m

    r11995 r12329  
    9696        %h_data(find(data_grid>data_mean))=1;
    9797        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;
    9999        %saturation (S)
    100100        s_data=max(min(abs(data_grid-data_mean)/(data_max-data_mean) ,1),0);
     
    120120
    121121%Select plot area
    122 subplot(plotlines,plotcols,i);
     122subplotmodel(plotlines,plotcols,i,options);
    123123
    124124%Plot:
     
    140140options=addfielddefault(options,'axis','equal off');           %default axis
    141141applyoptions(md,data,options);
     142drawnow
  • issm/trunk/src/m/model/plot/plotdoc.m

    r11527 r12329  
    130130disp('       ''latlonclick'': ''on'' to click on latlon ticks positions');
    131131disp('                   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, and ratio=headlength/length');
     132disp('       ''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');
    133133disp('       ''offset'': mesh offset used by ''rifts'', default is 500');
    134134disp('       ''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  
    3434if ~exist(options,'overlay_image'),
    3535        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.']);
    3838                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');
    4141
    4242                %geom:   xposting nbcols nbrows yposting xmin ymax
     
    6262        elseif strcmpi(md.mesh.hemisphere,'s'),
    6363                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.']);
    6666                        end
    67                         geotiff_name=[issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif'];
     67                        geotiff_name=[jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif'];
    6868                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.']);
    7171                        end
    72                         geotiff_name=[issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif'];
     72                        geotiff_name=[jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif'];
    7373                end
    7474
  • issm/trunk/src/m/utils/DataProcessing/TracksToMatrix.m

    r8298 r12329  
    2626
    2727%Add path to dace
    28 addpath([issmtier() '/externalpackages/dace/install'])
     28addpath([issmdir() '/externalpackages/dace/install'])
    2929
    3030%First create the x_m and y_m fot the matrix
     
    8282
    8383%remove DACE path
    84 rmpath([issmtier() '/externalpackages/dace/install']);
     84rmpath([issmdir() '/externalpackages/dace/install']);
  • issm/trunk/src/m/utils/Exp/exptool.m

    r10138 r12329  
    7171                else
    7272                        %read file
    73                         B=expread(filename,1);
     73                        B=expread(filename);
    7474                        %go through all profiles of B
    7575                        for i=1:size(B,2)
  • issm/trunk/src/m/utils/Miscellaneous/issmdoc.m

    r11527 r12329  
    22
    33%First get ISSM tier:
    4 ISSM_TIER=issmtier;
     4ISSM_DIR=issmdir;
    55
    66disp(sprintf('\n%s','  A comprehensive documentation is available on http://issm.jpl.nasa.gov'));
    77disp(sprintf('\n%s','  Example: how to create a square ice shelf'));
    8 disp(sprintf('%s','        go to ',ISSM_TIER,'/examples/SquareIceshelf'));
     8disp(sprintf('%s','        go to ',ISSM_DIR,'/examples/SquareIceshelf'));
    99disp(sprintf('%s','        md=model;                                %creates a new empty model structure'));
    1010disp(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  
    66
    77
    8 configfile=[issmtier() '/bin/config.h']; %should find it in the install target
     8configfile=[issmdir() '/bin/config.h']; %should find it in the install target
    99if ~exist(configfile,'file'),
    1010        error(['File ' configfile ' not found. ISSM has not been configured yet!']);
  • issm/trunk/src/m/utils/OS/ispetsc.m

    r11995 r12329  
    66
    77
    8 configfile=[issmtier() '/bin/config.h']; %should find it in the install target
     8configfile=[issmdir() '/bin/config.h']; %should find it in the install target
    99if ~exist(configfile,'file'),
    1010        error(['File ' configfile ' not found. ISSM has not been configured yet!']);
  • issm/trunk/src/m/utils/OS/issmscpin.m

    r11344 r12329  
    3232                %use the putty project pscp.exe: it should be in the path.
    3333               
    34                 %get ISSM_TIER variable
    35                 [status,ISSM_TIER]=system('echo [%ISSM_TIER_WIN%]');
     34                %get ISSM_DIR variable
     35                [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
    3636                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');
    3838                end
    39                 ISSM_TIER=ISSM_TIER(2:end-2);
     39                ISSM_DIR=ISSM_DIR(2:end-2);
    4040
    4141                username=input('Username: (quoted string) ');
     
    4343
    4444                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} ' ./']);
    4646                        if status,
    4747                                error('scpin error message: could not call putty pscp');
  • issm/trunk/src/m/utils/OS/issmscpout.m

    r9369 r12329  
    2323                %use the putty project pscp.exe: it should be in the path.
    2424               
    25                 %get ISSM_TIER variable
    26                 [status,ISSM_TIER]=system('echo [%ISSM_TIER_WIN%]');
     25                %get ISSM_DIR variable
     26                [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
    2727                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');
    2929                end
    30                 ISSM_TIER=ISSM_TIER(2:end-2);
     30                ISSM_DIR=ISSM_DIR(2:end-2);
    3131
    3232                username=input('Username: (quoted string) ');
     
    3434
    3535                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]);
    3737                        if status,
    3838                                error('scpout error message: could not call putty pscp');
  • issm/trunk/src/m/utils/OS/issmssh.m

    r9369 r12329  
    1515                %use the putty project plink.exe: it should be in the path.
    1616               
    17                 %get ISSM_TIER variable
    18                 [status,ISSM_TIER]=system('echo [%ISSM_TIER_WIN%]');
     17                %get ISSM_DIR variable
     18                [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
    1919                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');
    2121                end
    22                 ISSM_TIER=ISSM_TIER(2:end-2);
     22                ISSM_DIR=ISSM_DIR(2:end-2);
    2323
    2424                username=input('Username: (quoted string) ');
    2525                key=input('Key: (quoted string) ');
    2626
    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 '"']);
    2828
    2929        else
  • issm/trunk/src/m/utils/Shell/flaimdir.m

    r11237 r12329  
    55%      FLAIM_DIR=flaimdir()
    66
    7 FLAIM_DIR=[issmtier '/externalpackages/flaim/install'];
     7FLAIM_DIR=[issmdir '/externalpackages/flaim/install'];
  • issm/trunk/src/m/utils/Shell/issmdir.m

    r11527 r12329  
    11function ISSM_DIR=issmdir()
    2 %ISSMDIR - Get ISSM_DIR environment variable contents.
     2%ISSMDIR - Get ISSM_DIR environment variable
    33%
    44%   Usage:
     
    99else
    1010        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
    1114end
    1215
Note: See TracChangeset for help on using the changeset viewer.