---
jupytext:
  formats: md:myst
  text_representation:
    extension: .md
    format_name: myst
mystnb:
  execution_timeout: 360
---

(l4)=
# L4

The altimeter L4 products are monthly gridded (1°x1°) significant wave height(SWH)
statistics files, processed from each mission L2P series.

It provides statistics computed from `swh_denoised` variable in L2P (SWH bias corrected - adjusted -
and denoised), retaining only the **good quality** measurements (`quality_level` equal to 3) within 
these L2P files. All missions processed as L2P and adjusted to each other are included and
merged together within these monthly statistics.

For altimeters, only the Ku band measurements are considered, when available 
(the only current exception being SARAL for which only Ka band is provided).
For ERS-1, ERS-2, TOPEX, Sentinel-3 A & B and Sentinel-6, the 1 Hz 
measurements were estimated from the full resolution SWH measurements 
provided in the source Agency’s GDR & SGDR products. Refer to the processing 
details {numref}`__whales` for the specific source used for these missions.
For Jason-1, Jason-2, Jason-3, Envisat, SARAL and CryoSat-2, a specific 
retracking was performed, using the WHALES nadir altimetry retracker 
selected by the CCI Sea State experts. For more details on the WHALES 
retracker, refer to the processing details {numref}`__whales`.

When processing the statistics described below, each satellite pass is first resampled
onto the 1°x1° product grid. When several consecutive 1 Hz SWH measurements from the same satellite pass
are contained within a given grid cell, the median of all these SWH measurements is retained 
as the representative value for the cell and satellite pass. This is why we refer in the 
following to statistics *of median sea surface height*. Each median value is from the same
satellite pass and therefore corresponds to measurements within seconds of each other.

This section describes in detail the specific content of the {{cci_version}} L4 
for Sea State CCI, configured as shown in the table {numref}`l4_content_summary`, 
which can be used to locate appropriate information in this document.

```{table} Summary description of the contents of a CCI Sea State L4 data product
:name: l4_content_summary

| netCDF File Contents | Description                                                                                               |
|----------------------|-----------------------------------------------------------------------------------------------------------|
| **Coordinate variables**  | Information to permit locating data on orthogonal grids, as defined in {numref}`coordinate_variables` |
| **Statistical data record variables** | significant wave height statistics for 1st band altimeter (usually Ku) as defined in {numref}`l4_variables_statistics`   |
| **Global Attributes**  | A collection of required global attributes describing general characteristics of the file, as defined in section {numref}`global_attributes`  |
```


(l4_variables_statistics)=
## L4 statistical data record format specification
The {numref}`table_l4_variables_statistics` provides an overview of the CCI 
Sea State 4 significant wave height statistics data record within a L4 file. In the 
following sections, each variable within the L4 data file is described in detail.

```{table} Summary description of CCI Sea State L4 SWH statistics records
:name: table_l4_variables_statistics

| Variable Name          | Description           | Units  |
|-----------------------|------------------------|--------|
| [swh_mean](__l4_swh_mean) | Mean of median significant wave height values | m |
| [swh_max](__l4_swh_max) | Maximum median significant wave height value  | m |
| [swh_rms](__l4_swh_rms) | RMS of median significant wave height values | m |
| [swh_count](__l4_swh_num) | Number of median significant wave height values | 1 |
| [swh_sum](__l4_swh_sum) | Total of median significant wave height values | m |
| [swh_squared_sum](__l4_swh_squared_sum) | Total of median significant wave height squared values | m2 |
| [swh_log_sum](__l4_swh_log_sum) | Total of median significant wave height log values | m |
| [swh_log_squared_sum](__l4_swh_log_squared_sum) | Total of median significant wave height log squared values | m2 |
| [swh_count_greater_than_0.50](__l4_swh_count_greater_than_0.50) | Number of median significant wave height values greater than 0.5 m  | 1 |
| [swh_count_greater_than_1.00](__l4_swh_count_greater_than_1.00) | Number of median significant wave height values greater than 1.0 m  | 1 |
| [swh_count_greater_than_1.50](__l4_swh_count_greater_than_1.50) | Number of median significant wave height values greater than 1.5 m  | 1 |
| [swh_count_greater_than_2.00](__l4_swh_count_greater_than_2.00) | Number of median significant wave height values greater than 2 m  | 1 |
| [swh_count_greater_than_2.50](__l4_swh_count_greater_than_2.50) | Number of median significant wave height values greater than 2.5 m  | 1 |
| [swh_count_greater_than_3.00](__l4_swh_count_greater_than_3.00) | Number of median significant wave height values greater than 3.0 m  | 1 |
| [swh_count_greater_than_3.50](__l4_swh_count_greater_than_3.50) | Number of median significant wave height values greater than 3.5 m  | 1 |
| [swh_count_greater_than_4.00](__l4_swh_count_greater_than_4.00) | Number of median significant wave height values greater than 4.0 m  | 1 |
| [swh_count_greater_than_5.00](__l4_swh_count_greater_than_5.00) | Number of median significant wave height values greater than 5.0 m  | 1 |
| [swh_count_greater_than_6.00](__l4_swh_count_greater_than_6.00) | Number of median significant wave height values greater than 6.0 m  | 1 |
| [swh_count_greater_than_8.00](__l4_swh_count_greater_than_8.00) | Number of median significant wave height values greater than 8.0 m  | 1 |
| [swh_count_greater_than_10.00](__l4_swh_count_greater_than_10.00) | Number of median significant wave height values greater than 10.0 m  | 1 |
```

