Changeset 24901
- Timestamp:
- 05/22/20 20:01:40 (5 years ago)
- 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 51 51 index = args[1] 52 52 self.ocean_levelset[index] = -ocean 53 el se:53 elif nargin == 1: 54 54 ocean = args[0] 55 55 self.ocean_levelset = -ocean … … 64 64 index = args[1] 65 65 self.ice_levelset[index] = -ice 66 el se:66 elif nargin == 1: 67 67 ice = *args[0] 68 68 self.ocean_levelset = -ocean -
issm/trunk-jpl/src/m/coordsystems/flaglatlongradius.m
r24817 r24901 1 function indices=flaglatlongradius(lat,long,lat0,long0,radius) 1 function indices=flaglatlongradius(lat,long,lat0,long0,radius) % {{{ 2 2 %FLAGLATLONGRADIUS - given a vector of lat,long, and a circle of radius degrees around lat0,long0, 3 3 % 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. 5 5 6 distance=sqrt( (lat-lat0).^2+ (long-long0).^2);7 8 6 %three cases, depending on whether our circle goes past the -180 +180 longitude line: 9 7 if (long0-radius)<=-180, … … 15 13 distance=sqrt( (lat-lat0).^2+ (long-long0).^2); 16 14 indices=find(distance<=radius); 15 % }}}
Note:
See TracChangeset
for help on using the changeset viewer.