Changeset 24901


Ignore:
Timestamp:
05/22/20 20:01:40 (5 years ago)
Author:
jdquinn
Message:

CHG: MATLAB -> Python translation; fixed syntax bug from previous commit.

Location:
issm/trunk-jpl/src/m
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/mask.py

    r24896 r24901  
    5151            index = args[1]
    5252            self.ocean_levelset[index] = -ocean
    53         else:
     53        elif nargin == 1:
    5454            ocean = args[0]
    5555            self.ocean_levelset = -ocean
     
    6464            index = args[1]
    6565            self.ice_levelset[index] = -ice
    66         else:
     66        elif nargin == 1:
    6767            ice = *args[0]
    6868            self.ocean_levelset = -ocean
  • issm/trunk-jpl/src/m/coordsystems/flaglatlongradius.m

    r24817 r24901  
    1 function indices=flaglatlongradius(lat,long,lat0,long0,radius)
     1function indices=flaglatlongradius(lat,long,lat0,long0,radius) % {{{
    22%FLAGLATLONGRADIUS - given a vector of lat,long, and a circle of radius degrees around lat0,long0,
    33%                    return the indices into lat,long that are within this circle.
    4 %                    lat and long should be between -90 and 90, and -180 and +180 respectively. 
     4%                    lat and long should be between -90 and 90, and -180 and +180 respectively.
    55
    6         distance=sqrt( (lat-lat0).^2+ (long-long0).^2);
    7        
    86        %three cases, depending on whether our circle goes past the -180 +180 longitude line:
    97        if (long0-radius)<=-180,
     
    1513        distance=sqrt( (lat-lat0).^2+ (long-long0).^2);
    1614        indices=find(distance<=radius);
     15% }}}
Note: See TracChangeset for help on using the changeset viewer.