(__l4_swh_mean)=
### `swh_mean`

The **mean**, within 1°x1° grid cells, of all the (per cell) median significant wave height from all the satellite
passes within a given month, in meters.

The `swh_mean` variable in a L4 product follows the format shown in table {numref}`l4_swh_mean`.


```{table} CDL example description of **<span style="font-family:courier;">swh_mean</span>** variable
:name: l4_swh_mean

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_mean`     | m (meter) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_mean

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_mean[(,:]'| sed 's/[[:space:]]//'"
```


(__l4_swh_max)=
### `swh_max`

The **maximum**, within 1°x1° grid cells, of all the (per cell) median significant wave height from all the satellite
passes within a given month, in meters.

The `swh_max` variable in a L4 product follows the format shown in table {numref}`l4_swh_max`.


```{table} CDL example description of **<span style="font-family:courier;">swh_max</span>** variable
:name: l4_swh_max

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_max`     | m (meter) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_max

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_max[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_rms)=
### `swh_rms`

The **root mean square**, within 1°x1° grid cells, of all the (per cell) median significant wave height from all the satellite
passes within a given month, in meters.

The `swh_rms` variable in a L4 product follows the format shown in table {numref}`l4_swh_rms`.


```{table} CDL example description of **<span style="font-family:courier;">swh_rms</span>** variable
:name: l4_swh_rms

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_rms`     | m (meter) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_rms

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_rms[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_num)=
### `swh_count`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height from all the satellite
passes within a given month.

The `swh_count` variable in a L4 product follows the format shown in table {numref}`l4_swh_num`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count</span>** variable
:name: l4_swh_num

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_num

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count[(,:]'| sed 's/[[:space:]]//'"
```


(__l4_swh_sum)=
### `swh_sum`

The **sum**, within 1°x1° grid cells, of all the (per cell) median significant wave height from all the satellite
passes within a given month, in meters.

The `swh_sum` variable in a L4 product follows the format shown in table {numref}`l4_swh_sum`.

```{table} CDL example description of **<span style="font-family:courier;">swh_sum</span>** variable
:name: l4_swh_sum

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_sum`     | m (meter) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_sum

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_sum[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_squared_sum)=
### `swh_squared_sum`

The **sum**, within 1°x1° grid cells, of all the (per cell) **squared** median significant wave height from all the satellite
passes within a given month, in square meters.

The `swh_squared_sum` variable in a L4 product follows the format shown in table {numref}`l4_swh_squared_sum`.

```{table} CDL example description of **<span style="font-family:courier;">swh_squared_sum</span>** variable
:name: l4_swh_squared_sum

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_squared_sum`     | $m^2$ (square meter) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_squared_sum

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_squared_sum[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_log_sum)=
### `swh_log_sum`


The **sum**, within 1°x1° grid cells, of all the (per cell) **log** of median significant wave height from all the satellite
passes within a given month, in meters.

The `swh_log_sum` variable in a L4 product follows the format shown in table {numref}`l4_swh_log_sum`.

```{table} CDL example description of **<span style="font-family:courier;">swh_log_sum</span>** variable
:name: l4_swh_log_sum

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_log_sum`     | m (meter) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_log_sum

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_log_sum[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_log_squared_sum)=
### `swh_log_squared_sum`

The **sum**, within 1°x1° grid cells, of all the (per cell) **squared log** of median significant wave height from all the satellite
passes within a given month, in meters.

The `swh_log_squared_sum` variable in a L4 product follows the format shown in table {numref}`l4_swh_log_squared_sum`.

```{table} CDL example description of **<span style="font-family:courier;">swh_log_squared_sum</span>** variable
:name: l4_swh_log_squared_sum

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_log_squared_sum`     | $m^2$ (square meter) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_log_squared_sum

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_log_squared_sum[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_count_greater_than_0.50)=
### `swh_count_greater_than_0.50`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 0.5 meter.
passes within a given month, in meters.

The `swh_count_greater_than_0.50` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_0.50`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_0.50</span>** variable
:name: l4_swh_count_greater_than_0.50

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_0.50`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_0.50

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_0.50[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_count_greater_than_1.00)=
### `swh_count_greater_than_1.00`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 1 meter.
passes within a given month, in meters.

The `swh_count_greater_than_1.00` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_1.00`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_1.00</span>** variable
:name: l4_swh_count_greater_than_1.00

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_1.00`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_1.00

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_1.00[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_count_greater_than_1.50)=
### `swh_count_greater_than_1.50`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 1.5 meters.
passes within a given month, in meters.

The `swh_count_greater_than_1.50` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_1.50`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_1.50</span>** variable
:name: l4_swh_count_greater_than_1.50

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_1.50`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_1.50

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_1.50[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_count_greater_than_2.00)=
### `swh_count_greater_than_2.00`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 2 meter.
passes within a given month, in meters.

The `swh_count_greater_than_2.00` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_2.00`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_2.00</span>** variable
:name: l4_swh_count_greater_than_2.00

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_2.00`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_2.00

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_2.00[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_count_greater_than_2.50)=
### `swh_count_greater_than_2.50`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 2.5 meter.
passes within a given month, in meters.

The `swh_count_greater_than_2.50` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_2.50`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_2.50</span>** variable
:name: l4_swh_count_greater_than_2.50

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_2.50`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_2.50

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_2.50[(,:]'| sed 's/[[:space:]]//'"
```


(__l4_swh_count_greater_than_3.00)=
### `swh_count_greater_than_3.00`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 3 meter.
passes within a given month, in meters.

The `swh_count_greater_than_3.00` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_3.00`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_3.00</span>** variable
:name: l4_swh_count_greater_than_3.00

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_3.00`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_3.00

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_3.00[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_count_greater_than_3.50)=
### `swh_count_greater_than_3.50`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 3.5 meter.
passes within a given month, in meters.

The `swh_count_greater_than_3.50` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_3.50`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_3.50</span>** variable
:name: l4_swh_count_greater_than_3.50

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_3.50`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_3.50

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_3.50[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_count_greater_than_4.00)=
### `swh_count_greater_than_4.00`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 4 meter.
passes within a given month, in meters.

The `swh_count_greater_than_4.00` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_4.00`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_4.00</span>** variable
:name: l4_swh_count_greater_than_4.00

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_4.00`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_4.00

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_4.00[(,:]'| sed 's/[[:space:]]//'"
```


(__l4_swh_count_greater_than_5.00)=
### `swh_count_greater_than_5.00`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 5 meter.
passes within a given month, in meters.

The `swh_count_greater_than_5.00` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_5.00`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_5.00</span>** variable
:name: l4_swh_count_greater_than_5.00

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_5.00`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_5.00

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_5.00[(,:]'| sed 's/[[:space:]]//'"
```


(__l4_swh_count_greater_than_6.00)=
### `swh_count_greater_than_6.00`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 6 meter.
passes within a given month, in meters.

The `swh_count_greater_than_6.00` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_6.00`.

```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_6.00</span>** variable
:name: l4_swh_count_greater_than_6.00

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_6.00`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_6.00

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_6.00[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_count_greater_than_8.00)=
### `swh_count_greater_than_8.00`


The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 8 meter.
passes within a given month, in meters.

The `swh_count_greater_than_8.00` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_8.00`.


```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_8.00</span>** variable
:name: l4_swh_count_greater_than_8.00

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_8.00`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_8.00

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_8.00[(,:]'| sed 's/[[:space:]]//'"
```

(__l4_swh_count_greater_than_10.00)=
### `swh_count_greater_than_10.00`

The **total number**, within 1°x1° grid cells, of all the (per cell) median significant wave height values from all the satellite greater than 10 meter.
passes within a given month, in meters.

The `swh_count_greater_than_10.00` variable in a L4 product follows the format shown in table {numref}`l4_swh_count_greater_than_10.00`.



```{table} CDL example description of **<span style="font-family:courier;">swh_count_greater_than_10.00</span>** variable
:name: l4_swh_count_greater_than_10.00

| **Storage type**  | **Name**  | **Unit** |
|-------------------|-----------|----------|
| float             | `swh_count_greater_than_10.00`     | 1 (count) |
```

```{code-cell}
:tags: [remove-input]
:name: l4_swh_count_greater_than_10.00

!bash -c "ncdump -h ../samples/ESACCI-SEASTATE-L4-SWH-MULTI_1M-202301-fv01.nc | grep $'[ , \t]swh_count_greater_than_10.00[(,:]'| sed 's/[[:space:]]//'"
```



