Skip to content

Commit 64c08c5

Browse files
authored
Merge pull request #9 from eumetsat/iasi-example
Iasi example
2 parents d5dd580 + 538811d commit 64c08c5

File tree

2 files changed

+31
-23
lines changed

2 files changed

+31
-23
lines changed

docs/src/IASI.md

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## IASI
22

3-
The Infrared Atmospheric Sounding Interferometer (IASI) is an instrument on the METOP satellites. It is a hyper-spectral sensor measuring the radiation from the atmosphere and earth in 8461 spectral channels. These measurements are used to derive used to derive a plethora of geophysical variables (e.g. temperature and humidity profiles). This makes IASI a key data source for numerical weather prediction (NWP) and applications in atmospheric chemistry and monitoring of essential climate variables.
3+
The Infrared Atmospheric Sounding Interferometer (IASI) is an instrument on the METOP satellites. It is a hyper-spectral infrared sensor measuring upwelling radiation from a sun-synchronous orbit in 8461 spectral channels (645.0 - 2760.0 cm-1). These measurements are used to derive a plethora of geophysical variables (e.g. temperature and humidity profiles). This makes IASI a key data source for numerical weather prediction (NWP) and applications in atmospheric chemistry and monitoring of essential climate variables.
44
See [IASI Level 1: Product Guide](https://user.eumetsat.int/s3/eup-strapi-media/pdf_iasi_pg_487c765315.pdf) and [IASI Level 2: Product Guide](https://user.eumetsat.int/s3/eup-strapi-media/IASI_Level_2_Product_Guide_8f61a2369f.pdf) for more information.
55

66

@@ -11,7 +11,7 @@ This example is made using the following packages.
1111
[db073c08] GeoMakie v0.7.9
1212
```
1313

14-
The key variable is the "gs1cspect" which contains the radiance spectrum measured by the IASI instrument. The spectrum from a full orbit is almost 2 GB of data. In this example we will just load one data record with observation locations and plot the spectrum of two observations. The spectra are converted from radiances to brightness temperature since this is often most convenient when interpreting the IASI spectra. The cloud cover is also read from the file and included as legends on the plot of the spectra. Cloud cover is essential to understanding the spectra and normally only cloud free observations are assimilated in NWP.
14+
The key variable is "gs1cspect" which contains the radiance spectra measured by IASI. The spectra from a full orbit are almost 2 GB of data. In this example we will just load one data record with observation locations and plot the spectra of two observations. The spectra are converted from radiances to brightness temperature since this is often convenient when interpreting the IASI spectra. The cloud cover in each individual field of view (from AVHRR) is also read from the file and included as legends on the plot of the spectra.
1515

1616
```julia
1717
using MetopDatasets
@@ -205,24 +205,38 @@ end
205205
It is now possible to interactively explore the nearly 100 000 observations from an obit of IASI with the background map giving important context.
206206

207207
## Level 2 Combined Sounding Products
208-
The IASI level 2 products contains derived atmospheric profiles of temperature, water vapour, ozone and trace gasses. The availability of these profiles depend on cloud cover and therefore the number of profiles will vary through out the product. These variables of changing size is padded with a fill values (default to `missing`) to generate an array that fits with the `MetopDataset` interface. This example plots the temperature and water vapour profiles next to a map showing the location of the observation. The example uses `maskingvalue = NaN` for selected variables to avoid `missing` values.
208+
The IASI level 2 products contains derived atmospheric profiles of temperature, water vapour, ozone and trace gases. The availability of these profiles depend on cloud cover and therefore the number of profiles will vary through out the product. These variables of changing size are padded with fill values (default to `missing`) to generate an array that fits with the `MetopDataset` interface. This example plots the temperature and water vapour profiles next to a map showing the location of the observation. The example uses `maskingvalue = NaN` for selected variables to avoid `missing` values. We read the "first guess" variables (fg\_atmospheric\_water\_vapour, fg\_atmospheric\_temperature), because they contain the data from the statistical all-sky retrieval. The 1DVar algorithm that generates the "non-first guess" profiles will be phased out in favor of the statistical retrieval in the future.
209209

210210
```julia
211211
using MetopDatasets
212212
using CairoMakie, GeoMakie
213213

214214
ds = MetopDataset("IASI_SND_02_M03_20250120105357Z_20250120123253Z_N_O_20250120123416Z.nat");
215215

216+
# Select color to plot temperature and humidity profile
217+
selected_color = :red
218+
216219
# Select a single data record
217220
data_record_index = 105
218221

219-
# Select 1 points to plot temperature and humidity profile
220-
selected_point = 84
221-
selected_color = :red
222-
223-
# check that the selected data has retrieval error
224-
error_data_index = ds["error_data_index"][selected_point, data_record_index]
225-
@assert !ismissing(error_data_index)
222+
# Read temperature and humidity profiles;
223+
# we read the profiles from the statistical retrieval with associated quality indicators
224+
temperature, humidity, selected_point = let
225+
temp_var = cfvariable(ds, "fg_atmospheric_temperature", maskingvalue = NaN)
226+
qi_temp_var = cfvariable(ds, "fg_qi_atmospheric_temperature", maskingvalue = NaN)
227+
humidity_var = cfvariable(ds, "fg_atmospheric_water_vapour", maskingvalue = NaN)
228+
qi_humidity_var = cfvariable(ds, "fg_qi_atmospheric_water_vapour", maskingvalue = NaN)
229+
# keep only soundings where the quality indicators are low
230+
# thresholds can be relaxed to increase data yield
231+
# only look at selected data_record_index to save time
232+
good_retrievals = findall(qi_temp_var[:,data_record_index] .< 2
233+
.&& qi_humidity_var[:,data_record_index] .< 4)
234+
# we select the 60th retrieval for plotting
235+
selected_point = good_retrievals[60]
236+
237+
temp_var[:, selected_point, data_record_index],
238+
humidity_var[:, selected_point, data_record_index], selected_point
239+
end
226240

227241
# Read the geolocation of the data record
228242
longitude, latitude = let
@@ -244,14 +258,6 @@ temp_pressure_levels, hum_pressure_levels = let
244258
temp_level, humidity_level
245259
end
246260

247-
# Read temperature and humidity profiles
248-
temperature, humidity = let
249-
temp_var = cfvariable(ds, "atmospheric_temperature", maskingvalue = NaN)
250-
humidity_var = cfvariable(ds, "atmospheric_water_vapour", maskingvalue = NaN)
251-
252-
temp_var[:, selected_point, data_record_index], humidity_var[:, selected_point, data_record_index]
253-
end
254-
255261
# Plot figure
256262
fig = let
257263

@@ -274,13 +280,14 @@ fig = let
274280
lines!(ax, GeoMakie.coastlines())
275281

276282
# Plot the temperature profile
277-
y_limits = (-50.,1050.0)
283+
y_limits = (0.001,1900.0)
278284

279285
ax2 = Axis(fig[2, 1],
280286
title = "Temperature profile",
281287
ylabel = "Pressure (hPa)",
282288
xlabel = "(K)", yreversed = true,
283-
limits = (nothing, y_limits))
289+
limits = (nothing, y_limits),
290+
yscale= log10)
284291

285292
lines!(ax2, temperature, temp_pressure_levels/100, color = selected_color)
286293

@@ -289,13 +296,14 @@ fig = let
289296
title = "Water vapour profile",
290297
ylabel = "Pressure (hPa)",
291298
xlabel = "(kg/kg)", yreversed = true,
292-
limits = (nothing, y_limits))
299+
limits = (nothing, y_limits),
300+
yscale = log10)
293301

294302
lines!(ax3, humidity, hum_pressure_levels/100, color = selected_color)
295-
hideydecorations!(ax3)
303+
hideydecorations!(ax3, grid=false)
296304

297305
fig
298306
end
299307
```
300308
![IASI L2 profile](IASI_L2_profile.png)
301-
The top plot shows a row of observations west of the west African coast. One observation have been marked with a colored X. The temperature and water vapour profile of the observation is shown below.
309+
The top plot shows a row of observations west of the west African coast. One observation has been marked with a colored X. The corresponding temperature and water vapour profile of the observation are shown below.

docs/src/IASI_L2_profile.png

149 KB
Loading

0 commit comments

Comments
 (0)