You can download that part of the toolbox like this
svn checkout --username MYEXTRANETLOGIN https://forge.ifremer.fr/svn/ww3tools/trunk/MATLAB/S2 S2
and that will put the toolbox (and the svn files to allow version control) into a local folder called S2
Sentinel 2 imagery
Optical images of the ocean surface offer stunning views of ocean waves including whitecaps and other features. You can go to the S2 bot for a wide range of examples or use a browser, such as in this example, https://sentinelshare.page.link/1uGV making it easier to flick through time for the same location. The data can be dowloaded from the Copernicus Science hub, you just have to register.
The MSI sensor uses 13 "channels" (think of them as "colors") and series of 12 detectors, each detector acquiring teh 13 channels and each with a slightly different view geometry. The small differences in acquisition time and view geometry between the channels and detectors can be used to look at things moving on the ocean surface.
The algorithm used to produce L1C images is described in https://sentinel.esa.int/web/sentinel/technical-guides/sentinel-2-msi/level-1c/algorithm .
More details on S2 are in the handbook.
S2 quick simulator
See Kudryavtsev et al. (2017a) and Appendix A in Ardhuin et al. 2020
The program s2_simu.m uses the CDIP spectral data that is available here ftp://ftp.ifremer.fr/ifremer/ww3/INSITU/2016/46258/CDIP46258_2020_spectrum.nc
to produce an image that looks like the one processed in Kudryavtsev et al. (2017).
The principle of s2_simu is simple:
- define a 2D wave spectrum from the first 5 moments (using MEM)
- interpolate the spectrum onto a very fine spectral grid (finer than needed for a 8 by 8 km region of the ocean)
- play with the spectrum (chop part of it, add noise ...)
- inverse Fourier transform using random phases that are kept constant in time, for doing different time steps
The end result of s2_simu are 4 images (or more) on which the S2_analysis can be applied exaclty as done with the real S2 image.
S2 processing for surface current & shear
The information needed to compute the current uses both the image files, and 2 xml files:
- A geometry file: this gives the view angles (theta and phi) from wich we get a DS (distance on the ground between the different views), it also gives the UTM coordinates from with we get latitude and longitude of any image pixel.
- A position file: this gives the speed on ground V
the time lag is then DS/V