Documentation of reshape_ann_to_mon


Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)


Function Synopsis

[outdat, ntim, nlat, nlon] = reshape_ann_to_mon(indat);

Help text


  [outdat, ntim, nlat, nlon] = reshape_ann_to_mon(indat);

  Reshapes 4D variable indat to 3D variable outdat, where
  dimensions on indat are [nyr nmo nlat nlon], and on
  outdat are [nyr*nmo nlat nlon]


Listing of function reshape_ann_to_mon

function [outdat, ntim, nlat, nlon] = reshape_ann_to_mon(indat);
[ntim, nmo, nlat, nlon] = size(indat);
outdat = repmat(NaN, [ntim*nmo, nlat, nlon]);
for i = 1:ntim;
  ind = 12*(i-1)+[1:12];
  outdat(ind,:,:) = squeeze(indat(i,:,:,:));
end
ntim = ntim*nmo;