NOISEDRIFTERS Create a noise Lagrangian dataset matching mean and variance. Given Lagrangian trajectories and their velocity spectra, NOISEDRIFTERS creates a noise dataset that matches, for each trajectory, (i) the starting location, (ii) the mean velocity, and (iii) the approximate variance or eddy kinetic energy, with a velocity spectrum that is an isotropic version of the spectrum of the input trajectory. [LATN,LONN,CVN]=NOISEDRIFTERS(NUM,LAT,LON,CV,SPP,SNN), where LAT and LON are the latitudes and longitudes of Lagrangian trajectories observed at Matlab date number NUM, and with complex velocities CV rotary velocity spectra SPP and SSN, outputs a noise dataset of trajectories with latitudes LATN, longitudes LONN, and velocities CVN. All input arguments are cell arrays of the same size, with one trajectory per cell, and all output arrays will also be of this size. Note that the units of CV are cm/s, as are those of CVN. Similarly, the spectral SPP and SNN should be computed with CV having those units. NOISEDRIFTERS creates an isotropic spectrum by taking, at each frequency, the minimum of SPP and SNN. These are as output by MSPEC, and should be formed with a sufficient degree of smoothing, e.g. not the periodogram estimate. Once the spectral shape is established, NOISEDRIFTERS creates a random Gaussian time series having exactly this spectral shape. Each random velocity time series is then set to have the same mean value and variance as the corresponding original time series. The random velocity time series are then integrated to give the output trajectories LATN and LONN, using UV2LATLON. The initial value of LAT and LON are the same as that of LATN and LONN. These noise trajectories are differenced again using LATLON2UV to produce CVN, as this is how the velocities are produced from trajectories for the observations. Because of the differences between numerically integrating with UV2LATLON and differencing with LATLON2UV, the variancees of CVN and CV are approximately but not exactly equal. NOISEDRIFTERS(NUM,LAT,LON,CV) with no spectra input alternately uses white noise velocities to generate the output fields. NOISEDRIFTERS(...,'parallel') parallelizes the computation using a PARFOR loop, which requires the Parallel Computing Toolbox. Usage: [latn,lonn,cvn]=noisedrifters(num,lat,lon,cv,spp,snn); [latn,lonn,cvn]=noisedrifters(num,lat,lon,cv); __________________________________________________________________ This is part of JLAB --- type 'help jlab' for more information (C) 2019 J.M. Lilly --- type 'help jlab_license' for details