-
Notifications
You must be signed in to change notification settings - Fork 0
How to submit emulators to MINT
varunratnakar edited this page Jan 21, 2020
·
2 revisions
- Video: https://youtube.com/watch?v=y_l5J-z2jto
- Ensemble Manager OpenAPI spec: https://ensemble.mint.isi.edu/v1/api-docs
- Ingestion Manager OpenAPI spec: https://ingestion.mint.isi.edu/v1.2.0/openapi.json
Example:
{ "scenario": { "name": "Agriculture Modeling in Ethiopia", "regionid": "ethiopia", "time_period": { "from": "2017-01-01", "to": "2018-01-01" } }, "subgoal": { "name": "Model Grain yield while varying planting start date in Oromia from Jun-Aug 2017", "indicatorid": "grain~dry__mass-per-area_yield", "interventionid": "crop__planting_start_time", "regionid": "w2L0D6WYOUmUfDeE7KpZ", "time_period": { "from": "2017-06-01", "to": "2017-08-30" } }, "thread": { "modelid": "cycles-0.9.4-alpha-advanced-ethiopia-weather", "datasets": { "cycles_weather": "a325a2f9-2b3d-550c-8c7d-391d3cfea065" }, "parameters": { "start_planting_day": [ 100, 107, 114 ] } } }
- The indicatorid and interventionid can be retrieved from https://github.com/mintproject/mint-ui-lit/blob/master/src/offline_data/variable_list.ts
- The region id for a subgoal can be retrieved from https://dev.mint.isi.edu/ethiopia/regions (to select regions for ethiopia). When a region is selected, the region id is shown underneath the map.
- The modelid is the model setup id, and can be retrieved from https://dev.mint.isi.edu/ethiopia/models/explore
- The model input file names and parameter names can be retrieved from the model page (example: https://dev.mint.isi.edu/ethiopia/models/explore/CYCLES/cycles_v0.10.2_alpha/cycles-0.10.2-alpha-collection/cycles-0.10.2-alpha-collection-oromia).
- Dataset ids can be retrieved from https://dev.mint.isi.edu/ethiopia/datasets/browse
curl -X POST -H "Content-Type: application/json" -d @/path/to/emulator-payload.json https://ensemble.mint.isi.edu/v1/threads
Returns:
{"result":"success","message":"{\"scenario_id\":\"yPwu8HwZMnvgEI9ogiL4\",\"subgoal_id\":\"OfYrpWkVRkCu2bAXtVCD\",\"thread_id\":\"QSD1j9g3IwSQ2FW1ATdd\"}"}
Use the message from above as the content of this request
curl -X POST -H "Content-Type: application/json" -d "{\"scenario_id\":\"B46nwKOrapiUoBP35Go0\",\"subgoal_id\":\"Rx22lqnlXwYLivm5OK3d\",\"thread_id\":\"Vz3LTGVndvaDuODoHbVk\"}" https://ensemble.mint.isi.edu/v1/executionsLocal
Returns:
{"result":"success","message":"Thread QSD1j9g3IwSQ2FW1ATdd submitted for execution !"}
curl "https://ensemble.mint.isi.edu/v1/monitors?scenario_id=B46nwKOrapiUoBP35Go0&thread_id=Vz3LTGVndvaDuODoHbVk"
Returns:
{"https://w3id.org/okn/i/mint/cycles-0.9.4-alpha-advanced-ethiopia-weather":{"successful_runs":78,"workflow_name":"","submission_time":1579625368325,"submitted_for_execution":true,"total_runs":78,"submitted_runs":78,"failed_runs":0}}
curl -X POST -H "Content-Type: application/json" -d "{\"scenario_id\":\"yPwu8HwZMnvgEI9ogiL4\",\"subgoal_id\":\"OfYrpWkVRkCu2bAXtVCD\",\"thread_id\":\"QSD1j9g3IwSQ2FW1ATdd\"}" https://ingestion.mint.isi.edu/v1.2.0/summary
Returns:
{ "url": "https://ingestion.mint.isi.edu/data/QSD1j9g3IwSQ2FW1ATdd_export/summary.json" }