%ASG_REGRID Regrids data on atmdata or surfdata formats % % asg_regrid regrids atmdata or surfdata on desired grids. % asg_regrid wraps around *atmdata_regrid* for atmdata % and *gf_regrid* for surfdata. % % FORMAT [G]=asg_regrid(G,grids) % % OUT G array of atmdata or surfdata structures % where data has been regridded on desired % grids. % grids{1} is assumed to be pressure. % grids{2} is assumed to be latitude. % grids{3} is assumed to be longitude. % grids{4} is assumed to be day (mjd). % % IN G array of atmdata or surfdata structures % % grids array of grids % % Example usage: % G{1} = atmdata_scalar(0.718); % G{2} = atmdata_scalar(0.800); % p_grid = vec2col( z2p_simple( [-1e3:1e3:70e3] ) ); % lat_grid = vec2col( [-10 : 10] ); % lon_grid = vec2col( [-10 : 10] ); % grids ={p_grid, lat_grid, lon_grid}; % [G]=asg_regrid(G,grids) % 2014-08-24 Created by Bengt Rydberg function [G]=asg_regrid(G,grids) for i=1:length(G); if isatmdata(G{i}); if G{i}.DIM