Skip to content
Charles Doutriaux edited this page Feb 4, 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

domains

JSON

Required attributes

'id': representing the domain described

'version': 1.0 # version of the API implemented

'dimensions': {} # a dictionary 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"

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

Example:

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

XML

To be added

Variables

JSON

Required attributes

"version" : 1.0 # version api used

"url" : where to get the file

"id" : name of variable at url

Notes

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

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

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

Example

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

or

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

or

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

XML

To be added

Clone this wiki locally