|
| 1 | +.. _colocation_notebook: |
| 2 | + |
| 3 | +Co-location Illustration (Notebook) |
| 4 | +=================================== |
| 5 | + |
| 6 | +The co-localization process allows for the alignment of SAR and WW3 data. This page describes how to implement a workflow using a notebook. |
| 7 | + |
| 8 | +Typical Notebook Workflow |
| 9 | +-------------------------- |
| 10 | + |
| 11 | +A typical analysis notebook would follow these steps: |
| 12 | + |
| 13 | +1. **Data Loading**: Load an L2C NetCDF file produced by ``procl2c``. |
| 14 | +2. **Visualization**: Plot the SAR footprint and the associated WW3 points. |
| 15 | +3. **Spectral Analysis**: Extract spectral parameters (e.g., significant wave height) from both the OSW product and the WW3 spectra for the same coordinates. |
| 16 | +4. **Validation**: Compare values using scatter plots or time-series analysis. |
| 17 | + |
| 18 | +Example snippet for visualization: |
| 19 | + |
| 20 | +.. code-block:: python |
| 21 | +
|
| 22 | + import matplotlib.pyplot as plt |
| 23 | + import xarray as xr |
| 24 | + import cartopy.crs as ccrs |
| 25 | +
|
| 26 | + # Load data |
| 27 | + ds_sar = xr.open_dataset("product_v0.1.nc", group="SAR_intraburst") |
| 28 | + ds_ww3 = xr.open_dataset("product_v0.1.nc", group="WW3") |
| 29 | +
|
| 30 | + # Plotting map |
| 31 | + fig = plt.figure(figsize=(10, 6)) |
| 32 | + ax = plt.axes(projection=ccrs.PlateCarree()) |
| 33 | +
|
| 34 | + # The SAR tiles can be plotted as points or polygons |
| 35 | + ax.scatter(ds_sar.oswLon, ds_sar.oswLat, c="blue", label="SAR Tiles") |
| 36 | + ax.scatter(ds_ww3.longitude, ds_ww3.latitude, c="red", label="WW3 Spectra") |
| 37 | + ax.legend() |
| 38 | + plt.show() |
0 commit comments