CMP22, CGR4 and KT-19#
The following example demonstrates the use of broadband irradiance data collected during ACLOUD and AFLUX. The dataset includes solar and terrestrial broadband irradiance and nadir brightness temperature. The full dataset is available on PANGAEA for ACLOUD and AFLUX.
Broadband irradiance (CMP22 pyranometer and CGR4 pyrgeometer)#
Upward and downward broadband irradiances are measured by pairs of CMP 22 pyranometers and CGR4 pyrgeometers, covering the solar (0.2–3.6 µm) and thermal-infrared (4.5–42 µm) wavelength range, respectively. Data is sampled with a frequency of 20 Hz. In stationary operation, the uncertainty of the sensors is less than 3 %.
Nadir brightness temperature (KT-19)#
Surface brightness temperature was measured by a nadir-looking Kelvin infrared radiation Thermometer (KT-19). These measurements were converted into surface temperature values assuming an emissivity of one. This is justified due to the small impact of atmospheric absorption in the wavelength range of 9.6 to 11.5 µm for which the KT-19 is sensitive. With a sampling frequency of 20 Hz, the KT-19 resolves small scales of the surface temperature heterogeneities, such as observed in the case of leads in sea ice.
More information about the dataset can be found in Ehrlich et al. 2019.
Data access#
To analyse the data they first have to be loaded by importing the (AC)³airborne meta data catalogue. To do so the ac3airborne package has to be installed. More information on how to do that and about the catalog can be found here.
import os
from dotenv import load_dotenv
load_dotenv()
ac3cloud_username = os.environ['AC3_USER']
ac3cloud_password = os.environ['AC3_PASSWORD']
credentials = dict(user=ac3cloud_username, password=ac3cloud_password)
# local caching
kwds = {'simplecache': dict(
cache_storage=os.environ['INTAKE_CACHE'],
same_names=True
)}
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[1], line 2
1 import os
----> 2 from dotenv import load_dotenv
4 load_dotenv()
6 ac3cloud_username = os.environ['AC3_USER']
ModuleNotFoundError: No module named 'dotenv'
Get data#
import ac3airborne
We first want to list the available research flights:
cat = ac3airborne.get_intake_catalog()
datasets = []
for campaign in ['ACLOUD', 'AFLUX']:
datasets.extend(list(cat[campaign]['P5']['BROADBAND_IRRADIANCE']))
datasets
['ACLOUD_P5_RF04',
'ACLOUD_P5_RF05',
'ACLOUD_P5_RF06',
'ACLOUD_P5_RF07',
'ACLOUD_P5_RF08',
'ACLOUD_P5_RF10',
'ACLOUD_P5_RF11',
'ACLOUD_P5_RF13',
'ACLOUD_P5_RF14',
'ACLOUD_P5_RF15',
'ACLOUD_P5_RF16',
'ACLOUD_P5_RF17',
'ACLOUD_P5_RF18',
'ACLOUD_P5_RF19',
'ACLOUD_P5_RF20',
'ACLOUD_P5_RF21',
'ACLOUD_P5_RF22',
'ACLOUD_P5_RF23',
'ACLOUD_P5_RF25',
'AFLUX_P5_RF02',
'AFLUX_P5_RF03',
'AFLUX_P5_RF04',
'AFLUX_P5_RF05',
'AFLUX_P5_RF06',
'AFLUX_P5_RF07',
'AFLUX_P5_RF08',
'AFLUX_P5_RF09',
'AFLUX_P5_RF10',
'AFLUX_P5_RF11',
'AFLUX_P5_RF12',
'AFLUX_P5_RF13',
'AFLUX_P5_RF14',
'AFLUX_P5_RF15']
Then we choose to load the broadband irradiance dataset of a specific flight. In this case we will look at the data of the third research fligth (RF03
) of the AFLUX campaign.
Note
Have a look at the attributes of the xarray dataset ds_broad_irr
for all relevant information on the dataset, such as author, contact, or citation information.
ds_broad_irr = cat['AFLUX']['P5']['BROADBAND_IRRADIANCE']['AFLUX_P5_RF03'].to_dask()
import xarray as xr
xr.set_options(display_expand_attrs=False)
ds_broad_irr
<xarray.Dataset> Dimensions: (Time: 334437) Dimensions without coordinates: Time Data variables: (12/14) time (Time) datetime64[ns] ... Lon (Time) float32 ... Lat (Time) float32 ... Alt (Time) float32 ... Solar_F_dw (Time) float32 ... Solar_F_up (Time) float32 ... ... ... KT19 (Time) float32 ... Attitude_Flag (Time) int8 ... Amb_T_Flag (Time) int8 ... Airc_Stab_flag (Time) int8 ... Pyrano_Icing_Flag (Time) int8 ... Pyrgeo_Icing_Flag (Time) int8 ... Attributes: (1)
- Time: 334437
- time(Time)datetime64[ns]...
- description :
- Seconds of day (UTC)
[334437 values with dtype=datetime64[ns]]
- Lon(Time)float32...
- description :
- Longitude
- units :
- Degrees East
[334437 values with dtype=float32]
- Lat(Time)float32...
- description :
- Latitude
- units :
- Degrees North
[334437 values with dtype=float32]
- Alt(Time)float32...
- description :
- Flight altitude
- units :
- m
[334437 values with dtype=float32]
- Solar_F_dw(Time)float32...
- description :
- Downward solar irradiance measured by pyranometer CMP22.
- units :
- W m-2
[334437 values with dtype=float32]
- Solar_F_up(Time)float32...
- description :
- Upward solar irradiance measured by pyranometer CMP22.
- units :
- W m-2
[334437 values with dtype=float32]
- Terr_F_dw(Time)float32...
- description :
- Downward terrestrial irradiance measured by pyrgeometer CGR4.
- units :
- W m-2
[334437 values with dtype=float32]
- Terr_F_up(Time)float32...
- description :
- Upward terrestrial irradiance measured by pyrgeometer CGR4.
- units :
- W m-2
[334437 values with dtype=float32]
- KT19(Time)float32...
- description :
- IR Brightness Temperature, nadir direction, measured by Heitronics KT19.85II
- units :
- K
[334437 values with dtype=float32]
- Attitude_Flag(Time)int8...
- description :
- Aircraft roll and pitch angles larger than +- 5 degrees are flagged (1). Flagged irradiance data must be interpreted with care or discarded.
- units :
[334437 values with dtype=int8]
- Amb_T_Flag(Time)int8...
- description :
- Pyranometers and pyrgeometer can be affected by rapid changes in ambient temperature (details general file header). These time periods are flagged (1) and need to be interpreted with care.
- units :
[334437 values with dtype=int8]
- Airc_Stab_flag(Time)int8...
- description :
- The aircraft tail can cover the direct downward irradiance for certain aircraft attitude and solar position combinations (details general file header). Time periods with those critical combinations are flagged (1).
- units :
[334437 values with dtype=int8]
- Pyrano_Icing_Flag(Time)int8...
- description :
- Obvious influence on the solar irradiance is flagged (1). During unflagged times, icing influence is unsuspicious, but can not be excluded by certainty (0).
- units :
[334437 values with dtype=int8]
- Pyrgeo_Icing_Flag(Time)int8...
- description :
- Obvious icing influence on the terrestrial irradiance is flagged (1). During unflagged times, icing influence is unsuspicious, but can not be excluded by certainty (0).
- units :
[334437 values with dtype=int8]
- description :
- ############################### General Information: ############################### Airborne measurements of broadband irradiance during the AFLUX campaign: Svalbard, March to April 2019 PI: Johannes Stapf (johannes.stapf@uni-leipzig.de) Day: 2019-03-21 Involved Aircraft : Polar 5 ############################### Instruments: Kipp&Zonen CMP22 pyranometer: solar irradiance (0.2 - 3.6 um) in W m-2 Kipp&Zonen CGR4 pyrgeometer: terrestrial irradiance (4.5 - 42.0 um) in W m-2 Heitronics KT19.85II: nadir brightness temperature: (9.6 - 11.5 um) in K ############################### Temporal Resolution: 20 Hz ############################### Applied Corrections: Downward solar irradiance corrected for aircraft attitude, following the approach by Bannehr and Schwiesow (1993) and Boers et al. (1998), if irradiance is dominated by direct solar radiation. Irradiance measurements corrected for instrument inertia time following the approach by Ehrlich and Wendisch (2015) ############################### Applied Flags: Aircraft attitude flag: Aircraft roll and pitch angles larger than |5| degrees are flagged (1). These irradiance data must be interpreted with care or discarded. Ambient temperature change rate flag: Pyranometers and pyrgeometer can be affected by rapid changes in ambient temperature due to different window (glass dome), body, and sensor temperatures (e.g. zero offset type B Kipp and Zonen) and Albrecht and Cox (1977) (https://doi.org/10.1175/1520-0450(1977)016<0190:PFIPP>2.0.CO;2). These flagged irradiances (1) need to be interpreted with care. Based on the one minute backward running mean of the abosolute, smoothed air temperature gradient (> 0.5 K/min). Aircraft stabilizer flag: While flying in the opposite direction of the sun (aircraft yaw angle (+- 180 degrees) == solar azimuth angle (+- 2 degrees)) and solar zenith angles plus aircraft pitch angle (nose down positive) larger than 75 degrees, the aircraft vertical stabilizer (at the tail) covers the direct downward irradiance. Time periods with those critical angles are flagged (1) and need to be interpreted with care (short dips in downward irradiance). Icing Flags: Pyranometers: Obvious icing influence on solar irradiance is flagged (1). During unflagged times, icing influence is unsuspicious, but can not be excluded by certainty (0). Exposed pyranometer glass dome susceptible to icing. Pyrgeometers: Obvious icing influence on terrestrial irradiance is flagged (1). During unflagged times, icing influence is unsuspicious, but can not be excluded by certainty (0). Pyrgeometers were found iced less frequently (flat window). ############################## List of parameters: Time seconds of day (UTC): "time" Latitude (Degree): "Lat" Longitude (Degree): "Lon" Flight Altitude (m): "Alt" Solar downward irradiance (W m-2): "Solar_F_dw" Solar upward irradiance (W m-2): "Solar_F_up" Terrestrial downward irradiance (W m-2): "Terr_F_dw" Terrestrial upward irradiance (W m-2): "Terr_F_up" Nadir Brightness Temperature (K): "KT19" Attitude Flag: "Attitude_Flag" Ambient Temp Flag: "Amb_T_Flag" Aircraft Stabilizer flag: "Airc_Stab_flag" Icing Flag: "Pyrano_Icing_Flag" (solar radiation) Icing Flag: "Pyrgeo_Icing_Flag" (terrestrial radiation) Further details in the variable attributes. ###############################
The dataset ds_broad_irr
includes downward and upward, solar and terrestrial irradiance (Solar_F_dw
, Solar_F_up
, Terr_F_dw
and Terr_F_up
) and IR brightness temperature in nadir direction (KT19
). There are also quality flags where data must be interpreted with care or discarded.
Note
Please check the attributes of the xarray dataset ds_broad_irr
for the meaning of the data flags.
For some reason, the time variable is not set as a coordinate in the dataset, so we should set it:
ds_broad_irr = ds_broad_irr.assign_coords({"Time": ("Time", ds_broad_irr.time.data)})
ds_broad_irr
<xarray.Dataset> Dimensions: (Time: 334437) Coordinates: * Time (Time) datetime64[ns] 2019-03-21T09:52:10.050781250 ..... Data variables: (12/14) time (Time) datetime64[ns] 2019-03-21T09:52:10.050781250 ..... Lon (Time) float32 ... Lat (Time) float32 ... Alt (Time) float32 ... Solar_F_dw (Time) float32 ... Solar_F_up (Time) float32 ... ... ... KT19 (Time) float32 ... Attitude_Flag (Time) int8 ... Amb_T_Flag (Time) int8 ... Airc_Stab_flag (Time) int8 ... Pyrano_Icing_Flag (Time) int8 ... Pyrgeo_Icing_Flag (Time) int8 ... Attributes: (1)
- Time: 334437
- Time(Time)datetime64[ns]2019-03-21T09:52:10.050781250 .....
array(['2019-03-21T09:52:10.050781250', '2019-03-21T09:52:10.101562500', '2019-03-21T09:52:10.148437500', ..., '2019-03-21T14:30:51.851562500', '2019-03-21T14:30:51.898437500', '2019-03-21T14:30:51.949218750'], dtype='datetime64[ns]')
- time(Time)datetime64[ns]2019-03-21T09:52:10.050781250 .....
- description :
- Seconds of day (UTC)
array(['2019-03-21T09:52:10.050781250', '2019-03-21T09:52:10.101562500', '2019-03-21T09:52:10.148437500', ..., '2019-03-21T14:30:51.851562500', '2019-03-21T14:30:51.898437500', '2019-03-21T14:30:51.949218750'], dtype='datetime64[ns]')
- Lon(Time)float32...
- description :
- Longitude
- units :
- Degrees East
[334437 values with dtype=float32]
- Lat(Time)float32...
- description :
- Latitude
- units :
- Degrees North
[334437 values with dtype=float32]
- Alt(Time)float32...
- description :
- Flight altitude
- units :
- m
[334437 values with dtype=float32]
- Solar_F_dw(Time)float32...
- description :
- Downward solar irradiance measured by pyranometer CMP22.
- units :
- W m-2
[334437 values with dtype=float32]
- Solar_F_up(Time)float32...
- description :
- Upward solar irradiance measured by pyranometer CMP22.
- units :
- W m-2
[334437 values with dtype=float32]
- Terr_F_dw(Time)float32...
- description :
- Downward terrestrial irradiance measured by pyrgeometer CGR4.
- units :
- W m-2
[334437 values with dtype=float32]
- Terr_F_up(Time)float32...
- description :
- Upward terrestrial irradiance measured by pyrgeometer CGR4.
- units :
- W m-2
[334437 values with dtype=float32]
- KT19(Time)float32...
- description :
- IR Brightness Temperature, nadir direction, measured by Heitronics KT19.85II
- units :
- K
[334437 values with dtype=float32]
- Attitude_Flag(Time)int8...
- description :
- Aircraft roll and pitch angles larger than +- 5 degrees are flagged (1). Flagged irradiance data must be interpreted with care or discarded.
- units :
[334437 values with dtype=int8]
- Amb_T_Flag(Time)int8...
- description :
- Pyranometers and pyrgeometer can be affected by rapid changes in ambient temperature (details general file header). These time periods are flagged (1) and need to be interpreted with care.
- units :
[334437 values with dtype=int8]
- Airc_Stab_flag(Time)int8...
- description :
- The aircraft tail can cover the direct downward irradiance for certain aircraft attitude and solar position combinations (details general file header). Time periods with those critical combinations are flagged (1).
- units :
[334437 values with dtype=int8]
- Pyrano_Icing_Flag(Time)int8...
- description :
- Obvious influence on the solar irradiance is flagged (1). During unflagged times, icing influence is unsuspicious, but can not be excluded by certainty (0).
- units :
[334437 values with dtype=int8]
- Pyrgeo_Icing_Flag(Time)int8...
- description :
- Obvious icing influence on the terrestrial irradiance is flagged (1). During unflagged times, icing influence is unsuspicious, but can not be excluded by certainty (0).
- units :
[334437 values with dtype=int8]
- description :
- ############################### General Information: ############################### Airborne measurements of broadband irradiance during the AFLUX campaign: Svalbard, March to April 2019 PI: Johannes Stapf (johannes.stapf@uni-leipzig.de) Day: 2019-03-21 Involved Aircraft : Polar 5 ############################### Instruments: Kipp&Zonen CMP22 pyranometer: solar irradiance (0.2 - 3.6 um) in W m-2 Kipp&Zonen CGR4 pyrgeometer: terrestrial irradiance (4.5 - 42.0 um) in W m-2 Heitronics KT19.85II: nadir brightness temperature: (9.6 - 11.5 um) in K ############################### Temporal Resolution: 20 Hz ############################### Applied Corrections: Downward solar irradiance corrected for aircraft attitude, following the approach by Bannehr and Schwiesow (1993) and Boers et al. (1998), if irradiance is dominated by direct solar radiation. Irradiance measurements corrected for instrument inertia time following the approach by Ehrlich and Wendisch (2015) ############################### Applied Flags: Aircraft attitude flag: Aircraft roll and pitch angles larger than |5| degrees are flagged (1). These irradiance data must be interpreted with care or discarded. Ambient temperature change rate flag: Pyranometers and pyrgeometer can be affected by rapid changes in ambient temperature due to different window (glass dome), body, and sensor temperatures (e.g. zero offset type B Kipp and Zonen) and Albrecht and Cox (1977) (https://doi.org/10.1175/1520-0450(1977)016<0190:PFIPP>2.0.CO;2). These flagged irradiances (1) need to be interpreted with care. Based on the one minute backward running mean of the abosolute, smoothed air temperature gradient (> 0.5 K/min). Aircraft stabilizer flag: While flying in the opposite direction of the sun (aircraft yaw angle (+- 180 degrees) == solar azimuth angle (+- 2 degrees)) and solar zenith angles plus aircraft pitch angle (nose down positive) larger than 75 degrees, the aircraft vertical stabilizer (at the tail) covers the direct downward irradiance. Time periods with those critical angles are flagged (1) and need to be interpreted with care (short dips in downward irradiance). Icing Flags: Pyranometers: Obvious icing influence on solar irradiance is flagged (1). During unflagged times, icing influence is unsuspicious, but can not be excluded by certainty (0). Exposed pyranometer glass dome susceptible to icing. Pyrgeometers: Obvious icing influence on terrestrial irradiance is flagged (1). During unflagged times, icing influence is unsuspicious, but can not be excluded by certainty (0). Pyrgeometers were found iced less frequently (flat window). ############################## List of parameters: Time seconds of day (UTC): "time" Latitude (Degree): "Lat" Longitude (Degree): "Lon" Flight Altitude (m): "Alt" Solar downward irradiance (W m-2): "Solar_F_dw" Solar upward irradiance (W m-2): "Solar_F_up" Terrestrial downward irradiance (W m-2): "Terr_F_dw" Terrestrial upward irradiance (W m-2): "Terr_F_up" Nadir Brightness Temperature (K): "KT19" Attitude Flag: "Attitude_Flag" Ambient Temp Flag: "Amb_T_Flag" Aircraft Stabilizer flag: "Airc_Stab_flag" Icing Flag: "Pyrano_Icing_Flag" (solar radiation) Icing Flag: "Pyrgeo_Icing_Flag" (terrestrial radiation) Further details in the variable attributes. ###############################
Load Polar 5 flight phase information¶#
Polar 5 flights are divided into segments to easily access start and end times of flight patterns. For more information have a look at the respective github repository.
At first we want to load the flight segments of (AC)³airborne
meta = ac3airborne.get_flight_segments()
In this example we want to look at AFLUX_P5_RF03
.
flight = meta['AFLUX']['P5']['AFLUX_P5_RF03']
We do not want to look into the data of the whole flight. Instead we want to select a specific portion of the flight, for example a high_level
leg. In order to simplify things we can import the module flightphase
from the ac3airborne.tools
.
from ac3airborne.tools import flightphase as fp
We can now select only the high_level
legs and show a list of the available legs of this kind.
flight_query = fp.FlightPhaseFile(flight)
queried = flight_query.selectKind(['high_level'])
queried
[{'dropsondes': [],
'end': datetime.datetime(2019, 3, 21, 10, 44, 51),
'irregularities': [],
'kinds': ['high_level'],
'levels': [9500],
'name': 'high level 1',
'segment_id': 'AFLUX_P5_RF03_hl01',
'start': datetime.datetime(2019, 3, 21, 10, 5, 48)},
{'dropsondes': [],
'end': datetime.datetime(2019, 3, 21, 12, 53, 41),
'irregularities': [],
'kinds': ['high_level'],
'levels': [9500],
'name': 'high level 2',
'segment_id': 'AFLUX_P5_RF03_hl02',
'start': datetime.datetime(2019, 3, 21, 12, 44, 57)},
{'dropsondes': [],
'end': datetime.datetime(2019, 3, 21, 14, 6, 37),
'irregularities': [],
'kinds': ['high_level'],
'levels': [9500],
'name': 'high level 3',
'segment_id': 'AFLUX_P5_RF03_hl03',
'start': datetime.datetime(2019, 3, 21, 13, 35, 32)}]
We decide to select a specific element of the array:
queried[1]
{'dropsondes': [],
'end': datetime.datetime(2019, 3, 21, 12, 53, 41),
'irregularities': [],
'kinds': ['high_level'],
'levels': [9500],
'name': 'high level 2',
'segment_id': 'AFLUX_P5_RF03_hl02',
'start': datetime.datetime(2019, 3, 21, 12, 44, 57)}
We will use the start and end time later in order to select the data for the analysis.
start = queried[1]['start']
end = queried[1]['end']
Read the GPS information#
We now want to read the GPS information, because we want to locate the flight segment and visualize it in a plot:
cat2 = ac3airborne.get_intake_catalog()
ds_gps = cat2['AFLUX']['P5']['GPS_INS']['AFLUX_P5_RF03'].to_dask()
ds_gps
<xarray.Dataset> Dimensions: (time: 18037) Coordinates: * time (time) datetime64[ns] 2019-03-21T09:36:00 ... 2019-03-21T14:37:00 Data variables: alt (time) float64 nan 26.56 26.55 26.53 26.55 ... 26.11 26.11 26.1 nan gs (time) float64 nan 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 nan lat (time) float64 nan 78.25 78.25 78.25 ... 78.25 78.25 78.25 nan lon (time) float64 nan 15.5 15.5 15.5 15.5 ... 15.5 15.5 15.5 15.5 nan vs (time) float64 nan 0.0 -0.0 0.0 0.0 0.0 ... -0.0 -0.1 0.0 0.0 nan pitch (time) float64 10.94 10.94 10.95 10.94 ... 10.47 10.47 10.47 10.47 roll (time) float64 0.14 0.14 0.14 0.14 0.14 ... 0.1 0.11 0.09 0.1 0.1 heading (time) float64 0.0 0.0 0.0 0.0 0.0 ... 148.7 148.7 148.7 148.7 Attributes: (15)
- time: 18037
- time(time)datetime64[ns]2019-03-21T09:36:00 ... 2019-03-...
- standard_name :
- time
- long_name :
- time in seconds since epoch
array(['2019-03-21T09:36:00.000000000', '2019-03-21T09:36:01.000000000', '2019-03-21T09:36:02.000000000', ..., '2019-03-21T14:36:58.000000000', '2019-03-21T14:36:59.000000000', '2019-03-21T14:37:00.000000000'], dtype='datetime64[ns]')
- alt(time)float64...
- standard_name :
- height_above_reference_ellipsoid
- long_name :
- WGS84 datum/elliptical height
- units :
- m
array([ nan, 26.56, 26.55, ..., 26.11, 26.1 , nan])
- gs(time)float64...
- standard_name :
- platform_speed_wrt_ground
- long_name :
- groundspeed of platform
- units :
- kts
array([nan, 0., 0., ..., 0., 0., nan])
- lat(time)float64...
- standard_name :
- latitude
- long_name :
- WGS84 datum/latitude
- units :
- degrees_north
array([ nan, 78.245897, 78.245897, ..., 78.245875, 78.245875, nan])
- lon(time)float64...
- standard_name :
- longitude
- long_name :
- WGS84 datum/longitude
- units :
- degrees_east
array([ nan, 15.50175 , 15.50175 , ..., 15.501863, 15.501863, nan])
- vs(time)float64...
- standard_name :
- platform_vertical_speed
- long_name :
- vertical speed
- units :
- m/s
array([nan, 0., -0., ..., 0., 0., nan])
- pitch(time)float64...
- standard_name :
- platform_pitch_fore_up
- long_name :
- pitch angle of platform
- units :
- degrees
array([10.94, 10.94, 10.95, ..., 10.47, 10.47, 10.47])
- roll(time)float64...
- standard_name :
- platform_roll_starboard_down
- long_name :
- roll angle of platform
- units :
- degrees
array([0.14, 0.14, 0.14, ..., 0.09, 0.1 , 0.1 ])
- heading(time)float64...
- standard_name :
- platform_yaw_fore_starboard
- long_name :
- true heading
- units :
- degrees
array([ 0. , 0. , 0. , ..., 148.7 , 148.71, 148.7 ])
- title :
- P5 position and attitude data
- description :
- 1 Hz subset based on GPS1 and INS data processed by AWI engineers
- instruments :
- GPS1 and INS
- version :
- 1.1
- institution :
- Alfred-Wegener-Institut Helmholtz-Zentrum für Polar- und Meeresforschung
- author :
- Dr. Mario Mech
- contact :
- mario.mech@uni-koeln.de, martin.gehrmann@awi.de
- source :
- DSHIP excerpt
- convention :
- CF-1.8
- featureType :
- trajectory
- mission :
- AFLUX
- platform :
- P5
- flight_number :
- RF03
- history :
- acquired by P5 during AFLUX campaign, quality checked by AWI and uploaded to DSHIP database, extracted and reformated by author
- created :
- 2022-05-25
Plots#
Plot the fligt segment#
Now we can plot both the whole flight and the flight segment, so that we can show where the measurments have taken place before we plot them.
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeature
plt.style.use("../../mplstyle/book")
proj = ccrs.NorthPolarStereo()
extent = (-5.0, 24.0, 78.0, 83.0)
fig = plt.figure(figsize=(8, 8))
ax = plt.axes(projection=proj)
ax.set_extent(extent)
ax.add_feature(cfeature.OCEAN)
ax.add_feature(cfeature.LAND)
ax.gridlines()
ax.coastlines()
nya_lat = 78.924444
nya_lon = 11.928611
ax.plot(nya_lon, nya_lat, 'ro', transform=ccrs.PlateCarree())
ax.text(nya_lon, nya_lat+0.05, 'Ny-Ålesund', transform=ccrs.PlateCarree())
line_all = ax.plot(ds_gps.lon, ds_gps.lat, transform=ccrs.PlateCarree())
line = ax.plot(ds_gps.lon.sel(time=slice(start, end)),
ds_gps.lat.sel(time=slice(start, end)),
transform=ccrs.PlateCarree())
plt.show()
Plot the data#
We can now select the data and plot it.
time_of_segment = ds_broad_irr.time.sel(Time = slice(start, end))
Solar_F_dw = ds_broad_irr.Solar_F_dw.sel(Time = slice(start, end))
Solar_F_up = ds_broad_irr.Solar_F_up.sel(Time = slice(start, end))
Terr_F_dw = ds_broad_irr.Terr_F_dw.sel(Time = slice(start, end))
Terr_F_up = ds_broad_irr.Terr_F_up.sel(Time = slice(start, end))
KT19 = ds_broad_irr.KT19.sel(Time = slice(start, end))
We want to add also some information about ice coverage:
ds_sea_ice = cat['AFLUX']['P5']['AMSR2_SIC']['AFLUX_P5_RF03'].to_dask().sel(time = slice(start, end))
import matplotlib.dates as mdates
from matplotlib import cm
import numpy as np
import warnings
warnings.filterwarnings("ignore")
fig, (ax1, ax2, ax3, ax4) = plt.subplots(4, 1, sharex=True, gridspec_kw=dict(height_ratios=(1, 1, 1, 0.1)))
kwargs = dict(s=10, linewidths=0)
colors = cm.get_cmap('viridis', 5).colors
ax1.scatter(time_of_segment, Solar_F_dw, label='Solar Downward', color=colors[0], **kwargs)
ax1.scatter(time_of_segment, Solar_F_up, label='Solar Upward', color=colors[1], **kwargs)
ax2.scatter(time_of_segment, Terr_F_dw, label='Terrestrial Downward', color=colors[2], **kwargs)
ax2.scatter(time_of_segment, Terr_F_up, label='Terrestrial Upward', color=colors[3], **kwargs)
ax3.scatter(time_of_segment, KT19, label='Nadir Brightness Temperature', color=colors[4], **kwargs)
ax1.legend(frameon=False, bbox_to_anchor=(1.05, 0.5), loc='center left')
ax2.legend(frameon=False, bbox_to_anchor=(1.05, 0.5), loc='center left')
ax3.legend(frameon=False, bbox_to_anchor=(1.05, 0.5), loc='center left')
ax1.set_ylabel('$I$ [W m$^{-2}$]')
ax2.set_ylabel('$I$ [W m$^{-2}$]')
ax3.set_ylabel('$T_b$ [K]')
# plot AMSR2 sea ice concentration
im = ax4.pcolormesh(ds_sea_ice.time,
np.array([0, 1]),
np.array([ds_sea_ice.sic,ds_sea_ice.sic]), cmap='Blues_r', vmin=0, vmax=100,
shading='auto')
cax = fig.add_axes([0.87, 0.085, 0.1, ax4.get_position().height])
fig.colorbar(im, cax=cax, orientation='horizontal', label='Sea ice [%]')
ax4.tick_params(axis='y', labelleft=False, left=False)
#ax4.spines[:].set_visible(True)
ax4.spines['top'].set_visible(True)
ax4.spines['right'].set_visible(True)
ax4.xaxis.set_major_formatter(mdates.DateFormatter('%H:%M'))
ax4.set_xlabel('Time (hh:mm) [UTC]')
plt.show()