Home > hfrc > matlab > @HFRC > griddata_fill.m

griddata_fill

PURPOSE ^

GRIDDATA_FILL - Use griddata to replace missing data with spatially

SYNOPSIS ^

function [h, XII, YII] = griddata_fill( h, all, pc, varargin )

DESCRIPTION ^

 GRIDDATA_FILL - Use griddata to replace missing data with spatially
 interpolated data.

 This function is basically a wrapper for the normal griddata.

 Usage: hfrc_obj = griddata_fill( hfrc_obj, interp_all, pc, method )

 where interp_all is a boolean that states whether or not to apply
 griddata to all spatial variables - if false, griddata is only applied
 to U and V, and variables like NumRadials are simply set to all zeros 
 (sparse(m,n) where (m,n) are the dimensions of the new hfrc object
 created).  

 interp_all can also be a string, in which case the function returns just the
 variable of interest and not a HFRC object.

 XI and YI are best explained in the griddata help - they
 should be longitude and latitude, respectively.  They can be matrices
 or vectors.  If one is a row and the other is a column, then the
 interpolation will be over a grid.  If both are rows or both are
 columns, then interpolation will be over the points given.

 pc is the minimum spatial percent coverage for interpolation to occur.  It
 defaults to 0.3.  For maps (time steps) that have less than this
 coverage, the map will be left untouched.  This behavior is distinct
 from that of HFRC/griddata.m

 method is described in griddata.

 The actual gridding is all done in kms to avoid any problems with
 uneven dimensions.

 In the end, if the original object was sparse, all NaN's in the result
 will be replaced by 0's and the result will be sparsed.  If the
 original was full, nothing will be done.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

     $Id: griddata_fill.m,v 1.8 2003-09-12 19:51:31 dmk Exp $    

 Copyright (C) 2001 David M. Kaplan
 Licence: GPL

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Mon 18-Dec-2006 07:26:46 by m2html © 2003