Global Index (short | long) | Local contents | Local Index (short | long)
[outdat, ntim, nlat, nlon] = reshape_ann_to_mon(indat);
[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]
This function is called by | |
---|---|
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;