Skip to content
Charles Doutriaux edited this page Mar 23, 2015 · 10 revisions

Specification for ESGF-CWT Compute API

Format

current version: 1.0 prefered format is JSON but we should probably support xml as well.

Types/Keys

domain

JSON

Required attributes

'id': representing the domain described

'dimension': {} # a sequence of dictionaries for each of the dimensions covered by this domain.

the keys of the dimensions attribute are the dimension "id" in this variable similar to NetCDF

the value for each key is a dictionary containing for following key/value pairs:

{ "start" : "string" or number ,
"end" : "string" or number,
"system" : one of "value","index" ,
}

If the "system" key is missing it means system = "value"

Optional Attributes

'version': 1.0 # version of the API implemented

Notes

for index system use same as Python slice notation, e.g whole axis is selected via:

{"start" : 0 , "end" : None , "system" : "index" }

Negative indices are ok

{"start":1,"end":-1,"system":"index"} selects all but first and last indices over this axes

Some recommend we use BoundingBox as well. Should it be mutually exclusive with "latitude"/"longitude" in the "domain"? Or should we "order" these? i.e first apply domain restriction and then further select using BoundingBox.

Example:

{ "id: "global_GMT",
  "longitude": {
   "start": -180.0, 
   "end": 180.0
  }, 
  "time": {
   "start": "1980", 
   "end": "1982"
  }
 }

XML

To be added

variable

JSON

Required attributes

"uri" : where to get the file

"id" : name of variable at uri

Optional Attributes

'version': 1.0 # version of the API implemented

Notes

should "uri": 1234 be reserved for server internal use only? i.e. some id link to an internal db?

or should we use "uri" : "server://1234" schema?

Also should we use: "uri":"esgf://1234" to link to an ESGF dataset id ?

Example

{
 "uri": "file://lgm/uvcdat/2015-01-26/sample_data/clt.nc", 
 "id": "clt", 
 "version" : 1.0
}

or

{
 "uri": "file://lgm/uvcdat/2015-01-26/sample_data/clt.nc", 
 "id": "clt",
 "version" : 1.0 
}

or

{
 "uri": "file://lgm/uvcdat/2015-01-26/sample_data/clt.nc", 
 "id": "clt",
 "version" : 1.0
}

XML

To be added