Changeset 20013


Ignore:
Timestamp:
01/29/16 12:16:20 (9 years ago)
Author:
Eric.Larour
Message:

CHG: better verbose of gmtmask.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/coordsystems/gmtmask.m

    r20005 r20013  
    1 function mask = gmtmask(lat,long)
     1function mask = gmtmask(lat,long,varargin)
    22%GMTMASK - figure out which lat,long points are on the ocean
    33%
     
    66%
    77
    8         disp(sprintf('gmtmask: num vertices %i',length(lat)));
     8        %are we doing a recursive call?
     9        if nargin==3,
     10                recursive=1;
     11        else
     12                recursive=0;
     13        end
     14       
     15        if(recursive)disp(sprintf('             recursing: num vertices %i',length(lat)));
     16        else disp(sprintf('gmtmask: num vertices %i',length(lat)));
     17        end
    918       
    1019        %Check lat and long size is not more than 50,000; If so, recursively call gmtmask:
     
    1524                                j=length(lat);
    1625                        end
    17                         mask(i:j)=gmtmask(lat(i:j),long(i:j));
     26                        mask(i:j)=gmtmask(lat(i:j),long(i:j),1);
    1827                end
    1928                return
     
    3140
    3241        %figure out which vertices are on the ocean, which one on the continent:
    33         system('gmt gmtselect ./all_vertices.txt -h0 -Df -R0/360/-90/90  -A0 -JQ180/200 -Nk/s/k/s/k > ./oce_vertices.txt');
     42        system('gmt gmtselect ./all_vertices.txt -h0 -Df -R0/360/-90/90  -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt');
    3443
    3544        %reset DYLD_LIBRARY_PATH to what it was:
     
    5362       
    5463        system('rm -rf ./all_vertices.txt ./oce_vertices.txt ./gmt.history');
    55         disp(sprintf('gmtmask: done'));
     64        if ~recursive, disp(sprintf('gmtmask: done')); end;
Note: See TracChangeset for help on using the changeset viewer.