Home

Awesome

ClimateServ API Access

Python: 3.7 License: MIT SERVIR: Global DOI

This is a python package to access the ClimateSERV API you can install using conda or pip:

Current supported operations:

Current supported datasets:

We are moving to the dataset numbers to match the way ClimateSERV handles the datasets. We will continue to support the prior named variables for the datasets, but recommend updating to use the integer values. This will allow any future datasets that are added to be accessed by their ID found on ClimateSERV even if this documentation is not yet updated.

NMME forecast datasets:

CCSM4

CSFV2

Sample Usage

This is sample code to produce a time series csv using the CentralAsia_eModis dataset. If you were to choose the OperationType of Download you would need to change the Outfile from .csv to .zip If you would like the data returned as a json object to a variable set Outfile to 'memory_object' and create a variable to hold the return from the climateserv.api.request_data call.

<pre> import climateserv x = 81.27 y = 29.19 GeometryCoords = [[x-.01,y+.01],[x+.01, y+.01], [x+.01, y-.01],[x-.01,y-.01],[x-.01,y+.01]] DatasetType = 28 OperationType = 'Average' EarliestDate = '01/03/2018' LatestDate = '03/16/2018' SeasonalEnsemble = '' # Leave empty when using the new integer dataset IDs SeasonalVariable = '' # Leave empty when using the new integer dataset IDs Outfile = 'out.csv' climateserv.api.request_data(DatasetType, OperationType, EarliestDate, LatestDate,GeometryCoords, SeasonalEnsemble, SeasonalVariable,Outfile) </pre>

License and Distribution

ClimateSERVpy is distributed by SERVIR under the terms of the MIT License. See LICENSE in this directory for more information.

Privacy & Terms of Use

ClimateSERVpy abides to all of SERVIR's privacy and terms of use as described at https://servirglobal.net/Privacy-Terms-of-Use.