In order to effectively communicate to/from/within the API, a standard for weather and/or FWI indices data needs to be developed.
Ideally, we can find a way to represent data that will:
There are various tradeoffs that can be made for efficiency or accuracy of representation of the data. This is a list of things that were taken into consideration when creating the proposed specification.
null
s or something to make the arrays the same sizedate
, date-time
, and duration
formats to work
"naefs": { "name": "North American Ensemble Forecast System", "as_of": "2007-06-30T18:00:00Z", "interval": { "2007-06-30T18:00:00Z": "PT3H", "2007-07-08T18:00:00Z": "PT6H" }, "members": ["0", "1", "control"] }
vs.
"naefs": { "name": "North American Ensemble Forecast System", "as_of": "2007-06-30T18:00:00Z", "timestamps": [ "2007-06-30T18:00:00Z", "2007-06-30T21:00:00Z", "2007-07-01T00:00:00Z", ... "2007-07-08T09:00:00Z", "2007-07-08T12:00:00Z", "2007-07-08T15:00:00Z", "2007-07-08T18:00:00Z", "2007-07-09T00:00:00Z", "2007-07-09T06:00:00Z", "2007-07-09T12:00:00Z", ... ], "members": ["0", "1", "control"] }
e.g.
"time": {"units": "PT1H", "since": "2007-06-30T18:00:00Z"} "start": "2007-07-01T00:00:00Z", "end": "2007-07-16T18:00:00Z", ... "naefs": { "name": "North American Ensemble Forecast System", "as_of": "2007-06-30T18:00:00Z", "timestamps": [0, 3, 6, 9, 12, ..., 183, 186, 189, 192, 198, 204, 210, ..., 372, 378, 384], "members": ["0", "1", "control"] }
FeatureCollection['sources'][source]['as_of']
currently) and data period (FeatureCollection['start']
and FeatureCollection['end']
currently), so maybe:
NOTE:
FeatureCollection['time']['since']
(epoch time) could be completely independent of start/end time (e.g. could use '2000-01-01T00:00:00Z' as a reference)"time": {"units": "PT1H", "since": "2007-06-30T18:00:00Z"}
NOTE: probably much easier for a human to read if
start
is a string and not an offset from epoch time"start": "2007-07-01T00:00:00Z", "end": "2007-07-16T18:00:00Z", ... "naefs": { "name": "North American Ensemble Forecast System",
NOTE: again, much easier to read as a string than an offset from epoch. I don't think defining times in a source relative to the
as_of
time would be a good idea (i.e. if a time is hour 6, it should be hour 6 for every source) - although the counterpoint to that is that times for a model run are regularly referred to by their hour relative to when the model was run, and this would diverge from that standard)"as_of": "2007-06-30T18:00:00Z",
NOTE: this would not start at 0, because the data starts 6 hours after the model run start
"timestamps": [6, 9, 12, ..., 183, 186, 189, 192, 198, 204, 210, ..., 372, 378, 384], "members": ["0", "1", "control"] }
FeatureCollection
apply to any streams that they aren't defined specifically within?
FeatureCollection
and each stream also defines itFeature
, or for entire FeatureCollection
and not individuals Feature
s?bool
for saying they're include
e.g.
"temp": { "title": "Temperature in Celcius at 2m required for FWI calculations", "oneOf": [ { "const": "Temperature" }, { "type": "object", "required": [ "name" ], "properties": { "name": { "const": "Temperature" }, "units": { "const": "C" }, "height": { "const": "2m" } }, "additionalProperties": false }, { "const": true } ] },
this will allow
temp
to be defined either astrue
orTemperature
to include to include it, or it can speficy other attributes, but they must match what has been pre-defined
cfb
, csi
, bfi
, etc.), but is that too much?indices.json
is being referenced via composition, and it also requires other indices to be objects
with a name
, so you can't do the overrides for bool
or const
Feature['sources'][source]
FeatureCollection['features'][:]['data'][source]
Feature['data']
FeatureCollection['features'][:]['data'][:][index]
for deterministic, and FeatureCollection['features'][:]['data'][:][:][index]
for ensembleFeature['properties']
FeatureCollection['indices'][index]['postprocessing']
?e.g.:
{ "temp": [-3.6, -3.4, -3.9, -5.5, -5.8, -6.8, -7.3, -7.6, -8.3, -9.6, -11.0, -11.1], "rh": [89, 88, 87, 87, 88, 89, 90, 91, 91, 90, 90, 90], "ws": [19.9, 18.2, 16.7, 16.5, 17.6, 16.9, 15.1, 15.6, 16.2, 15.5, 14.8, 14.4], "wd": [347, 349, 347, 340, 330, 329, 327, 321, 318, 317, 317, 310], "prec": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.25, 0.0, 0.0, 1.0, 0.0, 0.0] }
vs.
[ [-3.6, -3.4, -3.9, -5.5, -5.8, -6.8, -7.3, -7.6, -8.3, -9.6, -11.0, -11.1], [89, 88, 87, 87, 88, 89, 90, 91, 91, 90, 90, 90], [19.9, 18.2, 16.7, 16.5, 17.6, 16.9, 15.1, 15.6, 16.2, 15.5, 14.8, 14.4], [347, 349, 347, 340, 330, 329, 327, 321, 318, 317, 317, 310], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.25, 0.0, 0.0, 1.0, 0.0, 0.0] ]
- this seems clunky when there's an index without data for a certain source, and you need to use
null
in the array at that index
FeatureCollection['sources'][source]['members']
and just use an array
e.g.
{ ... "features": [ { ... "properties": { ... "data": { "naefs": { "0": {...}, "1": {...}, "control": {...} } ... } ... } } ... ] }
vs.
{ ... "features": [ { ... "properties": { ... "data": { "naefs": [ {...}, {...}, {...} ] ... } ... } } ... ] ... "sources": { "naefs": { "members": ["0", "1", "control"] } } }
null
is used to specify a missing value