Changeset 819


Ignore:
Timestamp:
06/05/09 14:52:58 (16 years ago)
Author:
Mathieu Morlighem
Message:

fixed plot_overlay

Location:
issm/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/GriddataMeshToGridx/GriddataMeshToGridx.cpp

    r132 r819  
    1313#include "../EnumDefinitions/EnumDefinitions.h"
    1414
    15 
    16 
    1715void GriddataMeshToGridx( double** pgriddata,double*  index,int nel,double* x,double* y,int nods, Contour** contours,int numcontours,
    1816                double* meshdata,double cornereast,double cornernorth,double xposting,double yposting,int nlines,int ncols,
     
    2624        double* griddata=NULL;
    2725        int*    sparsity=NULL;
    28        
    2926       
    3027        /*intermediary: */
     
    4138        double*  yc=NULL;
    4239
    43 
    44        
    45 
    46 
    4740        /*First, allocate griddata: */
    4841        griddata=(double*)xcalloc(nlines*ncols,sizeof(double));
     
    5649                maxi=nods;
    5750        }
    58         else if (interpolation==0){
     51        else if (interpolation==1){
    5952                maxi=nel;
    6053        }
     
    8578                if (gridi>=nlines)continue;
    8679                if (gridj>=ncols)continue;
    87 
    8880       
    8981                /*printf("yi %g cornersouth %g posting %g yi-cornersouth %g gridi %i\n",yi,cornersouth,posting,yi-cornersouth,gridi);
     
    10395                /*Using this box, we add value in the box. If filter is average, we add 1 to sparsity for each member of this
    10496                 * box, if filter is nearest, we set 1 to sparisty for each member of this box: */
    105 
    10697                if(filter==0){
    10798                        /*average: */
     
    123114                }
    124115        } //for(i=0;i<maxi;i++)
    125        
    126116
    127117        /*Ok, now we have griddata, and sparsity. Divide griddata by sparsity: */
     
    178168        }
    179169
    180 
    181170        /*Assign output pointers: */
    182171        *pgriddata=griddata;
  • issm/trunk/src/m/classes/public/buildoverlay.m

    r1 r819  
    6161
    6262md.cluster='none';
    63 md=solve(md,'mesh2grid','cielo');
     63md=solve(md,'analysis_type','mesh2grid','package','cielo');
    6464
    6565%Ok, we have two images, double format:
  • issm/trunk/src/m/classes/public/plot/plot_overlay.m

    r1 r819  
    2323        transparency=options_structure.alpha;
    2424else
    25         transparency=1.5; %rignot setting.
     25        transparency=1.5; %Rignot setting.
    2626end
    2727
     
    6565
    6666%colorbar
    67 if ~isnan(options_structure.colorbar),
     67if options_structure.colorbar,
    6868
    6969        %create colorbar with correct colors and position
     
    7272        colorbar_image_handle=get(colorbar_handle,'Children');
    7373        set(colorbar_image_handle,'CData',colorbar_rgb);
    74         set(colorbar_handle,'Position',options_structure.colorbarpos);
     74        if options_structure.colorbarpos,
     75                set(colorbar_handle,'Position',options_structure.colorbarpos);
     76        end
    7577
    7678        %modify ticks.
  • issm/trunk/src/m/classes/public/radarpower.m

    r1 r819  
    2020
    2121%Get path  to gdal binaries
    22 path_gdal=[ISSM_DIR '/Libs/gdal/install'];
     22path_gdal=[ISSM_DIR '/externalpackages/gdal/install/bin/'];
    2323
    2424%Was gdal compiled?
    25 if exist([path_gdal 'gdal_translate'])==0,
    26         error(['radarpower error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' ISSM_DIR '/Libs/gdal to use this routine.']);
     25if ~exist([path_gdal 'gdal_translate']),
     26        error(['radarpower error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' ISSM_DIR '/externalpackages/gdal to use this routine.']);
    2727end
    2828
    2929%the geotiff image is either 200m or 1km accuracy.
    3030if highres,
    31         geotiff_name=[MODELDATA 'MosaicTiffRsat/amm125m_v2_200m.tif'];
     31        if ~exist([MODELDATA '/MosaicTiffRsat/amm125m_v2_200m.tif']),
     32                error(['radarpower error message: file ' MODELDATA '/MosaicTiffRsat/amm125m_v2_200m.tif not found. Check MODELDATA variable..']);
     33        end
     34        geotiff_name=[MODELDATA '/MosaicTiffRsat/amm125m_v2_200m.tif'];
    3235else
    33         geotiff_name=[MODELDATA 'MosaicTiffRsat/amm125m_v2_1km.tif'];
     36        if ~exist([MODELDATA '/MosaicTiffRsat/amm125m_v2_1km.tif']),
     37                error(['radarpower error message: file ' MODELDATA '/MosaicTiffRsat/amm125m_v2_1km.tif not found. Check MODELDATA variable..']);
     38        end
     39        geotiff_name=[MODELDATA '/MosaicTiffRsat/amm125m_v2_1km.tif'];
    3440end
    3541
Note: See TracChangeset for help on using the changeset viewer.