Index: /issm/trunk/src/m/model/radarpower.m
===================================================================
--- /issm/trunk/src/m/model/radarpower.m	(revision 6487)
+++ /issm/trunk/src/m/model/radarpower.m	(revision 6488)
@@ -1,3 +1,3 @@
-function md=radarpower(md,hemisphere,xlim,ylim,highres)
+function md=radarpower(md,xlim,ylim,highres)
 %RADARPOWER - overlay a power radar image on an existing mesh
 %
@@ -7,5 +7,7 @@
 %
 %   Usage:
-%      md=radarpower(md,hemisphere,xlim,ylim,highres)
+%      md=radarpower(md,xlim,ylim,highres)
+%      md=radarpower(md,xlim,ylim)
+%      md=radarpower(md)
 
 global ISSM_TIER
@@ -15,13 +17,19 @@
 if isempty(MODELDATA), MODELDATA='/u/astrid-r1b/larour/ModelData'; end
 
+%Parse inputs
+if nargin<4,
+	highres=0;
+end
+if nargin<3,
+	xlim=[min(md.x) max(md.x)];
+	ylim=[min(md.y) max(md.y)];
+end
+
 %find gdal coordinates
-x0=min(xlim);
-x1=max(xlim);
-
-y0=min(ylim);
-y1=max(ylim);
+x0=min(xlim); x1=max(xlim);
+y0=min(ylim); y1=max(ylim);
 
 %the geotiff image is either 200m or 1km accuracy. 
-if strcmpi(hemisphere,'n'),
+if strcmpi(md.hemisphere,'n'),
 	if ~exist([MODELDATA '/MOG/mog150_greenland_map.jpg']),
 		error(['radarpower error message: file ' MODELDATA '/MOG/mog150_greenland_map.jpg not found. Check MODELDATA variable..']);
@@ -35,4 +43,5 @@
 
 	%Read and crop file
+	disp('Warning: expecting coordinates in polar stereographic (Std Latitude: 70ºN Meridian: 45º)');
 	im=imread(jpgim);
 	im=im(toplefty:toplefty+sizey,topleftx:topleftx+sizex);
@@ -41,5 +50,5 @@
 	md.sarym=(y0:(y1-y0)/(size(md.sarpwr,1)-1):y1);
 
-else
+elseif strcmpi(md.hemisphere,'s'),
 	if highres,
 		if ~exist([MODELDATA '/MosaicTiffRsat/amm125m_v2_200m.tif']),
@@ -66,3 +75,5 @@
 	system('rm -rf ./temp.tif');
 
+else
+	error('field hemisphere should either be ''n'' or ''s''');
 end
