Contrail Forecast Data¶
This document species the data contract for contrail forecast data. This data is intended to be served by the interface defined in the sibling specification Forecast API.
Format¶
Data is designed to be stored in either a netCDF4
or zarr
format.
This document assumes data is stored in a netCDF4
format.
Domain¶
Forecast must be globally valid for each forecast_reference_time
.
Global Attributes¶
(optional)
aircraft_class
(str
): Aircraft class for forecast. One of ["low_e"
,"default"
,"high_e"
], where suffix_e
references emissions.[1](optional)
model
(str
): A descriptor of the model used in generating thecontrails
variable.
Additional attributes, in addition to the required and suggested ones above, may be added at the author’s discretion.
Dimensions¶
longitude
(float32
):np.arange(-180, 180, 0.25)
, EPSG:4326latitude
(float32
):np.arange(-90, 90, 0.25)
, EPSG:4326flight_level
(int16
orint32
):[270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440]
, hectofeet [2]time
(int32
orint64
): CF compatible time coordinates. See time dimensions for more details.forecast_reference_time
(int32
orint64
): CF compatible time coordinates. The forecast reference time is the “data time”, i.e. the time at which the meteorological model was executed for each forecasttime
value. See forecast_reference_time as defined by CF conventions. See time dimensions for more details.
Time dimensions¶
CF conventions require
both time
and forecast_reference_time
have units
and calendar
variable attributes, e.g.:
units: hours since 2022-12-12
calendar: proleptic_gregorian
When reading or writing netCDF files with xarray, xarray
automatically decodes/encodes datetime arrays using CF conventions
When reading, xarray
will decode datetime arrays directly into a np.datetime64
array and hide the
units
and calendar
attributes.
When writing, xarray
uses the 'proleptic_gregorian'
calendar and units
of the smallest
time difference between values, with a reference time of the first time value.
See xarray Time Units for more information.
Its valid to write time
and forecast_reference_time
as unix time integers, but
units
must still be specified as "seconds since 1970-01-01 00:00:00"
.
calendar
attribute may still be specified to define the set of dates (year-month-day combinations) which are permitted.
Variables¶
contrails
(float32
): (longitude, latitude, flight_level, time) Continuous contrail forcing index values from [0 - 4] [3]Attributes:
units
: “”long_name
: Contrail forcing indexvalid_min
: 0 (NB: Could be extended in the future to -4 to support cooling contrails)valid_max
: 4
Example¶
Example scaling translates ef_per_m
[4] to contrails
index via:
ds["contrails"] = ds["ef_per_m"].clip(min=1e7, max=2e9)
ds["contrails"] = ((ds["contrails"] - 1e7) / (2e9 - 1e7)) * 4
Test¶
[ ] Establish benchmark datasets for substantially equivalent data distributions
[ ] Share 1 day of input data per quarter for validation exercise
Implementation¶
[ ] Add examples of cost function implementation