Skip to content

Commit a1b5aa5

Browse files
committed
Add HIRS documentation and tests.
1 parent 0430742 commit a1b5aa5

File tree

6 files changed

+94
-5
lines changed

6 files changed

+94
-5
lines changed

docs/src/ATOVS.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,56 @@ end
5858
The plot shows the radiance for the AMSU-A channel 2 (31.4 GHz) observed during an orbit.
5959

6060
## HIRS
61-
To be done
61+
The High Resolution Infrared Sounder (HIRS) is an instrument on the METOP satellites. It is a 20 channel infrared sounder and one of the three Advanced TIROS Operational Sounder (ATOVS) sensors.
62+
63+
The level 1B HIRS files contain the radiance of the 19 channels and the reflectance for channel 20. See the [HIRS Level 1B product page](https://data.eumetsat.int/product/EO:EUM:DAT:MULT:HIRSL1) for more information.
64+
This example shows how we plot the radiance from channel 7 on a map.
65+
66+
This example is made using the following packages.
67+
```
68+
[13f3f980] CairoMakie v0.15.6
69+
[db073c08] GeoMakie v0.7.15
70+
```
71+
72+
```julia
73+
using MetopDatasets
74+
using CairoMakie, GeoMakie, Statistics
75+
76+
# Open the dataset.
77+
path = "HIRS_xxx_1B_M01_20160720074253Z_20160720092153Z_N_O_20160720083048Z.nat"
78+
ds = MetopDataset(path, maskingvalue=NaN);
79+
80+
# read location
81+
latitude = ds["earth_location"][1,:,:]
82+
longitude = ds["earth_location"][2,:,:]
83+
84+
# read radiance
85+
radiance_of_band = ds["digital_a_rad"][7,:,:] # Channel 7
86+
87+
radiance_q05 = quantile(radiance_of_band[.!isnan.(radiance_of_band)],0.05)
88+
radiance_q95 = quantile(radiance_of_band[.!isnan.(radiance_of_band)],0.95)
89+
90+
fig = let
91+
# Create figure and axis
92+
fig = Figure()
93+
ax = GeoAxis(fig[1, 1],
94+
title = "HIRS Channel 7",
95+
xlabel = "longitude",
96+
ylabel = "latitude")
97+
98+
# plot data with color map
99+
scatter!(ax, longitude[:], latitude[:],
100+
color = radiance_of_band[:], colorrange = (radiance_q05,radiance_q95), markersize = 2)
101+
102+
# Add colorbar
103+
Colorbar(fig[1,2], colorrange = (radiance_q05,radiance_q95))
104+
105+
# Add coastlines
106+
lines!(ax, GeoMakie.coastlines())
107+
fig
108+
end
109+
```
110+
![HIRS channel 7](HIRS_plot.png)
62111

63112
## MHS
64113
The Microwave Humidity Sounder (MHS) is an instrument on the METOP satellites. It measures the earth using 5 microwave channels sensitive to surface temperatures, emissivities, and atmospheric humidity. MHS is one of the three Advanced TIROS Operational Sounder (ATOVS) sensors.

docs/src/HIRS_plot.png

298 KB
Loading

docs/src/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,23 +339,27 @@ end
339339
```
340340

341341
## Supported formats
342+
- AMSU-A Level 1B
342343
- ASCAT Level 1B
343344
- ASCAT Level 2 Soil Moisture
345+
- HIRS Level 1B
344346
- IASI Level 1C
345347
- IASI Level 2 Combined Sounding
346348
- MHS Level 1B
347349

348350
### Formats not yet supported
349-
- AMSU-A Level 1B
350351
- AVHRR Level 1B
351352
- GOME-2 Level 1B
352-
- HIRS Level 1B
353+
- IASI Level 1C Principal Component Scores
353354

354355
### Reference documents
355356
- [EPS Generic Product Format Specification](https://user.eumetsat.int/s3/eup-strapi-media/pdf_gen_pfs_13e3f0feb7.pdf)
357+
- [AMSU-A Level 1 Product Format Specification](https://user.eumetsat.int/s3/eup-strapi-media/pdf_amsu_a_l1_pfs_c89fa9d9ea.pdf)
356358
- [ASCAT Level 1: Product Format Specification](https://user.eumetsat.int/s3/eup-strapi-media/ASCAT_Level_1_Product_Format_V12_Annexe_50fe72d349.pdf)
357359
- [ASCAT Level 2 Soil Moisture: Product Format Specification](https://user.eumetsat.int/s3/eup-strapi-media/pdf_ten_0343_eps_ascatl2_pfs_f509981295.pdf)
360+
- [HIRS Level 1 Product Format Specification](https://user.eumetsat.int/s3/eup-strapi-media/pdf_ten_97230_eps_hirs4l1_pfs_0ddaefcb74.pdf)
358361
- [IASI Level 1 Product Format Specification](https://user.eumetsat.int/s3/eup-strapi-media/pdf_iasi_level_1_pfs_2105bc9ccf.pdf)
362+
- [IASI Level 2: Product Format Specification](https://user.eumetsat.int/s3/eup-strapi-media/pdf_ten_980760_eps_iasi_l2_f9511c26d2.pdf)
359363
- [MHS Level 1 Product Format Specification](https://user.eumetsat.int/s3/eup-strapi-media/pdf_ten_97229_eps_mhs_pfs_2069b45efc.pdf)
360364

361365

test/AMSU_A.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2025 EUMETSAT
2+
# License: MIT
3+
14
using MetopDatasets, Test
25
using Dates
36

test/HIRS.jl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) 2025 EUMETSAT
2+
# License: MIT
3+
4+
using MetopDatasets, Test
5+
using Dates
6+
7+
test_data_artifact = MetopDatasets.get_test_data_artifact()
8+
9+
HIRS_test_file = joinpath(
10+
test_data_artifact, "HIRS_xxx_1B_M01_20241104213353Z_cropped_10.nat")
11+
12+
@testset "HIRS record type" begin
13+
@test MetopDatasets.native_sizeof(MetopDatasets.HIRS_XXX_1B_V10) == 6884
14+
@test MetopDatasets.fixed_size(MetopDatasets.HIRS_XXX_1B_V10)
15+
@test MetopDatasets.HIRS_XXX_1B_V10 <: MetopDatasets.ATOVS_1B
16+
end
17+
18+
@testset "HIRS dataset" begin
19+
ds = MetopDataset(HIRS_test_file)
20+
21+
@test all(-90 .< ds["earth_location"][1, :, :] .< 90)
22+
@test all(-180 .< ds["earth_location"][2, :, :] .< 180)
23+
24+
@test "digital_a_rad" in keys(ds)
25+
@test "digital_a_rad_header" in keys(ds)
26+
27+
@test size(ds["digital_a_rad"]) == (20, 56, 10)
28+
@test size(ds["digital_a_rad_header"]) == (56, 10)
29+
end

test/runtests.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ end
3636
include("AMSU_A.jl")
3737
end
3838

39+
@safetestset "HIRS" begin
40+
include("HIRS.jl")
41+
end
42+
3943
@safetestset "Main product header" begin
4044
include("main_product_header.jl")
4145
end
@@ -52,8 +56,6 @@ end
5256
include("conversions.jl")
5357
end
5458

55-
Aqua.test_all(MetopDatasets)
56-
5759
@safetestset "Extended tests" begin
5860
if isdir("testData")
5961
@info "Running extended tests"
@@ -62,3 +64,5 @@ Aqua.test_all(MetopDatasets)
6264
@info "Skipping extended tests"
6365
end
6466
end
67+
68+
Aqua.test_all(MetopDatasets)

0 commit comments

Comments
 (0)